diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2005-03-23 20:15:51 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2005-03-23 20:15:51 +0000 |
commit | 4170cecbef3bba8a62d7099a80d5c8270c3aece6 (patch) | |
tree | 3e8d0c0e38ef7d98eee50cb3f092e41d72885702 /usr.sbin/ospfd/ospfd.h | |
parent | 4c556a8bcd48d9a15100dce7fd7d4f3505d0f23a (diff) |
prefixlen2mask() should return a network byte order result as it does imply
by using an in_addr_t as return type. It simplyfies also the usage as in most
cases the mask is used with a struct in_addr address which is also network
byte order. Add prototypes of prefixlen2mask() and mask2prefixlen() to
ospfd.h as it is used or will be used at different places.
OK norby@
Diffstat (limited to 'usr.sbin/ospfd/ospfd.h')
-rw-r--r-- | usr.sbin/ospfd/ospfd.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/ospfd/ospfd.h b/usr.sbin/ospfd/ospfd.h index 0b89b43e0d3..bd402a60449 100644 --- a/usr.sbin/ospfd/ospfd.h +++ b/usr.sbin/ospfd/ospfd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ospfd.h,v 1.19 2005/03/23 11:30:21 henning Exp $ */ +/* $OpenBSD: ospfd.h,v 1.20 2005/03/23 20:15:50 claudio Exp $ */ /* * Copyright (c) 2004 Esben Norby <norby@openbsd.org> @@ -485,4 +485,7 @@ void kr_show_route(struct imsg *); void kr_ifinfo(char *); struct kif *kif_findname(char *); +u_int8_t mask2prefixlen(in_addr_t); +in_addr_t prefixlen2mask(u_int8_t); + #endif /* _OSPFD_H_ */ |