diff options
author | hasso <hasso> | 2004-10-19 19:44:43 +0000 |
---|---|---|
committer | hasso <hasso> | 2004-10-19 19:44:43 +0000 |
commit | b1ef841a33839c8169570b18995c1f11847b7a00 (patch) | |
tree | 99bb1bcff310939d9128fc89154b63dfbd8753fb /lib/if.h | |
parent | 00b65ae1f8e2d8f3f54b54b0a84ff55d33aff077 (diff) | |
download | quagga-b1ef841a33839c8169570b18995c1f11847b7a00.tar.bz2 quagga-b1ef841a33839c8169570b18995c1f11847b7a00.tar.xz |
OK. Here it is - PtP patch from Andrew J. Schorr. No problems with ospfd,
ripd might need some more testing though.
Diffstat (limited to 'lib/if.h')
-rw-r--r-- | lib/if.h | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -148,12 +148,23 @@ struct connected /* Address of connected network. */ struct prefix *address; - struct prefix *destination; + struct prefix *destination; /* broadcast or peer address; may be NULL */ /* Label for Linux 2.2.X and upper. */ char *label; }; +/* Given an IPV4 struct connected, this macro determines whether a /32 + peer address has been supplied (i.e. there is no subnet assigned) */ +#define CONNECTED_DEST_HOST(C) \ + ((C)->destination && ((C)->address->prefixlen == IPV4_MAX_PREFIXLEN)) + +/* Given an IPV4 struct connected, this macro determins whether it is + a point-to-point link with a /32 peer address (i.e. there + is no dedicated subnet for the PtP link) */ +#define CONNECTED_POINTOPOINT_HOST(C) \ + (((C)->ifp->flags & IFF_POINTOPOINT) && CONNECTED_DEST_HOST(C)) + /* Interface hook sort. */ #define IF_NEW_HOOK 0 #define IF_DELETE_HOOK 1 |