X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fnetdev-linux.c;h=44167da4a4a4c4af6d07b65b921273d6ee0876ea;hb=025e874a9cc814820aadba7083fdbcfbaa959259;hp=134d99b415f535f157513d17c34f00562877c7f4;hpb=aaf2fb1aac9e6b253ddbc8af4f81e96196d86792;p=sliver-openvswitch.git diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index 134d99b41..44167da4a 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -3932,6 +3932,14 @@ tc_calc_buffer(unsigned int Bps, int mtu, uint64_t burst_bytes) /* Linux-only functions declared in netdev-linux.h */ +/* Returns a fd for an AF_INET socket or a negative errno value. */ +int +netdev_linux_get_af_inet_sock(void) +{ + int error = netdev_linux_init(); + return error ? -error : af_inet_sock; +} + /* Modifies the 'flag' bit in ethtool's flags field for 'netdev'. If * 'enable' is true, the bit is set. Otherwise, it is cleared. */ int