X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Frtnetlink-link.h;h=d0d9a7522bbd37aeb8da1010d60f1689bcc498e3;hb=28c5588e8e1a8d091c5d2275232c35f2968a97fa;hp=9248b0ad4c3da45c5e5f2175c86ba8bde9ce6ee7;hpb=21d6e22eeec05a1c382178dc2eb840afe3b9cca6;p=sliver-openvswitch.git diff --git a/lib/rtnetlink-link.h b/lib/rtnetlink-link.h index 9248b0ad4..d0d9a7522 100644 --- a/lib/rtnetlink-link.h +++ b/lib/rtnetlink-link.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009 Nicira Networks. + * Copyright (c) 2009 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,12 @@ #ifndef RTNETLINK_LINK_H #define RTNETLINK_LINK_H 1 -struct rtnetlink_notifier; +#include +#include +#include + +struct ofpbuf; +struct nln_notifier; /* These functions are Linux specific, so they should be used directly only by * Linux-specific code. */ @@ -34,6 +39,9 @@ struct rtnetlink_link_change { /* Extracted from Netlink attributes. */ const char *ifname; /* Name of network device. */ int master_ifindex; /* Ifindex of datapath master (0 if none). */ + int mtu; /* Current MTU. */ + uint8_t addr[ETH_ALEN]; + unsigned int ifi_flags; /* Flags of network device. */ }; /* Function called to report that a netdev has changed. 'change' describes the @@ -45,9 +53,11 @@ typedef void rtnetlink_link_notify_func(const struct rtnetlink_link_change *change, void *aux); -int rtnetlink_link_notifier_register(struct rtnetlink_notifier *, - rtnetlink_link_notify_func *, void *aux); -void rtnetlink_link_notifier_unregister(struct rtnetlink_notifier *); -void rtnetlink_link_notifier_run(void); -void rtnetlink_link_notifier_wait(void); +bool rtnetlink_link_parse(struct ofpbuf *buf, + struct rtnetlink_link_change *change); +struct nln_notifier * +rtnetlink_link_notifier_create(rtnetlink_link_notify_func *, void *aux); +void rtnetlink_link_notifier_destroy(struct nln_notifier *); +void rtnetlink_link_run(void); +void rtnetlink_link_wait(void); #endif /* rtnetlink-link.h */