mirror of
https://passt.top/passt
synced 2025-05-31 21:35:34 +02:00
epoll: Split listening Unix domain socket into its own type
tap_handler() actually handles events on three different types of object: the /dev/tap character device (pasta), a connected Unix domain socket (passt) or a listening Unix domain socket (passt). The last, in particular, really has no handling in common with the others, so split it into its own epoll type and directly dispatch to the relevant handler from the top level. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
485b5fb8f9
commit
eda4f1997e
4 changed files with 15 additions and 16 deletions
4
tap.h
4
tap.h
|
@ -76,8 +76,8 @@ int tap_send(const struct ctx *c, const void *data, size_t len);
|
|||
void tap_send_frames(struct ctx *c, const struct iovec *iov, size_t n);
|
||||
void tap_update_mac(struct tap_hdr *taph,
|
||||
const unsigned char *eth_d, const unsigned char *eth_s);
|
||||
void tap_handler(struct ctx *c, int fd, uint32_t events,
|
||||
const struct timespec *now);
|
||||
void tap_listen_handler(struct ctx *c, uint32_t events);
|
||||
void tap_handler(struct ctx *c, uint32_t events, const struct timespec *now);
|
||||
void tap_sock_init(struct ctx *c);
|
||||
|
||||
#endif /* TAP_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue