diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2010-11-17 18:51:58 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2010-11-17 18:51:58 +0000 |
commit | 52bbcd38c88143d9ec4a183cd3e5b2635e18e6e0 (patch) | |
tree | 0eae63fb5c9d80168e73372ea179c93da5620389 /sys | |
parent | e35c75bcc4a7d4d60e26a6d4bd607c90a4381db9 (diff) |
introduce ifa_update_broadaddr to update an ifaddr's broadcast address,
trivial for the moment, more needed soon
tested by many as part of a larger diff, ok sthen claudio dlg krw
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/if.c | 8 | ||||
-rw-r--r-- | sys/net/if.h | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 9745be6bf1a..4dfccedc99c 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.226 2010/10/25 11:33:06 blambert Exp $ */ +/* $OpenBSD: if.c,v 1.227 2010/11/17 18:51:57 henning Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -2192,6 +2192,12 @@ ifa_del(struct ifnet *ifp, struct ifaddr *ifa) TAILQ_REMOVE(&ifp->if_addrlist, ifa, ifa_list); } +void +ifa_update_broadaddr(struct ifnet *ifp, struct ifaddr *ifa, struct sockaddr *sa) +{ + ifa->ifa_broadaddr = sa; +} + int ifai_cmp(struct ifaddr_item *a, struct ifaddr_item *b) { diff --git a/sys/net/if.h b/sys/net/if.h index a04f86dbc31..3370be6881d 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if.h,v 1.120 2010/09/24 13:29:29 claudio Exp $ */ +/* $OpenBSD: if.h,v 1.121 2010/11/17 18:51:57 henning Exp $ */ /* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */ /* @@ -848,5 +848,7 @@ int looutput(struct ifnet *, void lortrequest(int, struct rtentry *, struct rt_addrinfo *); void ifa_add(struct ifnet *, struct ifaddr *); void ifa_del(struct ifnet *, struct ifaddr *); +void ifa_update_broadaddr(struct ifnet *, struct ifaddr *, + struct sockaddr *); #endif /* _KERNEL */ #endif /* _NET_IF_H_ */ |