X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=lib%2Fnetlink-socket.h;h=992528b2e3adc6987ef26b8eafa4eb2bda1b6e0b;hb=cc245ce87d3de9c2a66ee42719ab413e464fb2de;hp=93dc9c85411ad997f1e3aa1e226254e7fc2ba7ab;hpb=e214f75182f9e2b14f87d6a976739c38fc3d4c70;p=cascardo%2Fovs.git diff --git a/lib/netlink-socket.h b/lib/netlink-socket.h index 93dc9c854..992528b2e 100644 --- a/lib/netlink-socket.h +++ b/lib/netlink-socket.h @@ -151,6 +151,14 @@ * * nl_sock_recv() reads notifications sent this way. * + * Specifically on Windows platform, the datapath needs to allocate a + * queue for packets, and it does so only when userspace "subscribe"'s to + * packets on that netlink socket. Before closing the netlink socket, + * userspace needs to "unsubscribe" packets on that netlink socket. + * + * nl_sock_subscribe_packets() and nl_sock_unsubscribe_packets() are + * Windows specific. + * * Messages received this way can overflow, just like multicast * subscription messages, and they are reported the same way. Because * packet notification messages do not report the state of a table, there @@ -205,6 +213,11 @@ void nl_sock_destroy(struct nl_sock *); int nl_sock_join_mcgroup(struct nl_sock *, unsigned int multicast_group); int nl_sock_leave_mcgroup(struct nl_sock *, unsigned int multicast_group); +#ifdef _WIN32 +int nl_sock_subscribe_packets(struct nl_sock *sock); +int nl_sock_unsubscribe_packets(struct nl_sock *sock); +#endif + int nl_sock_send(struct nl_sock *, const struct ofpbuf *, bool wait); int nl_sock_send_seq(struct nl_sock *, const struct ofpbuf *, uint32_t nlmsg_seq, bool wait); @@ -213,7 +226,9 @@ int nl_sock_recv(struct nl_sock *, struct ofpbuf *, bool wait); int nl_sock_drain(struct nl_sock *); void nl_sock_wait(const struct nl_sock *, short int events); +#ifndef _WIN32 int nl_sock_fd(const struct nl_sock *); +#endif uint32_t nl_sock_pid(const struct nl_sock *);