From: claudio Date: Mon, 29 May 2017 14:28:01 +0000 (+0000) Subject: Kill struct pfkey_version and move struct pfkeyv2_socket & dump_state X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=eeef6ec021155863e209a87113e86fa51fc04356;p=openbsd Kill struct pfkey_version and move struct pfkeyv2_socket & dump_state to pfkeyv2.c. These structs are nowhere else needed. OK gcc --- diff --git a/sys/net/pfkeyv2.c b/sys/net/pfkeyv2.c index 3f51e93a975..7d3ffc724f3 100644 --- a/sys/net/pfkeyv2.c +++ b/sys/net/pfkeyv2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkeyv2.c,v 1.158 2017/05/29 10:55:34 claudio Exp $ */ +/* $OpenBSD: pfkeyv2.c,v 1.159 2017/05/29 14:28:01 claudio Exp $ */ /* * @(#)COPYRIGHT 1.1 (NRL) 17 January 1995 @@ -136,6 +136,20 @@ extern struct radix_node_head **spd_tables; struct sockaddr pfkey_addr = { 2, PF_KEY, }; struct domain pfkeydomain; +struct pfkeyv2_socket { + struct pfkeyv2_socket *next; + struct socket *socket; + int flags; + uint32_t pid; + uint32_t registration; /* Increase size if SATYPE_MAX > 31 */ + uint rdomain; +}; + +struct dump_state { + struct sadb_msg *sadb_msg; + struct socket *socket; +}; + void pfkey_init(void); int pfkeyv2_attach(struct socket *, int); diff --git a/sys/net/pfkeyv2.h b/sys/net/pfkeyv2.h index ba920779bc0..04d701b1aa8 100644 --- a/sys/net/pfkeyv2.h +++ b/sys/net/pfkeyv2.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkeyv2.h,v 1.76 2017/05/29 10:55:34 claudio Exp $ */ +/* $OpenBSD: pfkeyv2.h,v 1.77 2017/05/29 14:28:01 claudio Exp $ */ /* * @(#)COPYRIGHT 1.1 (NRL) January 1998 * @@ -367,28 +367,6 @@ struct mbuf; #define EXTLEN(x) (((struct sadb_ext *)(x))->sadb_ext_len * sizeof(uint64_t)) #define PADUP(x) (((x) + sizeof(uint64_t) - 1) & ~(sizeof(uint64_t) - 1)) -struct pfkey_version { - int protocol; - int (*create)(struct socket *socket); - int (*release)(struct socket *socket); - int (*send)(struct socket *socket, void *message, int len); - int (*sysctl)(int *, u_int, void *, size_t *, void *, size_t); -}; - -struct pfkeyv2_socket { - struct pfkeyv2_socket *next; - struct socket *socket; - int flags; - uint32_t pid; - uint32_t registration; /* Increase size if SATYPE_MAX > 31 */ - uint rdomain; -}; - -struct dump_state { - struct sadb_msg *sadb_msg; - struct socket *socket; -}; - int pfkeyv2_parsemessage(void *, int, void **); int pfkeyv2_expire(struct tdb *, u_int16_t); int pfkeyv2_acquire(struct ipsec_policy *, union sockaddr_union *,