diff options
author | harti <harti@FreeBSD.org> | 2003-07-24 09:13:03 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2003-07-24 09:13:03 +0000 |
commit | 7701c947dbbce3c1585679703700213bd686b5c9 (patch) | |
tree | 9d69e257f73b320140b9228f2b1bbfe55193c667 /sys/netatm | |
parent | 28420f22f746f5c9bcaa97310e39e206c789b1ef (diff) | |
download | FreeBSD-src-7701c947dbbce3c1585679703700213bd686b5c9.zip FreeBSD-src-7701c947dbbce3c1585679703700213bd686b5c9.tar.gz |
Constify the arguments to several pdu_print functions.
Diffstat (limited to 'sys/netatm')
-rw-r--r-- | sys/netatm/atm_device.c | 8 | ||||
-rw-r--r-- | sys/netatm/atm_subr.c | 11 | ||||
-rw-r--r-- | sys/netatm/atm_var.h | 5 | ||||
-rw-r--r-- | sys/netatm/uni/sscf_uni.c | 6 | ||||
-rw-r--r-- | sys/netatm/uni/sscf_uni_var.h | 3 | ||||
-rw-r--r-- | sys/netatm/uni/sscop_pdu.c | 6 | ||||
-rw-r--r-- | sys/netatm/uni/sscop_var.h | 3 | ||||
-rw-r--r-- | sys/netatm/uni/uniarp_input.c | 6 | ||||
-rw-r--r-- | sys/netatm/uni/uniip_var.h | 3 |
9 files changed, 18 insertions, 33 deletions
diff --git a/sys/netatm/atm_device.c b/sys/netatm/atm_device.c index cbfdaa6..34c6253 100644 --- a/sys/netatm/atm_device.c +++ b/sys/netatm/atm_device.c @@ -804,11 +804,8 @@ atm_unload() * */ void -atm_dev_pdu_print(cup, cvp, m, msg) - Cmn_unit *cup; - Cmn_vcc *cvp; - KBuffer *m; - char *msg; +atm_dev_pdu_print(const Cmn_unit *cup, const Cmn_vcc *cvp, + const KBuffer *m, const char *msg) { char buf[128]; @@ -818,4 +815,3 @@ atm_dev_pdu_print(cup, cvp, m, msg) atm_pdu_print(m, buf); } - diff --git a/sys/netatm/atm_subr.c b/sys/netatm/atm_subr.c index 4e72a03..0a6b55b 100644 --- a/sys/netatm/atm_subr.c +++ b/sys/netatm/atm_subr.c @@ -575,23 +575,21 @@ atm_intr(struct mbuf *m) * */ void -atm_pdu_print(m, msg) - KBuffer *m; - char *msg; +atm_pdu_print(const KBuffer *m, const char *msg) { - caddr_t cp; + const u_char *cp; int i; char c = ' '; printf("%s:", msg); while (m) { - KB_DATASTART(m, cp, caddr_t); + KB_DATASTART(m, cp, const u_char *); printf("%cbfr=%p data=%p len=%d: ", c, m, cp, KB_LEN(m)); c = '\t'; if (atm_print_data) { for (i = 0; i < KB_LEN(m); i++) { - printf("%2x ", (u_char)*cp++); + printf("%2x ", *cp++); } printf("<end_bfr>\n"); } else { @@ -600,4 +598,3 @@ atm_pdu_print(m, msg) m = KB_NEXT(m); } } - diff --git a/sys/netatm/atm_var.h b/sys/netatm/atm_var.h index 022f2e3..c4c632a 100644 --- a/sys/netatm/atm_var.h +++ b/sys/netatm/atm_var.h @@ -109,7 +109,8 @@ void * atm_dev_alloc(u_int, u_int, u_int); void atm_dev_free(volatile void *); KBuffer * atm_dev_compress(KBuffer *); Cmn_vcc * atm_dev_vcc_find(Cmn_unit *, u_int, u_int, u_int); -void atm_dev_pdu_print(Cmn_unit *, Cmn_vcc *, KBuffer *, char *); +void atm_dev_pdu_print(const Cmn_unit *, const Cmn_vcc *, + const KBuffer *, const char *); /* atm_if.c */ int atm_physif_register(Cmn_unit *, char *, @@ -172,6 +173,6 @@ int atm_untimeout(struct atm_time *); int atm_stack_enq(int, void (*)(int, void *, intptr_t, intptr_t), void *, Atm_connvc *, intptr_t, intptr_t); void atm_stack_drain(void); -void atm_pdu_print(KBuffer *, char *); +void atm_pdu_print(const KBuffer *, const char *); #endif /* _KERNEL */ #endif /* _NETATM_ATM_VAR_H */ diff --git a/sys/netatm/uni/sscf_uni.c b/sys/netatm/uni/sscf_uni.c index 47ed863..8911ee9 100644 --- a/sys/netatm/uni/sscf_uni.c +++ b/sys/netatm/uni/sscf_uni.c @@ -305,10 +305,7 @@ sscf_uni_abort(uvp, msg) * */ void -sscf_uni_pdu_print(uvp, m, msg) - struct univcc *uvp; - KBuffer *m; - char *msg; +sscf_uni_pdu_print(const struct univcc *uvp, const KBuffer *m, const char *msg) { char buf[128]; struct vccb *vcp; @@ -318,4 +315,3 @@ sscf_uni_pdu_print(uvp, m, msg) msg, vcp->vc_vpi, vcp->vc_vci); atm_pdu_print(m, buf); } - diff --git a/sys/netatm/uni/sscf_uni_var.h b/sys/netatm/uni/sscf_uni_var.h index 4eb938a..934bdaa 100644 --- a/sys/netatm/uni/sscf_uni_var.h +++ b/sys/netatm/uni/sscf_uni_var.h @@ -95,7 +95,8 @@ struct univcc { int sscf_uni_start(void); int sscf_uni_stop(void); void sscf_uni_abort(struct univcc *, char *); -void sscf_uni_pdu_print(struct univcc *, KBuffer *, char *); +void sscf_uni_pdu_print(const struct univcc *, + const KBuffer *, const char *); /* sscf_uni_lower.c */ void sscf_uni_lower(int, void *, intptr_t, intptr_t); diff --git a/sys/netatm/uni/sscop_pdu.c b/sys/netatm/uni/sscop_pdu.c index e666065..eeed1a0 100644 --- a/sys/netatm/uni/sscop_pdu.c +++ b/sys/netatm/uni/sscop_pdu.c @@ -1232,10 +1232,7 @@ sscop_send_ud(sop, m) * */ void -sscop_pdu_print(sop, m, msg) - struct sscop *sop; - KBuffer *m; - char *msg; +sscop_pdu_print(const struct sscop *sop, const KBuffer *m, const char *msg) { char buf[128]; struct vccb *vcp; @@ -1245,4 +1242,3 @@ sscop_pdu_print(sop, m, msg) "sscop %s: vcc=(%d,%d)\n", msg, vcp->vc_vpi, vcp->vc_vci); atm_pdu_print(m, buf); } - diff --git a/sys/netatm/uni/sscop_var.h b/sys/netatm/uni/sscop_var.h index e4ddc42..9ba9ca6 100644 --- a/sys/netatm/uni/sscop_var.h +++ b/sys/netatm/uni/sscop_var.h @@ -168,7 +168,8 @@ int sscop_send_poll(struct sscop *); int sscop_send_stat(struct sscop *, sscop_seq); int sscop_send_ustat(struct sscop *, sscop_seq); int sscop_send_ud(struct sscop *, KBuffer *); -void sscop_pdu_print(struct sscop *, KBuffer *, char *); +void sscop_pdu_print(const struct sscop *, + const KBuffer *, const char *); /* sscop_sigaa.c */ void sscop_estreq_idle(struct sscop *, intptr_t, intptr_t); diff --git a/sys/netatm/uni/uniarp_input.c b/sys/netatm/uni/uniarp_input.c index 2beda86..b729c63 100644 --- a/sys/netatm/uni/uniarp_input.c +++ b/sys/netatm/uni/uniarp_input.c @@ -852,10 +852,7 @@ drop: * */ void -uniarp_pdu_print(ivp, m, msg) - struct ipvcc *ivp; - KBuffer *m; - char *msg; +uniarp_pdu_print(const struct ipvcc *ivp, const KBuffer *m, const char *msg) { char buf[128]; struct vccb *vcp; @@ -865,4 +862,3 @@ uniarp_pdu_print(ivp, m, msg) "uniarp %s: vcc=(%d,%d)\n", msg, vcp->vc_vpi, vcp->vc_vci); atm_pdu_print(m, buf); } - diff --git a/sys/netatm/uni/uniip_var.h b/sys/netatm/uni/uniip_var.h index 768790a..7d7ef3d 100644 --- a/sys/netatm/uni/uniip_var.h +++ b/sys/netatm/uni/uniip_var.h @@ -281,7 +281,8 @@ int uniarp_validate_ip(struct uniip *, struct in_addr *, u_int); /* uniarp_input.c */ void uniarp_cpcs_data(void *, KBuffer *); -void uniarp_pdu_print(struct ipvcc *, KBuffer *, char *); +void uniarp_pdu_print(const struct ipvcc *, + const KBuffer *, const char *); /* uniarp_output.c */ int uniarp_arp_req(struct uniip *, struct in_addr *); |