From 9b1cd4b782681b4130d746d3ed6f4efbaeaa89ca Mon Sep 17 00:00:00 2001 From: Hakan Olsson Date: Fri, 29 Jun 2001 18:52:18 +0000 Subject: Change get_src/get_dst API as we get the length with sa_len. --- sbin/isakmpd/udp.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'sbin/isakmpd/udp.c') diff --git a/sbin/isakmpd/udp.c b/sbin/isakmpd/udp.c index f1121c20c43..b4a6bc55e61 100644 --- a/sbin/isakmpd/udp.c +++ b/sbin/isakmpd/udp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udp.c,v 1.30 2001/06/07 08:14:21 angelos Exp $ */ +/* $OpenBSD: udp.c,v 1.31 2001/06/29 18:52:17 ho Exp $ */ /* $EOM: udp.c,v 1.57 2001/01/26 10:09:57 niklas Exp $ */ /* @@ -89,8 +89,8 @@ static int udp_fd_isset (struct transport *, fd_set *); static void udp_handle_message (struct transport *); static struct transport *udp_make (struct sockaddr_in *); static int udp_send_message (struct message *); -static void udp_get_dst (struct transport *, struct sockaddr **, int *); -static void udp_get_src (struct transport *, struct sockaddr **, int *); +static void udp_get_dst (struct transport *, struct sockaddr **); +static void udp_get_src (struct transport *, struct sockaddr **); static char *udp_decode_ids (struct transport *); static struct transport_vtbl udp_transport_vtbl = { @@ -575,24 +575,22 @@ udp_send_message (struct message *msg) /* * Get transport T's peer address and stuff it into the sockaddr pointed - * to by DST. Put its length into DST_LEN. + * to by DST. */ static void -udp_get_dst (struct transport *t, struct sockaddr **dst, int *dst_len) +udp_get_dst (struct transport *t, struct sockaddr **dst) { *dst = (struct sockaddr *)&((struct udp_transport *)t)->dst; - *dst_len = sizeof ((struct udp_transport *)t)->dst; } /* * Get transport T's local address and stuff it into the sockaddr pointed - * to by SRC. Put its length into SRC_LEN. + * to by SRC. */ static void -udp_get_src (struct transport *t, struct sockaddr **src, int *src_len) +udp_get_src (struct transport *t, struct sockaddr **src) { *src = (struct sockaddr *)&((struct udp_transport *)t)->src; - *src_len = sizeof ((struct udp_transport *)t)->src; } static char * -- cgit v1.2.3