summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2017-05-29 14:28:02 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2017-05-29 14:28:02 +0000
commitd4feee0dffc12bf7274d20d9d24b67e04b063ac4 (patch)
treebe2e8c45cb7bfb1c234db46f4ef1de316f49a52d /sys/net
parent38593f1a27a586394d667016cf04748ccbb13602 (diff)
Kill struct pfkey_version and move struct pfkeyv2_socket & dump_state
to pfkeyv2.c. These structs are nowhere else needed. OK gcc
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/pfkeyv2.c16
-rw-r--r--sys/net/pfkeyv2.h24
2 files changed, 16 insertions, 24 deletions
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 *,