From 1540a98e36af6c82544ecac59cf46bd0fc4256fa Mon Sep 17 00:00:00 2001 From: "Bjoern A. Zeeb" Date: Thu, 8 Aug 2019 10:59:54 +0000 Subject: [PATCH] frag6: move public structure into file local space. Move ip6asfrag and the accompanying IP6_REASS_MBUF macro from ip6_var.h into frag6.c as they are not used outside frag6.c. Sadly struct ip6q is all over the mac framework so we have to leave it public. This reduces the public KPI space. MFC after: 3 months X-MFC: possibly MFC the #define only to stable branches Sponsored by: Netflix --- sys/netinet6/frag6.c | 12 ++++++++++++ sys/netinet6/ip6_var.h | 16 +--------------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c index fb249af791c..7aeeb03ffb1 100644 --- a/sys/netinet6/frag6.c +++ b/sys/netinet6/frag6.c @@ -86,6 +86,18 @@ struct ip6qbucket { int count; }; +struct ip6asfrag { + struct ip6asfrag *ip6af_down; + struct ip6asfrag *ip6af_up; + struct mbuf *ip6af_m; + int ip6af_offset; /* offset in ip6af_m to next header */ + int ip6af_frglen; /* fragmentable part length */ + int ip6af_off; /* fragment offset */ + u_int16_t ip6af_mff; /* more fragment bit in frag off */ +}; + +#define IP6_REASS_MBUF(ip6af) (*(struct mbuf **)&((ip6af)->ip6af_m)) + static MALLOC_DEFINE(M_FRAG6, "frag6", "IPv6 fragment reassembly header"); /* System wide (global) maximum and count of packets in reassembly queues. */ diff --git a/sys/netinet6/ip6_var.h b/sys/netinet6/ip6_var.h index ffd1653f8be..be748b31cea 100644 --- a/sys/netinet6/ip6_var.h +++ b/sys/netinet6/ip6_var.h @@ -68,6 +68,7 @@ #include +struct ip6asfrag; /* * IP6 reassembly queue structure. Each fragment * being reassembled is attached to one of these structures. @@ -83,25 +84,10 @@ struct ip6q { struct ip6q *ip6q_next; struct ip6q *ip6q_prev; int ip6q_unfrglen; /* len of unfragmentable part */ -#ifdef notyet - u_char *ip6q_nxtp; -#endif int ip6q_nfrag; /* # of fragments */ struct label *ip6q_label; }; -struct ip6asfrag { - struct ip6asfrag *ip6af_down; - struct ip6asfrag *ip6af_up; - struct mbuf *ip6af_m; - int ip6af_offset; /* offset in ip6af_m to next header */ - int ip6af_frglen; /* fragmentable part length */ - int ip6af_off; /* fragment offset */ - u_int16_t ip6af_mff; /* more fragment bit in frag off */ -}; - -#define IP6_REASS_MBUF(ip6af) (*(struct mbuf **)&((ip6af)->ip6af_m)) - /* * IP6 reinjecting structure. */