From 36f48e5e95fc4ca376f3b514b6ea38b3b9cb896f Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Sat, 13 Oct 2007 10:50:34 +0000 Subject: [PATCH] Constify ng_ether_input_p/ng_ether_input_orphan_p 'eh' parameter. --- sys/net/ethernet.h | 6 +++--- sys/net/if_ethersubr.c | 6 +++--- sys/netgraph/ether/ng_ether.c | 18 +++++++++--------- sys/netgraph/fec/ng_fec.c | 6 +++--- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/sys/net/ethernet.h b/sys/net/ethernet.h index 0bf13bcc18..2145322a87 100644 --- a/sys/net/ethernet.h +++ b/sys/net/ethernet.h @@ -2,7 +2,7 @@ * Fundamental constants relating to ethernet. * * $FreeBSD: src/sys/net/ethernet.h,v 1.12.2.8 2002/12/01 14:03:09 sobomax Exp $ - * $DragonFly: src/sys/net/ethernet.h,v 1.14 2007/10/13 09:43:19 sephe Exp $ + * $DragonFly: src/sys/net/ethernet.h,v 1.15 2007/10/13 10:50:34 sephe Exp $ * */ @@ -360,9 +360,9 @@ struct ifnet; struct mbuf; extern void (*ng_ether_input_p)(struct ifnet *ifp, - struct mbuf **mp, struct ether_header *eh); + struct mbuf **mp, const struct ether_header *eh); extern void (*ng_ether_input_orphan_p)(struct ifnet *ifp, - struct mbuf *m, struct ether_header *eh); + struct mbuf *m, const struct ether_header *eh); extern int (*ng_ether_output_p)(struct ifnet *ifp, struct mbuf **mp); extern void (*ng_ether_attach_p)(struct ifnet *ifp); extern void (*ng_ether_detach_p)(struct ifnet *ifp); diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 09fb21dc2a..65fa87c11b 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -32,7 +32,7 @@ * * @(#)if_ethersubr.c 8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/net/if_ethersubr.c,v 1.70.2.33 2003/04/28 15:45:53 archie Exp $ - * $DragonFly: src/sys/net/if_ethersubr.c,v 1.47 2007/10/13 09:43:19 sephe Exp $ + * $DragonFly: src/sys/net/if_ethersubr.c,v 1.48 2007/10/13 10:50:34 sephe Exp $ */ #include "opt_atalk.h" @@ -106,9 +106,9 @@ extern u_char aarp_org_code[3]; /* netgraph node hooks for ng_ether(4) */ void (*ng_ether_input_p)(struct ifnet *ifp, - struct mbuf **mp, struct ether_header *eh); + struct mbuf **mp, const struct ether_header *eh); void (*ng_ether_input_orphan_p)(struct ifnet *ifp, - struct mbuf *m, struct ether_header *eh); + struct mbuf *m, const struct ether_header *eh); int (*ng_ether_output_p)(struct ifnet *ifp, struct mbuf **mp); void (*ng_ether_attach_p)(struct ifnet *ifp); void (*ng_ether_detach_p)(struct ifnet *ifp); diff --git a/sys/netgraph/ether/ng_ether.c b/sys/netgraph/ether/ng_ether.c index d12b863f6e..749a7ae4fe 100644 --- a/sys/netgraph/ether/ng_ether.c +++ b/sys/netgraph/ether/ng_ether.c @@ -38,7 +38,7 @@ * Julian Elischer * * $FreeBSD: src/sys/netgraph/ng_ether.c,v 1.2.2.13 2002/07/02 20:10:25 archie Exp $ - * $DragonFly: src/sys/netgraph/ether/ng_ether.c,v 1.11 2006/12/20 18:14:43 dillon Exp $ + * $DragonFly: src/sys/netgraph/ether/ng_ether.c,v 1.12 2007/10/13 10:50:34 sephe Exp $ */ /* @@ -83,18 +83,18 @@ typedef struct private *priv_p; /* Functional hooks called from if_ethersubr.c */ static void ng_ether_input(struct ifnet *ifp, - struct mbuf **mp, struct ether_header *eh); + struct mbuf **mp, const struct ether_header *eh); static void ng_ether_input_orphan(struct ifnet *ifp, - struct mbuf *m, struct ether_header *eh); + struct mbuf *m, const struct ether_header *eh); static int ng_ether_output(struct ifnet *ifp, struct mbuf **mp); static void ng_ether_attach(struct ifnet *ifp); static void ng_ether_detach(struct ifnet *ifp); /* Other functions */ static void ng_ether_input2(node_p node, - struct mbuf **mp, struct ether_header *eh); + struct mbuf **mp, const struct ether_header *eh); static int ng_ether_glueback_header(struct mbuf **mp, - struct ether_header *eh); + const struct ether_header *eh); static int ng_ether_rcv_lower(node_p node, struct mbuf *m, meta_p meta); static int ng_ether_rcv_upper(node_p node, struct mbuf *m, meta_p meta); @@ -210,7 +210,7 @@ NETGRAPH_INIT(ether, &ng_ether_typestruct); */ static void ng_ether_input(struct ifnet *ifp, - struct mbuf **mp, struct ether_header *eh) + struct mbuf **mp, const struct ether_header *eh) { const node_p node = IFP2NG(ifp); const priv_p priv = node->private; @@ -229,7 +229,7 @@ ng_ether_input(struct ifnet *ifp, */ static void ng_ether_input_orphan(struct ifnet *ifp, - struct mbuf *m, struct ether_header *eh) + struct mbuf *m, const struct ether_header *eh) { const node_p node = IFP2NG(ifp); const priv_p priv = node->private; @@ -252,7 +252,7 @@ ng_ether_input_orphan(struct ifnet *ifp, * NOTE: this function will get called at splimp() */ static void -ng_ether_input2(node_p node, struct mbuf **mp, struct ether_header *eh) +ng_ether_input2(node_p node, struct mbuf **mp, const struct ether_header *eh) { const priv_p priv = node->private; meta_p meta = NULL; @@ -359,7 +359,7 @@ ng_ether_detach(struct ifnet *ifp) * the front of an incoming packet. */ static int -ng_ether_glueback_header(struct mbuf **mp, struct ether_header *eh) +ng_ether_glueback_header(struct mbuf **mp, const struct ether_header *eh) { struct mbuf *m = *mp; int error = 0; diff --git a/sys/netgraph/fec/ng_fec.c b/sys/netgraph/fec/ng_fec.c index da47182db6..0126dfd0f4 100644 --- a/sys/netgraph/fec/ng_fec.c +++ b/sys/netgraph/fec/ng_fec.c @@ -33,7 +33,7 @@ * THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/netgraph/ng_fec.c,v 1.1.2.1 2002/11/01 21:39:31 julian Exp $ - * $DragonFly: src/sys/netgraph/fec/ng_fec.c,v 1.19 2006/12/22 23:44:57 swildner Exp $ + * $DragonFly: src/sys/netgraph/fec/ng_fec.c,v 1.20 2007/10/13 10:50:34 sephe Exp $ */ /* * Copyright (c) 1996-1999 Whistle Communications, Inc. @@ -172,7 +172,7 @@ typedef struct ng_fec_private *priv_p; /* Interface methods */ static void ng_fec_input(struct ifnet *, struct mbuf **, - struct ether_header *); + const struct ether_header *); static void ng_fec_start(struct ifnet *ifp); static int ng_fec_choose_port(struct ng_fec_bundle *b, struct mbuf *m, struct ifnet **ifp); @@ -724,7 +724,7 @@ ng_fec_ioctl(struct ifnet *ifp, u_long command, caddr_t data, struct ucred *cr) */ static void ng_fec_input(struct ifnet *ifp, struct mbuf **m0, - struct ether_header *eh) + const struct ether_header *eh) { struct ng_node *node; struct ng_fec_private *priv; -- 2.41.0