summaryrefslogtreecommitdiffstats
path: root/sys/sys/mbuf.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/sys/mbuf.h')
-rw-r--r--sys/sys/mbuf.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h
index f81a97e..98c87fa 100644
--- a/sys/sys/mbuf.h
+++ b/sys/sys/mbuf.h
@@ -79,10 +79,11 @@ struct pkthdr {
struct ifnet *rcvif; /* rcv interface */
int len; /* total packet length */
/* variables for ip and tcp reassembly */
- void *header; /* pointer to packet header */
+ caddr_t header; /* pointer to packet header */
/* variables for hardware checksum */
int csum_flags; /* flags regarding checksum */
int csum_data; /* data field used by csum routines */
+ struct mbuf *aux; /* extra data buffer; ipsec/others */
};
/* description of external storage mapped into mbuf, valid if M_EXT set */
@@ -322,6 +323,7 @@ union mcluster {
_mm->m_flags = M_PKTHDR; \
_mm->m_pkthdr.rcvif = NULL; \
_mm->m_pkthdr.csum_flags = 0; \
+ _mm->m_pkthdr.aux = (struct mbuf *)NULL; \
(m) = _mm; \
splx(_ms); \
} else { \
@@ -431,6 +433,7 @@ union mcluster {
/*
* Copy mbuf pkthdr from "from" to "to".
* from must have M_PKTHDR set, and to must be empty.
+ * aux pointer will be moved to `to'.
*/
#define M_COPY_PKTHDR(to, from) do { \
struct mbuf *_mfrom = (from); \
@@ -439,6 +442,7 @@ union mcluster {
_mto->m_data = _mto->m_pktdat; \
_mto->m_flags = _mfrom->m_flags & M_COPYFLAGS; \
_mto->m_pkthdr = _mfrom->m_pkthdr; \
+ _mfrom->m_pkthdr.aux = (struct mbuf *)NULL; \
} while (0)
/*
@@ -516,6 +520,14 @@ union mcluster {
/* compatibility with 4.3 */
#define m_copy(m, o, l) m_copym((m), (o), (l), M_DONTWAIT)
+/*
+ * pkthdr.aux type tags.
+ */
+struct mauxtag {
+ int af;
+ int type;
+};
+
#ifdef _KERNEL
extern u_int m_clalloc_wid; /* mbuf cluster wait count */
extern u_int m_mballoc_wid; /* mbuf wait count */
@@ -552,11 +564,15 @@ struct mbuf *m_gethdr __P((int, int));
int m_mballoc __P((int, int));
struct mbuf *m_mballoc_wait __P((int, int));
struct mbuf *m_prepend __P((struct mbuf *,int,int));
+struct mbuf *m_pulldown __P((struct mbuf *, int, int, int *));
void m_print __P((const struct mbuf *m));
struct mbuf *m_pullup __P((struct mbuf *, int));
struct mbuf *m_retry __P((int, int));
struct mbuf *m_retryhdr __P((int, int));
struct mbuf *m_split __P((struct mbuf *,int,int));
+struct mbuf *m_aux_add __P((struct mbuf *, int, int));
+struct mbuf *m_aux_find __P((struct mbuf *, int, int));
+void m_aux_delete __P((struct mbuf *, struct mbuf *));
#endif /* _KERNEL */
#endif /* !_SYS_MBUF_H_ */
OpenPOWER on IntegriCloud