diff options
Diffstat (limited to 'sbin/isakmpd/sysdep')
-rw-r--r-- | sbin/isakmpd/sysdep/bsdi/sysdep.c | 9 | ||||
-rw-r--r-- | sbin/isakmpd/sysdep/freebsd/sysdep.c | 9 | ||||
-rw-r--r-- | sbin/isakmpd/sysdep/linux/sysdep.c | 17 | ||||
-rw-r--r-- | sbin/isakmpd/sysdep/netbsd/sysdep.c | 9 | ||||
-rw-r--r-- | sbin/isakmpd/sysdep/openbsd/sysdep.c | 9 |
5 files changed, 48 insertions, 5 deletions
diff --git a/sbin/isakmpd/sysdep/bsdi/sysdep.c b/sbin/isakmpd/sysdep/bsdi/sysdep.c index 7ce467719b1..62332ec11ad 100644 --- a/sbin/isakmpd/sysdep/bsdi/sysdep.c +++ b/sbin/isakmpd/sysdep/bsdi/sysdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysdep.c,v 1.9 2001/08/23 14:59:10 markus Exp $ */ +/* $OpenBSD: sysdep.c,v 1.10 2001/10/26 12:23:45 ho Exp $ */ /* * Copyright (c) 1998, 1999 Niklas Hallqvist. All rights reserved. @@ -70,6 +70,13 @@ sysdep_progname () return __progname; } +/* Return the length of the sockaddr struct. */ +u_int8_t +sysdep_sa_len (struct sockaddr *sa) +{ + return sa->sa_len; +} + /* As regress/ use this file I protect the sysdep_app_* stuff like this. */ #ifdef NEED_SYSDEP_APP /* diff --git a/sbin/isakmpd/sysdep/freebsd/sysdep.c b/sbin/isakmpd/sysdep/freebsd/sysdep.c index ce2235365f0..4f853ca1774 100644 --- a/sbin/isakmpd/sysdep/freebsd/sysdep.c +++ b/sbin/isakmpd/sysdep/freebsd/sysdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysdep.c,v 1.9 2001/08/12 12:03:02 heko Exp $ */ +/* $OpenBSD: sysdep.c,v 1.10 2001/10/26 12:23:45 ho Exp $ */ /* * Copyright (c) 1998, 1999 Niklas Hallqvist. All rights reserved. @@ -76,6 +76,13 @@ sysdep_progname () return __progname; } +/* Return the length of the sockaddr struct. */ +u_int8_t +sysdep_sa_len (struct sockaddr *sa) +{ + return sa->sa_len; +} + /* As regress/ use this file I protect the sysdep_app_* stuff like this. */ #ifdef NEED_SYSDEP_APP /* diff --git a/sbin/isakmpd/sysdep/linux/sysdep.c b/sbin/isakmpd/sysdep/linux/sysdep.c index 6098a43ed40..c9f8a17f6c8 100644 --- a/sbin/isakmpd/sysdep/linux/sysdep.c +++ b/sbin/isakmpd/sysdep/linux/sysdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysdep.c,v 1.9 2001/08/12 12:03:02 heko Exp $ */ +/* $OpenBSD: sysdep.c,v 1.10 2001/10/26 12:23:45 ho Exp $ */ /* * Copyright (c) 1998, 1999 Niklas Hallqvist. All rights reserved. @@ -94,6 +94,21 @@ sysdep_progname () return __progname; } +/* Return the length of the sockaddr struct. */ +u_int8_t +sysdep_sa_len (struct sockaddr *sa) +{ + switch (sa->sa_family) + { + case AF_INET: + return sizeof (struct sockaddr_in); + case AF_INET6: + return sizeof (struct sockaddr_in6); + } + log_print ("sysdep_sa_len: unknown sa family %d", sa->sa_family); + return sizeof (struct sockaddr_in); +} + /* As regress/ use this file I protect the sysdep_app_* stuff like this. */ #ifdef NEED_SYSDEP_APP int diff --git a/sbin/isakmpd/sysdep/netbsd/sysdep.c b/sbin/isakmpd/sysdep/netbsd/sysdep.c index 87e6c47b3c0..bd84b431eb6 100644 --- a/sbin/isakmpd/sysdep/netbsd/sysdep.c +++ b/sbin/isakmpd/sysdep/netbsd/sysdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysdep.c,v 1.10 2001/08/13 13:23:15 itojun Exp $ */ +/* $OpenBSD: sysdep.c,v 1.11 2001/10/26 12:23:45 ho Exp $ */ /* * Copyright (c) 1998, 1999 Niklas Hallqvist. All rights reserved. @@ -70,6 +70,13 @@ sysdep_progname () return __progname; } +/* Return the length of the sockaddr struct. */ +u_int8_t +sysdep_sa_len (struct sockaddr *sa) +{ + return sa->sa_len; +} + /* As regress/ use this file I protect the sysdep_app_* stuff like this. */ #ifdef NEED_SYSDEP_APP /* diff --git a/sbin/isakmpd/sysdep/openbsd/sysdep.c b/sbin/isakmpd/sysdep/openbsd/sysdep.c index 31d979e3812..01a09dc0565 100644 --- a/sbin/isakmpd/sysdep/openbsd/sysdep.c +++ b/sbin/isakmpd/sysdep/openbsd/sysdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysdep.c,v 1.20 2001/08/23 19:07:00 niklas Exp $ */ +/* $OpenBSD: sysdep.c,v 1.21 2001/10/26 12:23:46 ho Exp $ */ /* $EOM: sysdep.c,v 1.9 2000/12/04 04:46:35 angelos Exp $ */ /* @@ -81,6 +81,13 @@ sysdep_progname () return __progname; } +/* Return the length of the sockaddr struct. */ +u_int8_t +sysdep_sa_len (struct sockaddr *sa) +{ + return sa->sa_len; +} + /* As regress/ use this file I protect the sysdep_app_* stuff like this. */ #ifdef NEED_SYSDEP_APP /* |