From a6ec04bc560863b683a76de6fcf8a681d94b09e0 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Fri, 22 Dec 2006 23:57:54 +0000 Subject: [PATCH] Rename printf -> kprintf in sys/ and add some defines where necessary (files which are used in userland, too). --- sys/netinet/if_atm.c | 8 +- sys/netinet/if_ether.c | 4 +- sys/netinet/igmp.c | 12 +- sys/netinet/in_gif.c | 6 +- sys/netinet/ip_icmp.c | 24 +- sys/netinet/ip_input.c | 20 +- sys/netinet/ip_output.c | 18 +- sys/netinet/sctp_asconf.c | 208 ++++++------- sys/netinet/sctp_indata.c | 118 ++++---- sys/netinet/sctp_input.c | 248 +++++++-------- sys/netinet/sctp_output.c | 284 +++++++++--------- sys/netinet/sctp_pcb.c | 114 +++---- sys/netinet/sctp_peeloff.c | 6 +- sys/netinet/sctp_timer.c | 68 ++--- sys/netinet/sctp_usrreq.c | 94 +++--- sys/netinet/sctputil.c | 74 ++--- sys/netinet/sctputil.h | 4 +- sys/netinet/tcp_debug.c | 30 +- sys/netinet/tcp_output.c | 4 +- sys/netinet/tcp_sack.c | 14 +- sys/netinet/tcp_subr.c | 6 +- sys/netinet/tcp_syncache.c | 6 +- sys/netinet6/ah_input.c | 14 +- sys/netinet6/esp_input.c | 16 +- sys/netinet6/in6.c | 6 +- sys/netinet6/in6_gif.c | 6 +- sys/netinet6/in6_ifattach.c | 16 +- sys/netinet6/in6_prefix.c | 4 +- sys/netinet6/in6_rmx.c | 4 +- sys/netinet6/ip6_forward.c | 10 +- sys/netinet6/ip6_input.c | 6 +- sys/netinet6/ip6_output.c | 14 +- sys/netinet6/ipsec.c | 64 ++-- sys/netinet6/nd6.c | 8 +- sys/netinet6/nd6_nbr.c | 10 +- sys/netinet6/nd6_rtr.c | 4 +- sys/netinet6/sctp6_usrreq.c | 12 +- sys/netinet6/udp6_usrreq.c | 4 +- sys/netproto/802_11/ieee80211_var.h | 4 +- sys/netproto/802_11/wlan/ieee80211.c | 6 +- sys/netproto/802_11/wlan/ieee80211_crypto.c | 10 +- .../802_11/wlan/ieee80211_dragonfly.c | 12 +- sys/netproto/802_11/wlan/ieee80211_input.c | 30 +- sys/netproto/802_11/wlan/ieee80211_node.c | 54 ++-- sys/netproto/802_11/wlan/ieee80211_output.c | 4 +- sys/netproto/802_11/wlan/ieee80211_proto.c | 72 ++--- sys/netproto/802_11/wlan/ieee80211_ratectl.c | 12 +- sys/netproto/802_11/wlan_acl/ieee80211_acl.c | 4 +- .../802_11/wlan_ccmp/ieee80211_crypto_ccmp.c | 4 +- .../amrr/ieee80211_ratectl_amrr.c | 8 +- .../onoe/ieee80211_ratectl_onoe.c | 8 +- .../802_11/wlan_tkip/ieee80211_crypto_tkip.c | 4 +- .../802_11/wlan_wep/ieee80211_crypto_wep.c | 4 +- sys/netproto/atalk/aarp.c | 8 +- sys/netproto/atalk/at_control.c | 14 +- sys/netproto/atalk/at_rmx.c | 32 +- sys/netproto/atalk/ddp_input.c | 8 +- sys/netproto/atalk/ddp_output.c | 16 +- sys/netproto/atm/atm_subr.c | 12 +- sys/netproto/atm/atm_sys.h | 30 +- sys/netproto/atm/spans/spans_kxdr.c | 10 +- sys/netproto/atm/spans/spans_msg.c | 6 +- sys/netproto/atm/spans/spans_print.c | 150 ++++----- sys/netproto/atm/spans/spans_util.c | 10 +- sys/netproto/atm/uni/unisig_print.c | 204 ++++++------- sys/netproto/atm/uni/unisig_util.c | 10 +- sys/netproto/ipsec/ipsec.c | 50 +-- sys/netproto/ipsec/ipsec.h | 4 +- sys/netproto/ipsec/ipsec_mbuf.c | 12 +- sys/netproto/ipsec/ipsec_output.c | 6 +- sys/netproto/ipsec/key.c | 48 +-- sys/netproto/ipsec/key_debug.c | 166 +++++----- sys/netproto/ipsec/keysock.c | 4 +- sys/netproto/ipsec/xform_ipip.c | 4 +- sys/netproto/ipx/ipx.c | 10 +- sys/netproto/ipx/ipx_input.c | 10 +- sys/netproto/ipx/spx_debug.c | 30 +- sys/netproto/ipx/spx_usrreq.c | 4 +- sys/netproto/key/key.c | 32 +- sys/netproto/key/key_debug.c | 165 +++++----- sys/netproto/key/keysock.c | 4 +- sys/netproto/natm/natm.c | 8 +- sys/netproto/natm/natm_pcb.c | 8 +- sys/netproto/ncp/ncp_conn.c | 8 +- sys/netproto/ncp/ncp_login.c | 4 +- sys/netproto/ncp/ncp_mod.c | 6 +- sys/netproto/ncp/ncp_ncp.c | 24 +- sys/netproto/ncp/ncp_nls.c | 8 +- sys/netproto/ncp/ncp_rq.c | 8 +- sys/netproto/ncp/ncp_sock.c | 6 +- sys/netproto/ncp/ncp_subr.c | 8 +- sys/netproto/ncp/ncp_subr.h | 12 +- sys/netproto/ns/ns.c | 4 +- sys/netproto/ns/ns_error.c | 14 +- sys/netproto/ns/ns_input.c | 8 +- sys/netproto/ns/spp_debug.c | 30 +- sys/netproto/ns/spp_usrreq.c | 4 +- sys/netproto/smb/smb_dev.c | 6 +- sys/netproto/smb/smb_subr.c | 10 +- sys/netproto/smb/smb_subr.h | 10 +- sys/netproto/smb/smb_trantcp.h | 4 +- 101 files changed, 1527 insertions(+), 1526 deletions(-) diff --git a/sys/netinet/if_atm.c b/sys/netinet/if_atm.c index 1a7336a70d..7d1639d214 100644 --- a/sys/netinet/if_atm.c +++ b/sys/netinet/if_atm.c @@ -32,7 +32,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/netinet/if_atm.c,v 1.8.2.1 2001/12/20 10:30:18 ru Exp $ - * $DragonFly: src/sys/netinet/if_atm.c,v 1.8 2006/01/14 11:33:50 swildner Exp $ + * $DragonFly: src/sys/netinet/if_atm.c,v 1.9 2006/12/22 23:57:52 swildner Exp $ */ /* @@ -93,7 +93,7 @@ atm_rtrequest(int req, struct rtentry *rt, struct rt_addrinfo *info) switch (req) { case RTM_RESOLVE: /* resolve: only happens when cloning */ - printf("atm_rtrequest: RTM_RESOLVE request detected?\n"); + kprintf("atm_rtrequest: RTM_RESOLVE request detected?\n"); break; case RTM_ADD: @@ -114,7 +114,7 @@ atm_rtrequest(int req, struct rtentry *rt, struct rt_addrinfo *info) } if ((rt->rt_flags & RTF_CLONING) != 0) { - printf("atm_rtrequest: cloning route detected?\n"); + kprintf("atm_rtrequest: cloning route detected?\n"); break; } if (gate->sa_family != AF_LINK || @@ -156,7 +156,7 @@ atm_rtrequest(int req, struct rtentry *rt, struct rt_addrinfo *info) (caddr_t)&api, NULL); lwkt_serialize_exit(rt->rt_ifp->if_serializer); if (error) { - printf("atm: couldn't add VC\n"); + kprintf("atm: couldn't add VC\n"); goto failed; } diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index a2acc7e522..36e29996ef 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -82,7 +82,7 @@ * * @(#)if_ether.c 8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/netinet/if_ether.c,v 1.64.2.23 2003/04/11 07:23:15 fjoe Exp $ - * $DragonFly: src/sys/netinet/if_ether.c,v 1.34 2006/07/20 16:22:48 corecode Exp $ + * $DragonFly: src/sys/netinet/if_ether.c,v 1.35 2006/12/22 23:57:52 swildner Exp $ */ /* @@ -893,7 +893,7 @@ reply: memcpy(ar_tha(ah), ar_sha(ah), ah->ar_hln); memcpy(ar_sha(ah), IF_LLADDR(ifp), ah->ar_hln); #ifdef DEBUG_PROXY - printf("arp: proxying for %s\n", inet_ntoa(itaddr)); + kprintf("arp: proxying for %s\n", inet_ntoa(itaddr)); #endif } else { struct sockaddr_dl *sdl; diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c index 3ff875ff67..ac63be9ce6 100644 --- a/sys/netinet/igmp.c +++ b/sys/netinet/igmp.c @@ -36,7 +36,7 @@ * * @(#)igmp.c 8.1 (Berkeley) 7/19/93 * $FreeBSD: src/sys/netinet/igmp.c,v 1.29.2.2 2003/01/23 21:06:44 sam Exp $ - * $DragonFly: src/sys/netinet/igmp.c,v 1.12 2006/01/14 11:33:50 swildner Exp $ + * $DragonFly: src/sys/netinet/igmp.c,v 1.13 2006/12/22 23:57:52 swildner Exp $ */ /* @@ -126,12 +126,12 @@ find_rti(struct ifnet *ifp) struct router_info *rti = Head; #ifdef IGMP_DEBUG - printf("[igmp.c, _find_rti] --> entering \n"); + kprintf("[igmp.c, _find_rti] --> entering \n"); #endif while (rti) { if (rti->rti_ifp == ifp) { #ifdef IGMP_DEBUG - printf("[igmp.c, _find_rti] --> found old entry \n"); + kprintf("[igmp.c, _find_rti] --> found old entry \n"); #endif return rti; } @@ -144,7 +144,7 @@ find_rti(struct ifnet *ifp) rti->rti_next = Head; Head = rti; #ifdef IGMP_DEBUG - printf("[igmp.c, _find_rti] --> created an entry \n"); + kprintf("[igmp.c, _find_rti] --> created an entry \n"); #endif return rti; } @@ -416,7 +416,7 @@ igmp_slowtimo(void) crit_enter(); #ifdef IGMP_DEBUG - printf("[igmp.c,_slowtimo] -- > entering \n"); + kprintf("[igmp.c,_slowtimo] -- > entering \n"); #endif while (rti) { if (rti->rti_type == IGMP_V1_ROUTER) { @@ -428,7 +428,7 @@ igmp_slowtimo(void) rti = rti->rti_next; } #ifdef IGMP_DEBUG - printf("[igmp.c,_slowtimo] -- > exiting \n"); + kprintf("[igmp.c,_slowtimo] -- > exiting \n"); #endif crit_exit(); } diff --git a/sys/netinet/in_gif.c b/sys/netinet/in_gif.c index 8e70b284e5..74684ac0e2 100644 --- a/sys/netinet/in_gif.c +++ b/sys/netinet/in_gif.c @@ -1,6 +1,6 @@ /* * $FreeBSD: src/sys/netinet/in_gif.c,v 1.5.2.11 2003/01/23 21:06:45 sam Exp $ - * $DragonFly: src/sys/netinet/in_gif.c,v 1.15 2005/03/04 03:48:25 hsu Exp $ + * $DragonFly: src/sys/netinet/in_gif.c,v 1.16 2006/12/22 23:57:52 swildner Exp $ * $KAME: in_gif.c,v 1.54 2001/05/14 14:02:16 itojun Exp $ */ /* @@ -139,7 +139,7 @@ in_gif_output(struct ifnet *ifp, int family, struct mbuf *m) #endif default: #ifdef DEBUG - printf("in_gif_output: warning: unknown family %d passed\n", + kprintf("in_gif_output: warning: unknown family %d passed\n", family); #endif m_freem(m); @@ -169,7 +169,7 @@ in_gif_output(struct ifnet *ifp, int family, struct mbuf *m) if (m && m->m_len < sizeof(struct ip)) m = m_pullup(m, sizeof(struct ip)); if (m == NULL) { - printf("ENOBUFS in in_gif_output %d\n", __LINE__); + kprintf("ENOBUFS in in_gif_output %d\n", __LINE__); return ENOBUFS; } bcopy(&iphdr, mtod(m, struct ip *), sizeof(struct ip)); diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index 13daeef28d..02098ef4fc 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -32,7 +32,7 @@ * * @(#)ip_icmp.c 8.2 (Berkeley) 1/4/94 * $FreeBSD: src/sys/netinet/ip_icmp.c,v 1.39.2.19 2003/01/24 05:11:34 sam Exp $ - * $DragonFly: src/sys/netinet/ip_icmp.c,v 1.25 2006/01/14 11:33:50 swildner Exp $ + * $DragonFly: src/sys/netinet/ip_icmp.c,v 1.26 2006/12/22 23:57:52 swildner Exp $ */ #include "opt_ipsec.h" @@ -150,7 +150,7 @@ icmp_error(struct mbuf *n, int type, int code, n_long dest, int destmtu) #ifdef ICMPPRINTFS if (icmpprintfs) - printf("icmp_error(%p, %d, %d)\n", oip, type, code); + kprintf("icmp_error(%p, %d, %d)\n", oip, type, code); #endif if (type != ICMP_REDIRECT) icmpstat.icps_error++; @@ -273,7 +273,7 @@ icmp_input(struct mbuf *m, ...) char buf[sizeof "aaa.bbb.ccc.ddd"]; strcpy(buf, inet_ntoa(ip->ip_src)); - printf("icmp_input from %s to %s, len %d\n", + kprintf("icmp_input from %s to %s, len %d\n", buf, inet_ntoa(ip->ip_dst), icmplen); } #endif @@ -312,7 +312,7 @@ icmp_input(struct mbuf *m, ...) #ifdef ICMPPRINTFS if (icmpprintfs) - printf("icmp_input, type %d code %d\n", icp->icmp_type, + kprintf("icmp_input, type %d code %d\n", icp->icmp_type, icp->icmp_code); #endif @@ -395,7 +395,7 @@ deliver: goto badcode; #ifdef ICMPPRINTFS if (icmpprintfs) - printf("deliver to protocol %d\n", icp->icmp_ip.ip_p); + kprintf("deliver to protocol %d\n", icp->icmp_ip.ip_p); #endif icmpsrc.sin_addr = icp->icmp_ip.ip_dst; #if 1 @@ -425,7 +425,7 @@ deliver: mtu = ip_next_mtu(rt->rt_rmx.rmx_mtu, 1); #ifdef DEBUG_MTUDISC - printf("MTU for %s reduced to %d\n", + kprintf("MTU for %s reduced to %d\n", inet_ntoa(icmpsrc.sin_addr), mtu); #endif if (mtu < 296) { @@ -535,7 +535,7 @@ reflect: src = ntohl(ip->ip_src.s_addr); dst = ntohl(icp->icmp_ip.ip_dst.s_addr); gw = ntohl(icp->icmp_gwaddr.s_addr); - printf("icmp redirect from %d.%d.%d.%d: " + kprintf("icmp redirect from %d.%d.%d.%d: " "%d.%d.%d.%d => %d.%d.%d.%d\n", (int)(src >> 24), (int)((src >> 16) & 0xff), (int)((src >> 8) & 0xff), (int)(src & 0xff), @@ -567,7 +567,7 @@ reflect: char buf[sizeof "aaa.bbb.ccc.ddd"]; strcpy(buf, inet_ntoa(icp->icmp_ip.ip_dst)); - printf("redirect dst %s to %s\n", + kprintf("redirect dst %s to %s\n", buf, inet_ntoa(icp->icmp_gwaddr)); } #endif @@ -679,7 +679,7 @@ match: if (opts) { #ifdef ICMPPRINTFS if (icmpprintfs) - printf("icmp_reflect optlen %d rt %d => ", + kprintf("icmp_reflect optlen %d rt %d => ", optlen, opts->m_len); #endif for (cnt = optlen; cnt > 0; cnt -= len, cp += len) { @@ -719,7 +719,7 @@ match: } #ifdef ICMPPRINTFS if (icmpprintfs) - printf("%d\n", opts->m_len); + kprintf("%d\n", opts->m_len); #endif } /* @@ -770,7 +770,7 @@ icmp_send(struct mbuf *m, struct mbuf *opts, struct route *rt) char buf[sizeof "aaa.bbb.ccc.ddd"]; strcpy(buf, inet_ntoa(ip->ip_dst)); - printf("icmp_send dst %s src %s\n", buf, inet_ntoa(ip->ip_src)); + kprintf("icmp_send dst %s src %s\n", buf, inet_ntoa(ip->ip_src)); } #endif ip_output(m, opts, rt, 0, NULL, NULL); @@ -873,7 +873,7 @@ badport_bandlim(int which) if ((unsigned int)dticks > hz) { if (lpackets[which] > icmplim && icmplim_output) { - printf("%s from %d to %d packets per second\n", + kprintf("%s from %d to %d packets per second\n", bandlimittype[which], lpackets[which], icmplim diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 86cc20269c..9849ddb7f9 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -82,7 +82,7 @@ * * @(#)ip_input.c 8.2 (Berkeley) 1/4/94 * $FreeBSD: src/sys/netinet/ip_input.c,v 1.130.2.52 2003/03/07 07:01:28 silby Exp $ - * $DragonFly: src/sys/netinet/ip_input.c,v 1.63 2006/09/05 00:55:48 dillon Exp $ + * $DragonFly: src/sys/netinet/ip_input.c,v 1.64 2006/12/22 23:57:52 swildner Exp $ */ #define _IP_VHL @@ -363,7 +363,7 @@ ip_init(void) inet_pfil_hook.ph_type = PFIL_TYPE_AF; inet_pfil_hook.ph_af = AF_INET; if ((i = pfil_head_register(&inet_pfil_hook)) != 0) { - printf("%s: WARNING: unable to register pfil hook, " + kprintf("%s: WARNING: unable to register pfil hook, " "error %d\n", __func__, i); } @@ -497,7 +497,7 @@ ip_input(struct mbuf *m) args.next_hop = (struct sockaddr_in *)m->m_hdr.mh_data; break; default: - printf("ip_input: unrecognised MT_TAG tag %d\n", + kprintf("ip_input: unrecognised MT_TAG tag %d\n", m->_m_tag_id); break; } @@ -1748,7 +1748,7 @@ save_rte(u_char *option, struct in_addr dst) olen = option[IPOPT_OLEN]; #ifdef DIAGNOSTIC if (ipprintfs) - printf("save_rte: olen %d\n", olen); + kprintf("save_rte: olen %d\n", olen); #endif if (olen > sizeof(ip_srcrt) - (1 + sizeof(dst))) return; @@ -1781,7 +1781,7 @@ ip_srcroute(void) OPTSIZ; #ifdef DIAGNOSTIC if (ipprintfs) - printf("ip_srcroute: nhops %d mlen %d", ip_nhops, m->m_len); + kprintf("ip_srcroute: nhops %d mlen %d", ip_nhops, m->m_len); #endif /* @@ -1791,7 +1791,7 @@ ip_srcroute(void) *(mtod(m, struct in_addr *)) = *p--; #ifdef DIAGNOSTIC if (ipprintfs) - printf(" hops %x", ntohl(mtod(m, struct in_addr *)->s_addr)); + kprintf(" hops %x", ntohl(mtod(m, struct in_addr *)->s_addr)); #endif /* @@ -1811,7 +1811,7 @@ ip_srcroute(void) while (p >= ip_srcrt.route) { #ifdef DIAGNOSTIC if (ipprintfs) - printf(" %x", ntohl(q->s_addr)); + kprintf(" %x", ntohl(q->s_addr)); #endif *q++ = *p--; } @@ -1821,7 +1821,7 @@ ip_srcroute(void) *q = ip_srcrt.dst; #ifdef DIAGNOSTIC if (ipprintfs) - printf(" %x\n", ntohl(q->s_addr)); + kprintf(" %x\n", ntohl(q->s_addr)); #endif return (m); } @@ -1892,7 +1892,7 @@ ip_forward(struct mbuf *m, boolean_t using_srcrt, struct sockaddr_in *next_hop) #ifdef DIAGNOSTIC if (ipprintfs) - printf("forward: src %x dst %x ttl %x\n", + kprintf("forward: src %x dst %x ttl %x\n", ip->ip_src.s_addr, pkt_dst.s_addr, ip->ip_ttl); #endif @@ -1990,7 +1990,7 @@ ip_forward(struct mbuf *m, boolean_t using_srcrt, struct sockaddr_in *next_hop) code = ICMP_REDIRECT_HOST; #ifdef DIAGNOSTIC if (ipprintfs) - printf("redirect (%d) to %x\n", code, dest); + kprintf("redirect (%d) to %x\n", code, dest); #endif } } diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 9eb2249be2..4144b226ff 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -28,7 +28,7 @@ * * @(#)ip_output.c 8.3 (Berkeley) 1/21/94 * $FreeBSD: src/sys/netinet/ip_output.c,v 1.99.2.37 2003/04/15 06:44:45 silby Exp $ - * $DragonFly: src/sys/netinet/ip_output.c,v 1.35 2006/09/05 00:55:48 dillon Exp $ + * $DragonFly: src/sys/netinet/ip_output.c,v 1.36 2006/12/22 23:57:52 swildner Exp $ */ #define _IP_VHL @@ -86,7 +86,7 @@ static MALLOC_DEFINE(M_IPMOPTS, "ip_moptions", "internet multicast options"); #include #include -#define print_ip(x, a, y) printf("%s %d.%d.%d.%d%s",\ +#define print_ip(x, a, y) kprintf("%s %d.%d.%d.%d%s",\ x, (ntohl(a.s_addr)>>24)&0xFF,\ (ntohl(a.s_addr)>>16)&0xFF,\ (ntohl(a.s_addr)>>8)&0xFF,\ @@ -172,7 +172,7 @@ ip_output(struct mbuf *m0, struct mbuf *opt, struct route *ro, args.next_hop = (struct sockaddr_in *)m0->m_data; break; default: - printf("ip_output: unrecognised MT_TAG tag %d\n", + kprintf("ip_output: unrecognised MT_TAG tag %d\n", m0->_m_tag_id); break; } @@ -479,7 +479,7 @@ sendit: case IPSEC_POLICY_ENTRUST: default: - printf("ip_output: Invalid policy found. %d\n", sp->policy); + kprintf("ip_output: Invalid policy found. %d\n", sp->policy); } { struct ipsec_output_state state; @@ -532,7 +532,7 @@ sendit: case ENOMEM: break; default: - printf("ip4_output (ipsec): error code %d\n", error); + kprintf("ip4_output (ipsec): error code %d\n", error); /*fall through*/ case ENOENT: /* don't show these error codes to the user */ @@ -552,7 +552,7 @@ sendit: #endif if (ro->ro_rt == NULL) { if (!(flags & IP_ROUTETOIF)) { - printf("ip_output: " + kprintf("ip_output: " "can't update route after IPsec processing\n"); error = EHOSTUNREACH; /*XXX*/ goto bad; @@ -1068,7 +1068,7 @@ done: #ifdef IPSEC if (sp != NULL) { KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP ip_output call free SP:%p\n", sp)); + kprintf("DP ip_output call free SP:%p\n", sp)); key_freesp(sp); } #endif @@ -1260,7 +1260,7 @@ in_delayed_cksum(struct mbuf *m) offset += m->m_pkthdr.csum_data; /* checksum offset */ if (offset + sizeof(u_short) > m->m_len) { - printf("delayed m_pullup, m->len: %d off: %d p: %d\n", + kprintf("delayed m_pullup, m->len: %d off: %d p: %d\n", m->m_len, offset, ip->ip_p); /* * XXX @@ -2184,7 +2184,7 @@ ip_mloopback(struct ifnet *ifp, struct mbuf *m, struct sockaddr_in *dst, */ #if 1 /* XXX */ if (dst->sin_family != AF_INET) { - printf("ip_mloopback: bad address family %d\n", + kprintf("ip_mloopback: bad address family %d\n", dst->sin_family); dst->sin_family = AF_INET; } diff --git a/sys/netinet/sctp_asconf.c b/sys/netinet/sctp_asconf.c index c76fe795fa..8db4ff40bf 100644 --- a/sys/netinet/sctp_asconf.c +++ b/sys/netinet/sctp_asconf.c @@ -1,5 +1,5 @@ /* $KAME: sctp_asconf.c,v 1.23 2004/08/17 06:28:01 t-momose Exp $ */ -/* $DragonFly: src/sys/netinet/sctp_asconf.c,v 1.3 2005/07/15 17:19:28 eirikn Exp $ */ +/* $DragonFly: src/sys/netinet/sctp_asconf.c,v 1.4 2006/12/22 23:57:52 swildner Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Cisco Systems, Inc. @@ -141,7 +141,7 @@ sctp_asconf_success_response(uint32_t id) if (m_reply == NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("asconf_success_response: couldn't get mbuf!\n"); + kprintf("asconf_success_response: couldn't get mbuf!\n"); } #endif /* SCTP_DEBUG */ return NULL; @@ -169,7 +169,7 @@ sctp_asconf_error_response(uint32_t id, uint16_t cause, uint8_t *error_tlv, if (m_reply == NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("asconf_error_response: couldn't get mbuf!\n"); + kprintf("asconf_error_response: couldn't get mbuf!\n"); } #endif /* SCTP_DEBUG */ return NULL; @@ -187,7 +187,7 @@ sctp_asconf_error_response(uint32_t id, uint16_t cause, uint8_t *error_tlv, if (aph->ph.param_length > MLEN) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("asconf_error_response: tlv_length (%xh) too big\n", + kprintf("asconf_error_response: tlv_length (%xh) too big\n", tlv_length); } #endif /* SCTP_DEBUG */ @@ -245,7 +245,7 @@ sctp_process_asconf_add_ip(struct sctp_asconf_paramhdr *aph, sin->sin_addr.s_addr = v4addr->addr; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("process_asconf_add_ip: adding "); + kprintf("process_asconf_add_ip: adding "); sctp_print_address(sa); } #endif /* SCTP_DEBUG */ @@ -265,7 +265,7 @@ sctp_process_asconf_add_ip(struct sctp_asconf_paramhdr *aph, sizeof(struct in6_addr)); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("process_asconf_add_ip: adding "); + kprintf("process_asconf_add_ip: adding "); sctp_print_address(sa); } #endif /* SCTP_DEBUG */ @@ -276,7 +276,7 @@ sctp_process_asconf_add_ip(struct sctp_asconf_paramhdr *aph, SCTP_ERROR_INVALID_PARAM, (uint8_t *)aph, aparam_length); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("process_asconf_add_ip: v6 disabled- skipping "); + kprintf("process_asconf_add_ip: v6 disabled- skipping "); sctp_print_address(sa); } #endif /* SCTP_DEBUG */ @@ -294,7 +294,7 @@ sctp_process_asconf_add_ip(struct sctp_asconf_paramhdr *aph, if (sctp_add_remote_addr(stcb, sa, 0, 6) != 0) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("process_asconf_add_ip: error adding address\n"); + kprintf("process_asconf_add_ip: error adding address\n"); } #endif /* SCTP_DEBUG */ m_reply = sctp_asconf_error_response(aph->correlation_id, @@ -380,7 +380,7 @@ sctp_process_asconf_delete_ip(struct mbuf *m, struct sctp_asconf_paramhdr *aph, sin->sin_addr.s_addr = v4addr->addr; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("process_asconf_delete_ip: deleting "); + kprintf("process_asconf_delete_ip: deleting "); sctp_print_address(sa); } #endif /* SCTP_DEBUG */ @@ -400,7 +400,7 @@ sctp_process_asconf_delete_ip(struct mbuf *m, struct sctp_asconf_paramhdr *aph, sizeof(struct in6_addr)); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("process_asconf_delete_ip: deleting "); + kprintf("process_asconf_delete_ip: deleting "); sctp_print_address(sa); } #endif /* SCTP_DEBUG */ @@ -408,7 +408,7 @@ sctp_process_asconf_delete_ip(struct mbuf *m, struct sctp_asconf_paramhdr *aph, /* IPv6 not enabled! No "action" needed; just ack it */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("process_asconf_delete_ip: v6 disabled- ignoring: "); + kprintf("process_asconf_delete_ip: v6 disabled- ignoring: "); sctp_print_address(sa); } #endif /* SCTP_DEBUG */ @@ -432,7 +432,7 @@ sctp_process_asconf_delete_ip(struct mbuf *m, struct sctp_asconf_paramhdr *aph, /* trying to delete the source address! */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("process_asconf_delete_ip: tried to delete source addr\n"); + kprintf("process_asconf_delete_ip: tried to delete source addr\n"); } #endif /* SCTP_DEBUG */ m_reply = sctp_asconf_error_response(aph->correlation_id, @@ -452,7 +452,7 @@ sctp_process_asconf_delete_ip(struct mbuf *m, struct sctp_asconf_paramhdr *aph, /* only one address in the asoc */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("process_asconf_delete_ip: tried to delete last IP addr!\n"); + kprintf("process_asconf_delete_ip: tried to delete last IP addr!\n"); } #endif /* SCTP_DEBUG */ m_reply = sctp_asconf_error_response(aph->correlation_id, @@ -506,7 +506,7 @@ sctp_process_asconf_set_primary(struct sctp_asconf_paramhdr *aph, sin->sin_addr.s_addr = v4addr->addr; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("process_asconf_set_primary: "); + kprintf("process_asconf_set_primary: "); sctp_print_address(sa); } #endif /* SCTP_DEBUG */ @@ -525,7 +525,7 @@ sctp_process_asconf_set_primary(struct sctp_asconf_paramhdr *aph, sizeof(struct in6_addr)); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("process_asconf_set_primary: "); + kprintf("process_asconf_set_primary: "); sctp_print_address(sa); } #endif /* SCTP_DEBUG */ @@ -533,7 +533,7 @@ sctp_process_asconf_set_primary(struct sctp_asconf_paramhdr *aph, /* IPv6 not enabled! No "action" needed; just ack it */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("process_asconf_set_primary: v6 disabled- ignoring: "); + kprintf("process_asconf_set_primary: v6 disabled- ignoring: "); sctp_print_address(sa); } #endif /* SCTP_DEBUG */ @@ -552,7 +552,7 @@ sctp_process_asconf_set_primary(struct sctp_asconf_paramhdr *aph, if (sctp_set_primary_addr(stcb, sa, NULL) == 0) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("process_asconf_set_primary: primary address set\n"); + kprintf("process_asconf_set_primary: primary address set\n"); } #endif /* SCTP_DEBUG */ /* notify upper layer */ @@ -565,7 +565,7 @@ sctp_process_asconf_set_primary(struct sctp_asconf_paramhdr *aph, /* couldn't set the requested primary address! */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("process_asconf_set_primary: set primary failed!\n"); + kprintf("process_asconf_set_primary: set primary failed!\n"); } #endif /* SCTP_DEBUG */ /* must have been an invalid address, so report */ @@ -600,7 +600,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset, struct sctp_asconf_chunk if (ntohs(cp->ch.chunk_length) < sizeof(struct sctp_asconf_chunk)) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("handle_asconf: chunk too small = %xh\n", + kprintf("handle_asconf: chunk too small = %xh\n", ntohs(cp->ch.chunk_length)); } #endif /* SCTP_DEBUG */ @@ -614,7 +614,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset, struct sctp_asconf_chunk /* got a duplicate ASCONF */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("handle_asconf: got duplicate serial number = %xh\n", + kprintf("handle_asconf: got duplicate serial number = %xh\n", serial_num); } #endif /* SCTP_DEBUG */ @@ -624,7 +624,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset, struct sctp_asconf_chunk } else if (serial_num != (asoc->asconf_seq_in + 1)) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("handle_asconf: incorrect serial number = %xh (expected next = %xh)\n", + kprintf("handle_asconf: incorrect serial number = %xh (expected next = %xh)\n", serial_num, asoc->asconf_seq_in+1); } #endif /* SCTP_DEBUG */ @@ -637,7 +637,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset, struct sctp_asconf_chunk asconf_limit = offset + ntohs(cp->ch.chunk_length); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("handle_asconf: asconf_limit=%u, sequence=%xh\n", + kprintf("handle_asconf: asconf_limit=%u, sequence=%xh\n", asconf_limit, serial_num); } #endif /* SCTP_DEBUG */ @@ -650,7 +650,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset, struct sctp_asconf_chunk if (m_ack == NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("handle_asconf: couldn't get mbuf!\n"); + kprintf("handle_asconf: couldn't get mbuf!\n"); } #endif /* SCTP_DEBUG */ return; @@ -673,7 +673,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset, struct sctp_asconf_chunk if (p_addr == NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("handle_asconf: couldn't get lookup addr!\n"); + kprintf("handle_asconf: couldn't get lookup addr!\n"); } #endif /* SCTP_DEBUG */ @@ -687,12 +687,12 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset, struct sctp_asconf_chunk aph = (struct sctp_asconf_paramhdr *)sctp_m_getptr(m, offset, sizeof(struct sctp_asconf_paramhdr), (uint8_t *)&aparam_buf); /* get pointer to first asconf param in ASCONF-ACK */ if (aph == NULL) { - printf("Gak in asconf\n"); + kprintf("Gak in asconf\n"); return; } ack_aph = (struct sctp_asconf_paramhdr *)(mtod(m_ack, caddr_t) + sizeof(struct sctp_asconf_ack_chunk)); if (ack_aph == NULL) { - printf("Gak in asconf2\n"); + kprintf("Gak in asconf2\n"); return; } @@ -712,7 +712,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset, struct sctp_asconf_chunk if (param_length > sizeof(aparam_buf)) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("handle_asconf: param length (%u) larger than buffer size!\n", param_length); + kprintf("handle_asconf: param length (%u) larger than buffer size!\n", param_length); } #endif /* SCTP_DEBUG */ sctp_m_freem(m_ack); @@ -721,7 +721,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset, struct sctp_asconf_chunk if (param_length <= sizeof(struct sctp_paramhdr)) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("handle_asconf: param length (%u) too short\n", param_length); + kprintf("handle_asconf: param length (%u) too short\n", param_length); } #endif /* SCTP_DEBUG */ sctp_m_freem(m_ack); @@ -730,7 +730,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset, struct sctp_asconf_chunk /* get the entire parameter */ aph = (struct sctp_asconf_paramhdr *)sctp_m_getptr(m, offset, param_length, aparam_buf); if (aph == NULL) { - printf("Gag\n"); + kprintf("Gag\n"); sctp_m_freem(m_ack); return; } @@ -776,7 +776,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset, struct sctp_asconf_chunk if (m_result != NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("handle_asconf: adding reply...\n"); + kprintf("handle_asconf: adding reply...\n"); } #endif /* SCTP_DEBUG */ m_tail->m_next = m_result; @@ -803,7 +803,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset, struct sctp_asconf_chunk /* can't get an asconf paramhdr */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("handle_asconf: can't get asconf param hdr!\n"); + kprintf("handle_asconf: can't get asconf param hdr!\n"); } #endif /* SCTP_DEBUG */ /* FIX ME - add error here... */ @@ -856,7 +856,7 @@ sctp_asconf_cleanup(struct sctp_tcb *stcb, struct sctp_nets *net) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("asconf_cleanup: marking peer ASCONF incapable and cleaning up\n"); + kprintf("asconf_cleanup: marking peer ASCONF incapable and cleaning up\n"); } #endif /* SCTP_DEBUG */ /* mark peer as ASCONF incapable */ @@ -921,7 +921,7 @@ sctp_asconf_queue_add(struct sctp_tcb *stcb, struct ifaddr *ifa, uint16_t type) if (stcb->asoc.peer_supports_asconf == 0) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("asconf_queue_add: peer doesn't support ASCONF\n"); + kprintf("asconf_queue_add: peer doesn't support ASCONF\n"); } #endif /* SCTP_DEBUG */ return (-1); @@ -937,7 +937,7 @@ sctp_asconf_queue_add(struct sctp_tcb *stcb, struct ifaddr *ifa, uint16_t type) if (aa->ap.aph.ph.param_type == type) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("asconf_queue_add: request already exists\n"); + kprintf("asconf_queue_add: request already exists\n"); } #endif /* SCTP_DEBUG */ return (-1); @@ -959,7 +959,7 @@ sctp_asconf_queue_add(struct sctp_tcb *stcb, struct ifaddr *ifa, uint16_t type) #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("asconf_queue_add: removing 'opposite' queued request\n"); + kprintf("asconf_queue_add: removing 'opposite' queued request\n"); } #endif /* SCTP_DEBUG */ return (-1); @@ -972,7 +972,7 @@ sctp_asconf_queue_add(struct sctp_tcb *stcb, struct ifaddr *ifa, uint16_t type) /* didn't get memory */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("asconf_queue_add: failed to get memory!\n"); + kprintf("asconf_queue_add: failed to get memory!\n"); } #endif /* SCTP_DEBUG */ return (-1); @@ -1026,7 +1026,7 @@ sctp_asconf_queue_add(struct sctp_tcb *stcb, struct ifaddr *ifa, uint16_t type) TAILQ_INSERT_HEAD(&stcb->asoc.asconf_queue, aa, next); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("asconf_queue_add: appended asconf ADD_IP_ADDRESS: %s\n", buf); + kprintf("asconf_queue_add: appended asconf ADD_IP_ADDRESS: %s\n", buf); } #endif /* SCTP_DEBUG */ } else { @@ -1035,9 +1035,9 @@ sctp_asconf_queue_add(struct sctp_tcb *stcb, struct ifaddr *ifa, uint16_t type) #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { if (type == SCTP_DEL_IP_ADDRESS) { - printf("asconf_queue_add: inserted asconf DEL_IP_ADDRESS: %s\n", buf); + kprintf("asconf_queue_add: inserted asconf DEL_IP_ADDRESS: %s\n", buf); } else { - printf("asconf_queue_add: inserted asconf SET_PRIM_ADDR: %s\n", buf); + kprintf("asconf_queue_add: inserted asconf SET_PRIM_ADDR: %s\n", buf); } } #endif /* SCTP_DEBUG */ @@ -1065,7 +1065,7 @@ sctp_asconf_queue_add_sa(struct sctp_tcb *stcb, struct sockaddr *sa, if (stcb->asoc.peer_supports_asconf == 0) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("asconf_queue_add_sa: peer doesn't support ASCONF\n"); + kprintf("asconf_queue_add_sa: peer doesn't support ASCONF\n"); } #endif /* SCTP_DEBUG */ return (-1); @@ -1082,7 +1082,7 @@ sctp_asconf_queue_add_sa(struct sctp_tcb *stcb, struct sockaddr *sa, if (aa->ap.aph.ph.param_type == type) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("asconf_queue_add_sa: request already exists\n"); + kprintf("asconf_queue_add_sa: request already exists\n"); } #endif /* SCTP_DEBUG */ return (-1); @@ -1101,7 +1101,7 @@ sctp_asconf_queue_add_sa(struct sctp_tcb *stcb, struct sockaddr *sa, FREE(aa, M_PCB); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("asconf_queue_add_sa: removing queued delete request\n"); + kprintf("asconf_queue_add_sa: removing queued delete request\n"); } #endif /* SCTP_DEBUG */ return (-1); @@ -1117,7 +1117,7 @@ sctp_asconf_queue_add_sa(struct sctp_tcb *stcb, struct sockaddr *sa, FREE(aa, M_PCB); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("asconf_queue_add_sa: removing queued add request\n"); + kprintf("asconf_queue_add_sa: removing queued add request\n"); } #endif /* SCTP_DEBUG */ return (-1); @@ -1130,7 +1130,7 @@ sctp_asconf_queue_add_sa(struct sctp_tcb *stcb, struct sockaddr *sa, /* didn't get memory */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("asconf_queue_add_sa: failed to get memory!\n"); + kprintf("asconf_queue_add_sa: failed to get memory!\n"); } #endif /* SCTP_DEBUG */ return (-1); @@ -1173,7 +1173,7 @@ sctp_asconf_queue_add_sa(struct sctp_tcb *stcb, struct sockaddr *sa, TAILQ_INSERT_HEAD(&stcb->asoc.asconf_queue, aa, next); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("asconf_queue_add_sa: appended asconf ADD_IP_ADDRESS\n"); + kprintf("asconf_queue_add_sa: appended asconf ADD_IP_ADDRESS\n"); } #endif /* SCTP_DEBUG */ } else { @@ -1182,9 +1182,9 @@ sctp_asconf_queue_add_sa(struct sctp_tcb *stcb, struct sockaddr *sa, #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { if (type == SCTP_DEL_IP_ADDRESS) { - printf("asconf_queue_add_sa: inserted asconf DEL_IP_ADDRESS\n"); + kprintf("asconf_queue_add_sa: inserted asconf DEL_IP_ADDRESS\n"); } else { - printf("asconf_queue_add_sa: inserted asconf SET_PRIM_ADDR\n"); + kprintf("asconf_queue_add_sa: inserted asconf SET_PRIM_ADDR\n"); } } #endif /* SCTP_DEBUG */ @@ -1233,7 +1233,7 @@ sctp_asconf_process_error(struct sctp_tcb *stcb, /* invalid error cause length */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("asconf_process_error: cause element too long\n"); + kprintf("asconf_process_error: cause element too long\n"); } #endif /* SCTP_DEBUG */ return; @@ -1243,7 +1243,7 @@ sctp_asconf_process_error(struct sctp_tcb *stcb, /* invalid included TLV length */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("asconf_process_error: included TLV too long\n"); + kprintf("asconf_process_error: included TLV too long\n"); } #endif /* SCTP_DEBUG */ return; @@ -1288,14 +1288,14 @@ sctp_asconf_process_param_ack(struct sctp_tcb *stcb, param_type = aparam->ap.aph.ph.param_type; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("process_param_ack: handling asconf parameter type=%xh\n", param_type); + kprintf("process_param_ack: handling asconf parameter type=%xh\n", param_type); } #endif /* SCTP_DEBUG */ switch (param_type) { case SCTP_ADD_IP_ADDRESS: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("process_param_ack: added IP address\n"); + kprintf("process_param_ack: added IP address\n"); } #endif /* SCTP_DEBUG */ sctp_asconf_addr_mgmt_ack(stcb, aparam->ifa, param_type, flag); @@ -1303,7 +1303,7 @@ sctp_asconf_process_param_ack(struct sctp_tcb *stcb, case SCTP_DEL_IP_ADDRESS: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("process_param_ack: deleted IP address\n"); + kprintf("process_param_ack: deleted IP address\n"); } #endif /* SCTP_DEBUG */ /* nothing really to do... lists already updated */ @@ -1355,7 +1355,7 @@ sctp_handle_asconf_ack(struct mbuf *m, int offset, if (ntohs(cp->ch.chunk_length) < sizeof(struct sctp_asconf_ack_chunk)) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("handle_asconf_ack: chunk too small = %xh\n", + kprintf("handle_asconf_ack: chunk too small = %xh\n", ntohs(cp->ch.chunk_length)); } #endif /* SCTP_DEBUG */ @@ -1382,7 +1382,7 @@ sctp_handle_asconf_ack(struct mbuf *m, int offset, SCTP_ERROR_ILLEGAL_ASCONF_ACK, NULL); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("handle_asconf_ack: got unexpected next serial number! Aborting asoc!\n"); + kprintf("handle_asconf_ack: got unexpected next serial number! Aborting asoc!\n"); } #endif /* SCTP_DEBUG */ return; @@ -1392,7 +1392,7 @@ sctp_handle_asconf_ack(struct mbuf *m, int offset, /* got a duplicate/unexpected ASCONF-ACK */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("handle_asconf_ack: got duplicate/unexpected serial number = %xh (expected = %xh)\n", serial_num, asoc->asconf_seq_out); + kprintf("handle_asconf_ack: got duplicate/unexpected serial number = %xh (expected = %xh)\n", serial_num, asoc->asconf_seq_out); } #endif /* SCTP_DEBUG */ return; @@ -1431,7 +1431,7 @@ sctp_handle_asconf_ack(struct mbuf *m, int offset, if (param_length > sizeof(aparam_buf)) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("param length (%u) larger than buffer size!\n", param_length); + kprintf("param length (%u) larger than buffer size!\n", param_length); } #endif /* SCTP_DEBUG */ sctp_asconf_ack_clear(stcb); @@ -1557,7 +1557,7 @@ sctp_is_desired_interface_type(struct ifaddr *ifa) default: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("ignoring interface type = %u\n", + kprintf("ignoring interface type = %u\n", ifa->ifa_ifp->if_type); } #endif /* SCTP_DEBUG */ @@ -1668,7 +1668,7 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, sctp_add_local_addr_assoc(stcb, ifa); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("addr_mgmt_assoc: added to pending list "); + kprintf("addr_mgmt_assoc: added to pending list "); sctp_print_address(ifa->ifa_addr); } #endif /* SCTP_DEBUG */ @@ -1690,7 +1690,7 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, /* we skip unspecifed addresses */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("addr_mgmt_assoc: unspecified IPv6 addr\n"); + kprintf("addr_mgmt_assoc: unspecified IPv6 addr\n"); } #endif /* SCTP_DEBUG */ return; @@ -1699,7 +1699,7 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, if (stcb->asoc.local_scope == 0) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("addr_mgmt_assoc: skipping link local IPv6 addr: %s\n", buf); + kprintf("addr_mgmt_assoc: skipping link local IPv6 addr: %s\n", buf); } #endif /* SCTP_DEBUG */ return; @@ -1708,7 +1708,7 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, if (sctp_is_scopeid_in_nets(stcb, ifa->ifa_addr) == 0) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("addr_mgmt_assoc: skipping link local IPv6 addr: %s, wrong scope_id\n", buf); + kprintf("addr_mgmt_assoc: skipping link local IPv6 addr: %s, wrong scope_id\n", buf); } #endif /* SCTP_DEBUG */ return; @@ -1718,7 +1718,7 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, IN6_IS_ADDR_SITELOCAL(&sin6->sin6_addr)) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("addr_mgmt_assoc: skipping site local IPv6 addr: %s\n", buf); + kprintf("addr_mgmt_assoc: skipping site local IPv6 addr: %s\n", buf); } #endif /* SCTP_DEBUG */ return; @@ -1748,7 +1748,7 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, /* we skip unspecifed addresses */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("addr_mgmt_assoc: unspecified IPv4 addr\n"); + kprintf("addr_mgmt_assoc: unspecified IPv4 addr\n"); } #endif /* SCTP_DEBUG */ return; @@ -1757,7 +1757,7 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, IN4_ISPRIVATE_ADDRESS(&sin->sin_addr)) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("addr_mgmt_assoc: skipping private IPv4 addr: %s\n", buf); + kprintf("addr_mgmt_assoc: skipping private IPv4 addr: %s\n", buf); } #endif /* SCTP_DEBUG */ return; @@ -1766,7 +1766,7 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, /* else, not AF_INET or AF_INET6, so skip */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("addr_mgmt_assoc: not AF_INET or AF_INET6\n"); + kprintf("addr_mgmt_assoc: not AF_INET or AF_INET6\n"); } #endif /* SCTP_DEBUG */ return; @@ -1917,7 +1917,7 @@ sctp_addr_mgmt_restrict_ep(struct sctp_inpcb *inp, struct ifaddr *ifa) SCTP_TCB_UNLOCK(stcb); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("restrict_ep: added addr to unusable list\n"); + kprintf("restrict_ep: added addr to unusable list\n"); } #endif /* SCTP_DEBUG */ } /* for each stcb */ @@ -1938,7 +1938,7 @@ sctp_addr_mgmt(struct ifaddr *ifa, uint16_t type) { if (!sctp_is_desired_interface_type(ifa)) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("sctp_addr_mgmt: ignoring this interface\n"); + kprintf("sctp_addr_mgmt: ignoring this interface\n"); } #endif /* SCTP_DEBUG */ return; @@ -1951,9 +1951,9 @@ sctp_addr_mgmt(struct ifaddr *ifa, uint16_t type) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { if (type == SCTP_ADD_IP_ADDRESS) - printf("sctp_addr_mgmt: kernel adds "); + kprintf("sctp_addr_mgmt: kernel adds "); else - printf("sctp_addr_mgmt: kernel deletes "); + kprintf("sctp_addr_mgmt: kernel deletes "); sctp_print_address(sa); } #endif /* SCTP_DEBUG */ @@ -2002,7 +2002,7 @@ sctp_delete_ip_address(struct ifaddr *ifa) if (!sctp_is_desired_interface_type(ifa)) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("sctp_delete_ip_address: ignoring this interface\n"); + kprintf("sctp_delete_ip_address: ignoring this interface\n"); } #endif /* SCTP_DEBUG */ return; @@ -2074,7 +2074,7 @@ sctp_set_primary_ip_address_sa(struct sctp_tcb *stcb, struct sockaddr *sa) } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("set_primary_ip_address_sa: queued on tcb=%p, ", + kprintf("set_primary_ip_address_sa: queued on tcb=%p, ", stcb); sctp_print_address(sa); } @@ -2082,7 +2082,7 @@ sctp_set_primary_ip_address_sa(struct sctp_tcb *stcb, struct sockaddr *sa) } else { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("set_primary_ip_address_sa: failed to add to queue on tcb=%p, ", + kprintf("set_primary_ip_address_sa: failed to add to queue on tcb=%p, ", stcb); sctp_print_address(sa); } @@ -2101,7 +2101,7 @@ sctp_set_primary_ip_address(struct ifaddr *ifa) if (!sctp_is_desired_interface_type(ifa)) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("set_primary_ip_address: ignoring this interface\n"); + kprintf("set_primary_ip_address: ignoring this interface\n"); } #endif /* SCTP_DEBUG */ return; @@ -2125,7 +2125,7 @@ sctp_set_primary_ip_address(struct ifaddr *ifa) } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("set_primary_ip_address: queued on stcb=%p, ", + kprintf("set_primary_ip_address: queued on stcb=%p, ", stcb); sctp_print_address(ifa->ifa_addr); } @@ -2133,7 +2133,7 @@ sctp_set_primary_ip_address(struct ifaddr *ifa) } else { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("set_primary_ip_address: failed to add to queue, "); + kprintf("set_primary_ip_address: failed to add to queue, "); sctp_print_address(ifa->ifa_addr); } #endif /* SCTP_DEBUG */ @@ -2213,7 +2213,7 @@ sctp_find_valid_localaddr_ep(struct sctp_tcb *stcb) if (laddr->ifa == NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("find_valid_localaddr_ep: laddr error\n"); + kprintf("find_valid_localaddr_ep: laddr error\n"); } #endif /* SCTP_DEBUG */ continue; @@ -2221,7 +2221,7 @@ sctp_find_valid_localaddr_ep(struct sctp_tcb *stcb) if (laddr->ifa->ifa_addr == NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("find_valid_localaddr_ep: laddr->ifa error\n"); + kprintf("find_valid_localaddr_ep: laddr->ifa error\n"); } #endif /* SCTP_DEBUG */ continue; @@ -2270,7 +2270,7 @@ sctp_compose_asconf(struct sctp_tcb *stcb) /* no mbuf's */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) - printf("compose_asconf: couldn't get chunk mbuf!\n"); + kprintf("compose_asconf: couldn't get chunk mbuf!\n"); #endif /* SCTP_DEBUG */ return (NULL); } @@ -2280,7 +2280,7 @@ sctp_compose_asconf(struct sctp_tcb *stcb) /* no mbuf's */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) - printf("compose_asconf: couldn't get mbuf!\n"); + kprintf("compose_asconf: couldn't get mbuf!\n"); #endif /* SCTP_DEBUG */ sctp_m_freem(m_asconf_chk); return (NULL); @@ -2290,7 +2290,7 @@ sctp_compose_asconf(struct sctp_tcb *stcb) /* failed to get cluster buffer */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) - printf("compose_asconf: couldn't get cluster!\n"); + kprintf("compose_asconf: couldn't get cluster!\n"); #endif /* SCTP_DEBUG */ sctp_m_freem(m_asconf_chk); sctp_m_freem(m_asconf); @@ -2414,7 +2414,7 @@ sctp_compose_asconf(struct sctp_tcb *stcb) /* uh oh... don't have any address?? */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) - printf("compose_asconf: no lookup addr!\n"); + kprintf("compose_asconf: no lookup addr!\n"); #endif /* SCTP_DEBUG */ /* for now, we send a IPv4 address of 0.0.0.0 */ lookup->ph.param_type = htons(SCTP_IPV4_ADDRESS); @@ -2458,7 +2458,7 @@ sctp_process_initack_addresses(struct sctp_tcb *stcb, struct mbuf *m, #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF2) { - printf("processing init-ack addresses\n"); + kprintf("processing init-ack addresses\n"); } #endif /* SCTP_DEBUG */ @@ -2468,7 +2468,7 @@ sctp_process_initack_addresses(struct sctp_tcb *stcb, struct mbuf *m, if ((offset + sizeof(struct sctp_paramhdr)) > length) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("process_initack_addrs: invalid offset?\n"); + kprintf("process_initack_addrs: invalid offset?\n"); } #endif /* SCTP_DEBUG */ return; @@ -2496,7 +2496,7 @@ sctp_process_initack_addresses(struct sctp_tcb *stcb, struct mbuf *m, /* get the entire IPv6 address param */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF2) { - printf("process_initack_addrs: checking IPv6 param\n"); + kprintf("process_initack_addrs: checking IPv6 param\n"); } #endif /* SCTP_DEBUG */ a6p = (struct sctp_ipv6addr_param *) @@ -2507,7 +2507,7 @@ sctp_process_initack_addresses(struct sctp_tcb *stcb, struct mbuf *m, a6p == NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("process_initack_addrs: invalid IPv6 param length\n"); + kprintf("process_initack_addrs: invalid IPv6 param length\n"); } #endif /* SCTP_DEBUG */ return; @@ -2520,7 +2520,7 @@ sctp_process_initack_addresses(struct sctp_tcb *stcb, struct mbuf *m, /* get the entire IPv4 address param */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF2) { - printf("process_initack_addrs: checking IPv4 param\n"); + kprintf("process_initack_addrs: checking IPv4 param\n"); } #endif /* SCTP_DEBUG */ a4p = (struct sctp_ipv4addr_param *)sctp_m_getptr(m, offset, sizeof(struct sctp_ipv4addr_param), (uint8_t *)&addr_store); @@ -2528,7 +2528,7 @@ sctp_process_initack_addresses(struct sctp_tcb *stcb, struct mbuf *m, a4p == NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("process_initack_addrs: invalid IPv4 param length\n"); + kprintf("process_initack_addrs: invalid IPv4 param length\n"); } #endif /* SCTP_DEBUG */ return; @@ -2538,7 +2538,7 @@ sctp_process_initack_addresses(struct sctp_tcb *stcb, struct mbuf *m, } else { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF2) { - printf("process_initack_addrs: skipping param type=%xh\n", ptype); + kprintf("process_initack_addrs: skipping param type=%xh\n", ptype); } #endif /* SCTP_DEBUG */ goto next_addr; @@ -2579,7 +2579,7 @@ sctp_process_initack_addresses(struct sctp_tcb *stcb, struct mbuf *m, SCTP_PCB_FLAGS_DO_ASCONF) == 0) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF2) { - printf("process_initack_addrs: adding local addr to asoc\n"); + kprintf("process_initack_addrs: adding local addr to asoc\n"); } #endif /* SCTP_DEBUG */ sctp_add_local_addr_assoc(stcb, ifa); @@ -2624,7 +2624,7 @@ sctp_addr_in_initack(struct sctp_tcb *stcb, struct mbuf *m, unsigned int offset, #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF2) { - printf("find_initack_addr: starting search for "); + kprintf("find_initack_addr: starting search for "); sctp_print_address(sa); } #endif /* SCTP_DEBUG */ @@ -2634,7 +2634,7 @@ sctp_addr_in_initack(struct sctp_tcb *stcb, struct mbuf *m, unsigned int offset, if ((offset + sizeof(struct sctp_paramhdr)) > length) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("find_initack_addr: invalid offset?\n"); + kprintf("find_initack_addr: invalid offset?\n"); } #endif /* SCTP_DEBUG */ return (0); @@ -2651,7 +2651,7 @@ sctp_addr_in_initack(struct sctp_tcb *stcb, struct mbuf *m, unsigned int offset, /* get the entire IPv6 address param */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF2) { - printf("addr_in_initack: checking IPv6 param\n"); + kprintf("addr_in_initack: checking IPv6 param\n"); } #endif /* SCTP_DEBUG */ a6p = (struct sctp_ipv6addr_param *) @@ -2662,7 +2662,7 @@ sctp_addr_in_initack(struct sctp_tcb *stcb, struct mbuf *m, unsigned int offset, ph == NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF2) { - printf("addr_in_initack: invalid IPv6 param length\n"); + kprintf("addr_in_initack: invalid IPv6 param length\n"); } #endif /* SCTP_DEBUG */ return (0); @@ -2680,7 +2680,7 @@ sctp_addr_in_initack(struct sctp_tcb *stcb, struct mbuf *m, unsigned int offset, /* found it */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF2) { - printf("addr_in_initack: found IPv6 addr\n"); + kprintf("addr_in_initack: found IPv6 addr\n"); } #endif /* SCTP_DEBUG */ return (1); @@ -2693,7 +2693,7 @@ sctp_addr_in_initack(struct sctp_tcb *stcb, struct mbuf *m, unsigned int offset, /* get the entire IPv4 address param */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF2) { - printf("addr_in_initack: checking IPv4 param\n"); + kprintf("addr_in_initack: checking IPv4 param\n"); } #endif /* SCTP_DEBUG */ a4p = (struct sctp_ipv4addr_param *)sctp_m_getptr(m, @@ -2703,7 +2703,7 @@ sctp_addr_in_initack(struct sctp_tcb *stcb, struct mbuf *m, unsigned int offset, ph == NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF2) { - printf("addr_in_initack: invalid IPv4 param length\n"); + kprintf("addr_in_initack: invalid IPv4 param length\n"); } #endif /* SCTP_DEBUG */ return (0); @@ -2713,7 +2713,7 @@ sctp_addr_in_initack(struct sctp_tcb *stcb, struct mbuf *m, unsigned int offset, /* found it */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF2) { - printf("addr_in_initack: found IPv4 addr\n"); + kprintf("addr_in_initack: found IPv4 addr\n"); } #endif /* SCTP_DEBUG */ return (1); @@ -2721,7 +2721,7 @@ sctp_addr_in_initack(struct sctp_tcb *stcb, struct mbuf *m, unsigned int offset, } else { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF2) { - printf("addr_in_initack: skipping param type=%xh\n", ptype); + kprintf("addr_in_initack: skipping param type=%xh\n", ptype); } #endif /* SCTP_DEBUG */ } @@ -2736,7 +2736,7 @@ sctp_addr_in_initack(struct sctp_tcb *stcb, struct mbuf *m, unsigned int offset, /* not found! */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("addr_in_initack: not found!\n"); + kprintf("addr_in_initack: not found!\n"); } #endif /* SCTP_DEBUG */ return (0); @@ -2759,7 +2759,7 @@ sctp_check_address_list_ep(struct sctp_tcb *stcb, struct mbuf *m, int offset, if (laddr->ifa == NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("check_addr_list_ep: laddr->ifa is NULL"); + kprintf("check_addr_list_ep: laddr->ifa is NULL"); } #endif continue; @@ -2767,7 +2767,7 @@ sctp_check_address_list_ep(struct sctp_tcb *stcb, struct mbuf *m, int offset, if (laddr->ifa->ifa_addr == NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("check_addr_list_ep: laddr->ifa->ifa_addr is NULL"); + kprintf("check_addr_list_ep: laddr->ifa->ifa_addr is NULL"); } #endif continue; @@ -2776,7 +2776,7 @@ sctp_check_address_list_ep(struct sctp_tcb *stcb, struct mbuf *m, int offset, if (sctp_cmpaddr(laddr->ifa->ifa_addr, init_addr)) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF2) { - printf("check_address_list_all: skipping "); + kprintf("check_address_list_all: skipping "); sctp_print_address(laddr->ifa->ifa_addr); } #endif /* SCTP_DEBUG */ @@ -2818,7 +2818,7 @@ sctp_check_address_list_all(struct sctp_tcb *stcb, struct mbuf *m, int offset, if (sctp_cmpaddr(ifa->ifa_addr, init_addr)) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF2) { - printf("check_address_list_all: skipping "); + kprintf("check_address_list_all: skipping "); sctp_print_address(ifa->ifa_addr); } #endif /* SCTP_DEBUG */ @@ -2899,7 +2899,7 @@ sctp_addr_mgmt_ep_sa(struct sctp_inpcb *inp, struct sockaddr *sa, uint16_t type) /* invalid address! */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_ASCONF1) { - printf("addr_mgmt_ep_sa: got invalid address!\n"); + kprintf("addr_mgmt_ep_sa: got invalid address!\n"); } #endif /* SCTP_DEBUG */ return (EADDRNOTAVAIL); diff --git a/sys/netinet/sctp_indata.c b/sys/netinet/sctp_indata.c index d7ff3b395f..f604217d8c 100644 --- a/sys/netinet/sctp_indata.c +++ b/sys/netinet/sctp_indata.c @@ -1,5 +1,5 @@ /* $KAME: sctp_indata.c,v 1.35 2004/08/17 04:06:17 itojun Exp $ */ -/* $DragonFly: src/sys/netinet/sctp_indata.c,v 1.5 2006/06/23 17:20:13 eirikn Exp $ */ +/* $DragonFly: src/sys/netinet/sctp_indata.c,v 1.6 2006/12/22 23:57:52 swildner Exp $ */ /* * Copyright (C) 2002, 2003, 2004 Cisco Systems Inc, @@ -124,13 +124,13 @@ sctp_set_rwnd(struct sctp_tcb *stcb, struct sctp_association *asoc) #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA4) { - printf("cc:%lu hiwat:%lu lowat:%lu mbcnt:%lu mbmax:%lu\n", + kprintf("cc:%lu hiwat:%lu lowat:%lu mbcnt:%lu mbmax:%lu\n", (u_long)stcb->sctp_socket->so_rcv.sb_cc, (u_long)stcb->sctp_socket->so_rcv.sb_hiwat, (u_long)stcb->sctp_socket->so_rcv.sb_lowat, (u_long)stcb->sctp_socket->so_rcv.sb_mbcnt, (u_long)stcb->sctp_socket->so_rcv.sb_mbmax); - printf("Setting rwnd to: sb:%ld - (del:%d + reasm:%d str:%d)\n", + kprintf("Setting rwnd to: sb:%ld - (del:%d + reasm:%d str:%d)\n", sctp_sbspace(&stcb->sctp_socket->so_rcv), asoc->size_on_delivery_queue, asoc->size_on_reasm_queue, @@ -175,11 +175,11 @@ sctp_set_rwnd(struct sctp_tcb *stcb, struct sctp_association *asoc) asoc->my_rwnd = 1; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA4) { - printf(" - SWS zeros\n"); + kprintf(" - SWS zeros\n"); } } else { if (sctp_debug_on & SCTP_DEBUG_INDATA4) { - printf("\n"); + kprintf("\n"); } #endif } @@ -295,7 +295,7 @@ sctp_deliver_data(struct sctp_tcb *stcb, struct sctp_association *asoc, #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("I am now in Deliver data! (%p)\n", chk); + kprintf("I am now in Deliver data! (%p)\n", chk); } #endif /* get a write lock on the inp if not already */ @@ -310,7 +310,7 @@ sctp_deliver_data(struct sctp_tcb *stcb, struct sctp_association *asoc, /* socket above is long gone */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("gone is gone!\n"); + kprintf("gone is gone!\n"); } #endif if (chk != NULL) { @@ -359,7 +359,7 @@ sctp_deliver_data(struct sctp_tcb *stcb, struct sctp_association *asoc, */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("Fragmented delivery in progress?\n"); + kprintf("Fragmented delivery in progress?\n"); } #endif if (hold_locks == 0) @@ -372,7 +372,7 @@ sctp_deliver_data(struct sctp_tcb *stcb, struct sctp_association *asoc, /* Nothing in queue */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("Nothing in queue?\n"); + kprintf("Nothing in queue?\n"); } #endif asoc->size_on_delivery_queue = 0; @@ -390,7 +390,7 @@ sctp_deliver_data(struct sctp_tcb *stcb, struct sctp_association *asoc, } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("Now to the delivery with chk(%p)!\n", chk); + kprintf("Now to the delivery with chk(%p)!\n", chk); } #endif /* XXX need to append PKTHDR to the socket buffer first */ @@ -444,7 +444,7 @@ sctp_deliver_data(struct sctp_tcb *stcb, struct sctp_association *asoc, to = (struct sockaddr *)sctp_recover_scope((struct sockaddr_in6 *)to, &lsa6); if (((struct sockaddr_in *)to)->sin_port == 0) { - printf("Huh a, port is %d not net:%x %d?\n", + kprintf("Huh a, port is %d not net:%x %d?\n", ((struct sockaddr_in *)to)->sin_port, (u_int)chk->whoTo, (int)(ntohs(stcb->rport))); @@ -495,7 +495,7 @@ sctp_deliver_data(struct sctp_tcb *stcb, struct sctp_association *asoc, /* Pull it off the queue */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("Free_it true, doing tickle wakeup\n"); + kprintf("Free_it true, doing tickle wakeup\n"); } #endif sctp_sorwakeup(stcb->sctp_ep, stcb->sctp_socket); @@ -665,7 +665,7 @@ sctp_service_reassembly(struct sctp_tcb *stcb, struct sctp_association *asoc, in to = (struct sockaddr *)sctp_recover_scope((struct sockaddr_in6 *)to, &lsa6); if (((struct sockaddr_in *)to)->sin_port == 0) { - printf("Huh b, port is %d not net:%x %d?\n", + kprintf("Huh b, port is %d not net:%x %d?\n", ((struct sockaddr_in *)to)->sin_port, (u_int)chk->whoTo, (int)(ntohs(stcb->rport))); @@ -832,7 +832,7 @@ sctp_queue_data_to_stream(struct sctp_tcb *stcb, struct sctp_association *asoc, #endif #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("queue to stream called for ssn:%u lastdel:%u nxt:%u\n", + kprintf("queue to stream called for ssn:%u lastdel:%u nxt:%u\n", (u_int)chk->rec.data.stream_seq, (u_int)strm->last_sequence_delivered, (u_int)nxt_todel); } @@ -843,7 +843,7 @@ sctp_queue_data_to_stream(struct sctp_tcb *stcb, struct sctp_association *asoc, /* The incoming sseq is behind where we last delivered? */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("Duplicate S-SEQ:%d delivered:%d from peer, Abort association\n", + kprintf("Duplicate S-SEQ:%d delivered:%d from peer, Abort association\n", chk->rec.data.stream_seq, strm->last_sequence_delivered); } @@ -877,7 +877,7 @@ sctp_queue_data_to_stream(struct sctp_tcb *stcb, struct sctp_association *asoc, /* can be delivered right away */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("It's NEXT!\n"); + kprintf("It's NEXT!\n"); } #endif #ifdef SCTP_STR_LOGGING @@ -922,7 +922,7 @@ sctp_queue_data_to_stream(struct sctp_tcb *stcb, struct sctp_association *asoc, */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("Queue Needed!\n"); + kprintf("Queue Needed!\n"); } #endif if (TAILQ_EMPTY(&strm->inqueue)) { @@ -998,7 +998,7 @@ sctp_queue_data_to_stream(struct sctp_tcb *stcb, struct sctp_association *asoc, #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("Doing WAKEUP!\n"); + kprintf("Doing WAKEUP!\n"); } #endif sctp_sorwakeup(stcb->sctp_ep, stcb->sctp_socket); @@ -1081,7 +1081,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc, */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("Gak, Evil plot, its not first, no fragmented delivery in progress\n"); + kprintf("Gak, Evil plot, its not first, no fragmented delivery in progress\n"); } #endif MGET(oper, MB_DONTWAIT, MT_DATA); @@ -1111,7 +1111,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc, */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("Gak, Evil plot, it IS a first and fragmented delivery in progress\n"); + kprintf("Gak, Evil plot, it IS a first and fragmented delivery in progress\n"); } #endif MGET(oper, MB_DONTWAIT, MT_DATA); @@ -1139,7 +1139,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc, /* Got to be the right STR No */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("Gak, Evil plot, it IS not same stream number %d vs %d\n", + kprintf("Gak, Evil plot, it IS not same stream number %d vs %d\n", chk->rec.data.stream_number, asoc->str_of_pdapi); } @@ -1170,7 +1170,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc, /* Got to be the right STR Seq */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("Gak, Evil plot, it IS not same stream seq %d vs %d\n", + kprintf("Gak, Evil plot, it IS not same stream seq %d vs %d\n", chk->rec.data.stream_seq, asoc->ssn_of_pdapi); } @@ -1271,8 +1271,8 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc, SCTP_DATA_FIRST_FRAG) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("Prev check - It can be a midlle or last but not a first\n"); - printf("Gak, Evil plot, it's a FIRST!\n"); + kprintf("Prev check - It can be a midlle or last but not a first\n"); + kprintf("Gak, Evil plot, it's a FIRST!\n"); } #endif MGET(oper, MB_DONTWAIT, MT_DATA); @@ -1306,7 +1306,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc, */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("Prev check - Gak, Evil plot, ssn:%d not the same as at:%d\n", + kprintf("Prev check - Gak, Evil plot, ssn:%d not the same as at:%d\n", chk->rec.data.stream_number, prev->rec.data.stream_number); } @@ -1344,7 +1344,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc, */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("Prev check - Gak, Evil plot, sseq:%d not the same as at:%d\n", + kprintf("Prev check - Gak, Evil plot, sseq:%d not the same as at:%d\n", chk->rec.data.stream_seq, prev->rec.data.stream_seq); } @@ -1380,7 +1380,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc, SCTP_DATA_FIRST_FRAG) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("Prev check - Gak, evil plot, its not FIRST and it must be!\n"); + kprintf("Prev check - Gak, evil plot, its not FIRST and it must be!\n"); } #endif MGET(oper, MB_DONTWAIT, MT_DATA); @@ -1424,8 +1424,8 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc, != SCTP_DATA_LAST_FRAG) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("Next chk - Next is FIRST, we must be LAST\n"); - printf("Gak, Evil plot, its not a last!\n"); + kprintf("Next chk - Next is FIRST, we must be LAST\n"); + kprintf("Gak, Evil plot, its not a last!\n"); } #endif MGET(oper, MB_DONTWAIT, MT_DATA); @@ -1461,8 +1461,8 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc, SCTP_DATA_LAST_FRAG) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("Next chk - Next is a MIDDLE/LAST\n"); - printf("Gak, Evil plot, new prev chunk is a LAST\n"); + kprintf("Next chk - Next is a MIDDLE/LAST\n"); + kprintf("Gak, Evil plot, new prev chunk is a LAST\n"); } #endif MGET(oper, MB_DONTWAIT, MT_DATA); @@ -1496,7 +1496,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc, */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("Next chk - Gak, Evil plot, ssn:%d not the same as at:%d\n", + kprintf("Next chk - Gak, Evil plot, ssn:%d not the same as at:%d\n", chk->rec.data.stream_number, next->rec.data.stream_number); } @@ -1534,7 +1534,7 @@ sctp_queue_data_for_reasm(struct sctp_tcb *stcb, struct sctp_association *asoc, */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("Next chk - Gak, Evil plot, sseq:%d not the same as at:%d\n", + kprintf("Next chk - Gak, Evil plot, sseq:%d not the same as at:%d\n", chk->rec.data.stream_seq, next->rec.data.stream_seq); } @@ -1786,7 +1786,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struct sctp_association *asoc, /* Nope not in the valid range dump it */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("My rwnd overrun1:tsn:%lx rwnd %lu sbspace:%ld delq:%d!\n", + kprintf("My rwnd overrun1:tsn:%lx rwnd %lu sbspace:%ld delq:%d!\n", (u_long)tsn, (u_long)asoc->my_rwnd, sctp_sbspace(&stcb->sctp_socket->so_rcv), stcb->asoc.cnt_on_delivery_queue); @@ -1854,7 +1854,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struct sctp_association *asoc, /* The incoming sseq is behind where we last delivered? */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("EVIL/Broken-Dup S-SEQ:%d delivered:%d from peer, Abort!\n", + kprintf("EVIL/Broken-Dup S-SEQ:%d delivered:%d from peer, Abort!\n", strmseq, asoc->strmin[strmno].last_sequence_delivered); } @@ -1973,7 +1973,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struct sctp_association *asoc, to = (struct sockaddr *)sctp_recover_scope((struct sockaddr_in6 *)to, &lsa6); if (((struct sockaddr_in *)to)->sin_port == 0) { - printf("Huh c, port is %d not net:%x %d?\n", + kprintf("Huh c, port is %d not net:%x %d?\n", ((struct sockaddr_in *)to)->sin_port, (u_int)net, (int)(ntohs(stcb->rport))); @@ -2027,7 +2027,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struct sctp_association *asoc, #endif #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("Express Delivery succeeds\n"); + kprintf("Express Delivery succeeds\n"); } #endif goto finish_express_del; @@ -2331,7 +2331,7 @@ sctp_sack_check(struct sctp_tcb *stcb, int ok_to_sack, int was_a_gap, int *abort distance < 0) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("Ugh bad addition.. you can't hrumpp!\n"); + kprintf("Ugh bad addition.. you can't hrumpp!\n"); } #endif /* @@ -2406,7 +2406,7 @@ sctp_sack_check(struct sctp_tcb *stcb, int ok_to_sack, int was_a_gap, int *abort } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT4) { - printf("%s:%d sends a shutdown\n", + kprintf("%s:%d sends a shutdown\n", __FILE__, __LINE__ ); @@ -2593,7 +2593,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *offset, int length, ch = (struct sctp_data_chunk *)sctp_m_getptr(m, *offset, sizeof(chunk_buf), (u_int8_t *)&chunk_buf); if (ch == NULL) { - printf(" ... its short\n"); + kprintf(" ... its short\n"); return (1); } /* @@ -2602,7 +2602,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *offset, int length, #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("In process data off:%d length:%d iphlen:%d ch->type:%d\n", + kprintf("In process data off:%d length:%d iphlen:%d ch->type:%d\n", *offset, length, iphlen, (int)ch->ch.chunk_type); } #endif @@ -2639,7 +2639,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *offset, int length, } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("A chunk of len:%d to process (tot:%d)\n", + kprintf("A chunk of len:%d to process (tot:%d)\n", chk_length, length - *offset); } #endif @@ -2658,7 +2658,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *offset, int length, num_chunks++; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("Now incr num_chunks to %d\n", + kprintf("Now incr num_chunks to %d\n", num_chunks); } #endif @@ -2870,7 +2870,7 @@ sctp_handle_segments(struct sctp_tcb *stcb, struct sctp_association *asoc, #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA3) { - printf("Hmm. one that is in RESEND that is now ACKED\n"); + kprintf("Hmm. one that is in RESEND that is now ACKED\n"); } #endif asoc->sent_queue_retran_cnt--; @@ -2880,7 +2880,7 @@ sctp_handle_segments(struct sctp_tcb *stcb, struct sctp_association *asoc, #endif if (asoc->sent_queue_retran_cnt < 0) { - printf("huh3 retran went negative?\n"); + kprintf("huh3 retran went negative?\n"); #ifdef SCTP_AUDITING_ENABLED sctp_auditing(30, inp, tcb, @@ -3325,7 +3325,7 @@ sctp_try_advance_peer_ack_point(struct sctp_tcb *stcb, sctp_free_bufspace(stcb, asoc, tp1); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT2) { - printf("--total out:%lu total_mbuf_out:%lu\n", + kprintf("--total out:%lu total_mbuf_out:%lu\n", (u_long)asoc->total_output_queue_size, (u_long)asoc->total_output_mbuf_queue_size); } @@ -3556,7 +3556,7 @@ sctp_handle_sack(struct sctp_sack_chunk *ch, struct sctp_tcb *stcb, if (asoc->sent_queue_retran_cnt) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("Handling SACK for asoc:%p retran:%d\n", + kprintf("Handling SACK for asoc:%p retran:%d\n", asoc, asoc->sent_queue_retran_cnt); } #endif @@ -3592,7 +3592,7 @@ sctp_handle_sack(struct sctp_sack_chunk *ch, struct sctp_tcb *stcb, if (sack_length < sizeof(struct sctp_sack_chunk)) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("Bad size on sack chunk .. to small\n"); + kprintf("Bad size on sack chunk .. to small\n"); } #endif return; @@ -3644,7 +3644,7 @@ sctp_handle_sack(struct sctp_sack_chunk *ch, struct sctp_tcb *stcb, if (asoc->sent_queue_retran_cnt) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("cum_ack:%lx num_seg:%u last_acked_seq:%x\n", + kprintf("cum_ack:%lx num_seg:%u last_acked_seq:%x\n", cum_ack, (u_int)num_seg, asoc->last_acked_seq); } #endif @@ -3661,7 +3661,7 @@ sctp_handle_sack(struct sctp_sack_chunk *ch, struct sctp_tcb *stcb, if (asoc->sent_queue_retran_cnt) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("The cum-ack is behind us\n"); + kprintf("The cum-ack is behind us\n"); } #endif } @@ -3678,7 +3678,7 @@ sctp_handle_sack(struct sctp_sack_chunk *ch, struct sctp_tcb *stcb, if (asoc->sent_queue_retran_cnt) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("Huh? retran set but none on queue\n"); + kprintf("Huh? retran set but none on queue\n"); } #endif asoc->sent_queue_retran_cnt = 0; @@ -3771,7 +3771,7 @@ sctp_handle_sack(struct sctp_sack_chunk *ch, struct sctp_tcb *stcb, if (tp1->sent == SCTP_DATAGRAM_RESEND) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA3) { - printf("Hmm. one that is in RESEND that is now ACKED\n"); + kprintf("Hmm. one that is in RESEND that is now ACKED\n"); } #endif asoc->sent_queue_retran_cnt--; @@ -3780,7 +3780,7 @@ sctp_handle_sack(struct sctp_sack_chunk *ch, struct sctp_tcb *stcb, (asoc->sent_queue_retran_cnt & 0x000000ff)); #endif if (asoc->sent_queue_retran_cnt < 0) { - printf("huh4 retran went negative?\n"); + kprintf("huh4 retran went negative?\n"); #ifdef SCTP_AUDITING_ENABLED sctp_auditing(31, inp, tcb, NULL); @@ -3900,7 +3900,7 @@ sctp_handle_sack(struct sctp_sack_chunk *ch, struct sctp_tcb *stcb, sctp_free_bufspace(stcb, asoc, tp1); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT2) { - printf("--total out:%lu total_mbuf_out:%lu\n", + kprintf("--total out:%lu total_mbuf_out:%lu\n", (u_long)asoc->total_output_queue_size, (u_long)asoc->total_output_mbuf_queue_size); } @@ -4153,7 +4153,7 @@ sctp_handle_sack(struct sctp_sack_chunk *ch, struct sctp_tcb *stcb, asoc->state = SCTP_STATE_SHUTDOWN_SENT; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT4) { - printf("%s:%d sends a shutdown\n", + kprintf("%s:%d sends a shutdown\n", __FILE__, __LINE__ ); @@ -4304,7 +4304,7 @@ sctp_handle_sack(struct sctp_sack_chunk *ch, struct sctp_tcb *stcb, if (compare_with_wrap(asoc->last_acked_seq, asoc->nonce_wait_tsn, MAX_TSN) || (asoc->last_acked_seq == asoc->nonce_wait_tsn)) { /* Misbehaving peer. We need to react to this guy */ - printf("Mis-behaving peer detected\n"); + kprintf("Mis-behaving peer detected\n"); asoc->ecn_allowed = 0; asoc->ecn_nonce_allowed = 0; } @@ -4507,7 +4507,7 @@ sctp_handle_forward_tsn(struct sctp_tcb *stcb, if ((fwd_sz = ntohs(fwd->ch.chunk_length)) < sizeof(struct sctp_forward_tsn_chunk)) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("Bad size too small/big fwd-tsn\n"); + kprintf("Bad size too small/big fwd-tsn\n"); } #endif return; @@ -4712,7 +4712,7 @@ sctp_handle_forward_tsn(struct sctp_tcb *stcb, num_str = fwd_sz/sizeof(struct sctp_strseq); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("Using NEW method, %d strseq's reported in FWD-TSN\n", + kprintf("Using NEW method, %d strseq's reported in FWD-TSN\n", num_str); } #endif @@ -4729,7 +4729,7 @@ sctp_handle_forward_tsn(struct sctp_tcb *stcb, if (stseq[i].stream > asoc->streamincnt) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INDATA1) { - printf("Bogus stream number %d " + kprintf("Bogus stream number %d " "streamincnt is %d\n", stseq[i].stream, asoc->streamincnt); } diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index 0d3d770018..4bf680a2c4 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -1,5 +1,5 @@ /* $KAME: sctp_input.c,v 1.27 2005/03/06 16:04:17 itojun Exp $ */ -/* $DragonFly: src/sys/netinet/sctp_input.c,v 1.9 2006/06/23 17:20:13 eirikn Exp $ */ +/* $DragonFly: src/sys/netinet/sctp_input.c,v 1.10 2006/12/22 23:57:52 swildner Exp $ */ /* * Copyright (C) 2002, 2003, 2004 Cisco Systems Inc, @@ -127,7 +127,7 @@ sctp_handle_init(struct mbuf *m, int iphlen, int offset, struct mbuf *op_err; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("sctp_handle_init: handling INIT tcb:%p\n", stcb); + kprintf("sctp_handle_init: handling INIT tcb:%p\n", stcb); } #endif op_err = NULL; @@ -173,7 +173,7 @@ sctp_handle_init(struct mbuf *m, int iphlen, int offset, /* send an INIT-ACK w/cookie */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("sctp_handle_init: sending INIT-ACK\n"); + kprintf("sctp_handle_init: sending INIT-ACK\n"); } #endif @@ -276,7 +276,7 @@ sctp_process_init(struct sctp_init_chunk *cp, struct sctp_tcb *stcb, /* we didn't get memory for the streams! */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("process_init: couldn't get memory for the streams!\n"); + kprintf("process_init: couldn't get memory for the streams!\n"); } #endif return (-1); @@ -462,7 +462,7 @@ sctp_handle_heartbeat_ack(struct sctp_heartbeat_chunk *cp, } else { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("unsupported address family"); + kprintf("unsupported address family"); } #endif return; @@ -471,7 +471,7 @@ sctp_handle_heartbeat_ack(struct sctp_heartbeat_chunk *cp, if (r_net == NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("Huh? I can't find the address I sent it to, discard\n"); + kprintf("Huh? I can't find the address I sent it to, discard\n"); } #endif return; @@ -513,7 +513,7 @@ sctp_handle_abort(struct sctp_abort_chunk *cp, #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("sctp_handle_abort: handling ABORT\n"); + kprintf("sctp_handle_abort: handling ABORT\n"); } #endif if (stcb == NULL) @@ -530,7 +530,7 @@ sctp_handle_abort(struct sctp_abort_chunk *cp, sctp_free_assoc(stcb->sctp_ep, stcb); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("sctp_handle_abort: finished\n"); + kprintf("sctp_handle_abort: finished\n"); } #endif } @@ -544,7 +544,7 @@ sctp_handle_shutdown(struct sctp_shutdown_chunk *cp, #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("sctp_handle_shutdown: handling SHUTDOWN\n"); + kprintf("sctp_handle_shutdown: handling SHUTDOWN\n"); } #endif if (stcb == NULL) @@ -559,7 +559,7 @@ sctp_handle_shutdown(struct sctp_shutdown_chunk *cp, /* update current data status */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("Warning Shutdown NOT the expected size.. skipping (%d:%d)\n", + kprintf("Warning Shutdown NOT the expected size.. skipping (%d:%d)\n", ntohs(cp->ch.chunk_length), (int)sizeof(struct sctp_shutdown_chunk)); } @@ -575,7 +575,7 @@ sctp_handle_shutdown(struct sctp_shutdown_chunk *cp, asoc->state = SCTP_STATE_SHUTDOWN_RECEIVED; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("Moving to SHUTDOWN-RECEIVED state\n"); + kprintf("Moving to SHUTDOWN-RECEIVED state\n"); } #endif /* notify upper layer that peer has initiated a shutdown */ @@ -618,7 +618,7 @@ sctp_handle_shutdown(struct sctp_shutdown_chunk *cp, } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("some_on_streamwheel:%d send_q_empty:%d sent_q_empty:%d\n", + kprintf("some_on_streamwheel:%d send_q_empty:%d sent_q_empty:%d\n", some_on_streamwheel, !TAILQ_EMPTY(&asoc->send_queue), !TAILQ_EMPTY(&asoc->sent_queue)); @@ -637,7 +637,7 @@ sctp_handle_shutdown(struct sctp_shutdown_chunk *cp, asoc->state = SCTP_STATE_SHUTDOWN_ACK_SENT; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("moving to SHUTDOWN_ACK state\n"); + kprintf("moving to SHUTDOWN_ACK state\n"); } #endif /* start SHUTDOWN timer */ @@ -654,7 +654,7 @@ sctp_handle_shutdown_ack(struct sctp_shutdown_ack_chunk *cp, #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("sctp_handle_shutdown_ack: handling SHUTDOWN ACK\n"); + kprintf("sctp_handle_shutdown_ack: handling SHUTDOWN ACK\n"); } #endif if (stcb == NULL) @@ -707,13 +707,13 @@ sctp_process_unrecog_chunk(struct sctp_tcb *stcb, struct sctp_paramhdr *phdr, case SCTP_ASCONF_ACK: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("Strange peer, snds ASCONF but does not recongnize asconf-ack?\n"); + kprintf("Strange peer, snds ASCONF but does not recongnize asconf-ack?\n"); } #endif case SCTP_ASCONF: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("Peer does not support ASCONF/ASCONF-ACK chunks\n"); + kprintf("Peer does not support ASCONF/ASCONF-ACK chunks\n"); } #endif /* SCTP_DEBUG */ sctp_asconf_cleanup(stcb, net); @@ -724,7 +724,7 @@ sctp_process_unrecog_chunk(struct sctp_tcb *stcb, struct sctp_paramhdr *phdr, default: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("Peer does not support chunk type %d(%x)??\n", + kprintf("Peer does not support chunk type %d(%x)??\n", chk->chunk_type, (u_int)chk->chunk_type); } #endif @@ -767,8 +767,8 @@ sctp_process_unrecog_param(struct sctp_tcb *stcb, struct sctp_paramhdr *phdr) case SCTP_ERROR_CAUSE_IND: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("Huh, the peer does not support success? or error cause?\n"); - printf("Turning off ASCONF to this strange peer\n"); + kprintf("Huh, the peer does not support success? or error cause?\n"); + kprintf("Turning off ASCONF to this strange peer\n"); } #endif stcb->asoc.peer_supports_asconf = 0; @@ -777,7 +777,7 @@ sctp_process_unrecog_param(struct sctp_tcb *stcb, struct sctp_paramhdr *phdr) default: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("Peer does not support base param type %d(%x)??\n", + kprintf("Peer does not support base param type %d(%x)??\n", pbad->param_type, (u_int)pbad->param_type); } #endif @@ -809,7 +809,7 @@ sctp_handle_error(struct sctp_chunkhdr *ch, /* invalid param length for this param */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("Bogus length in error param- chunk left:%d errorlen:%d\n", + kprintf("Bogus length in error param- chunk left:%d errorlen:%d\n", chklen, error_len); } #endif /* SCTP_DEBUG */ @@ -822,7 +822,7 @@ sctp_handle_error(struct sctp_chunkhdr *ch, case SCTP_CAUSE_NOUSER_DATA: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("Software error we got a %d back? We have a bug :/ (or do they?)\n", + kprintf("Software error we got a %d back? We have a bug :/ (or do they?)\n", error_type); } #endif @@ -883,7 +883,7 @@ sctp_handle_error(struct sctp_chunkhdr *ch, /* We should NOT get these here, but in a ASCONF-ACK. */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("Peer sends ASCONF errors in a Operational Error?<%d>?\n", + kprintf("Peer sends ASCONF errors in a Operational Error?<%d>?\n", error_type); } #endif @@ -901,7 +901,7 @@ sctp_handle_error(struct sctp_chunkhdr *ch, #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { /* don't know what this error cause is... */ - printf("sctp_handle_error: unknown error type = 0x%xh\n", + kprintf("sctp_handle_error: unknown error type = 0x%xh\n", error_type); } #endif /* SCTP_DEBUG */ @@ -925,13 +925,13 @@ sctp_handle_init_ack(struct mbuf *m, int iphlen, int offset, struct sctphdr *sh, #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("sctp_handle_init_ack: handling INIT-ACK\n"); + kprintf("sctp_handle_init_ack: handling INIT-ACK\n"); } #endif if (stcb == NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("sctp_handle_init_ack: TCB is null\n"); + kprintf("sctp_handle_init_ack: TCB is null\n"); } #endif return (-1); @@ -998,7 +998,7 @@ sctp_handle_init_ack(struct mbuf *m, int iphlen, int offset, struct sctphdr *sh, /* error in parsing parameters */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("sctp_process_init_ack: error in msg, discarding\n"); + kprintf("sctp_process_init_ack: error in msg, discarding\n"); } #endif return (-1); @@ -1006,7 +1006,7 @@ sctp_handle_init_ack(struct mbuf *m, int iphlen, int offset, struct sctphdr *sh, /* update our state */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("moving to COOKIE-ECHOED state\n"); + kprintf("moving to COOKIE-ECHOED state\n"); } #endif if (*state & SCTP_STATE_SHUTDOWN_PENDING) { @@ -1044,7 +1044,7 @@ sctp_handle_init_ack(struct mbuf *m, int iphlen, int offset, struct sctphdr *sh, /* incorrect state... discard */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("Leaving handle-init-ack default\n"); + kprintf("Leaving handle-init-ack default\n"); } #endif return (-1); @@ -1052,7 +1052,7 @@ sctp_handle_init_ack(struct mbuf *m, int iphlen, int offset, struct sctphdr *sh, } /* end switch asoc state */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("Leaving handle-init-ack end\n"); + kprintf("Leaving handle-init-ack end\n"); } #endif return (0); @@ -1089,7 +1089,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset, sctp_send_shutdown_ack(stcb, stcb->asoc.primary_destination); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("sctp_handle_cookie: got a cookie, while shutting down!\n"); + kprintf("sctp_handle_cookie: got a cookie, while shutting down!\n"); } #endif MGETHDR(op_err, MB_DONTWAIT, MT_HEADER); @@ -1123,7 +1123,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset, /* could not pull a INIT chunk in cookie */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("process_cookie_existing: could not pull INIT chunk hdr\n"); + kprintf("process_cookie_existing: could not pull INIT chunk hdr\n"); } #endif /* SCTP_DEBUG */ return (NULL); @@ -1132,7 +1132,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset, if (init_cp->ch.chunk_type != SCTP_INITIATION) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("process_cookie_existing: could not find INIT chunk!\n"); + kprintf("process_cookie_existing: could not find INIT chunk!\n"); } #endif /* SCTP_DEBUG */ return (NULL); @@ -1150,7 +1150,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset, /* could not pull INIT-ACK chunk in cookie */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("process_cookie_existing: could not pull INIT-ACK chunk hdr\n"); + kprintf("process_cookie_existing: could not pull INIT-ACK chunk hdr\n"); } #endif /* SCTP_DEBUG */ return (NULL); @@ -1159,7 +1159,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset, if (initack_cp->ch.chunk_type != SCTP_INITIATION_ACK) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("process_cookie_existing: could not find INIT-ACK chunk!\n"); + kprintf("process_cookie_existing: could not find INIT-ACK chunk!\n"); } #endif /* SCTP_DEBUG */ return (NULL); @@ -1180,7 +1180,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset, retval = sctp_process_init(init_cp, stcb, net); if (retval < 0) { #ifdef SCTP_DEBUG - printf("process_cookie_existing: INIT processing failed\n"); + kprintf("process_cookie_existing: INIT processing failed\n"); #endif return (NULL); } @@ -1249,7 +1249,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset, initack_offset, sh, init_src)) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("Weird cookie load_address failure on cookie existing - 1\n"); + kprintf("Weird cookie load_address failure on cookie existing - 1\n"); } #endif return (NULL); @@ -1306,7 +1306,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset, if (retval < 0) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("process_cookie_existing: INIT processing failed\n"); + kprintf("process_cookie_existing: INIT processing failed\n"); } #endif return (NULL); @@ -1316,7 +1316,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset, initack_offset, sh, init_src)) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("Weird cookie load_address failure on cookie existing - 2\n"); + kprintf("Weird cookie load_address failure on cookie existing - 2\n"); } #endif return (NULL); @@ -1384,7 +1384,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset, if (retval < 0) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("process_cookie_existing: INIT processing failed\n"); + kprintf("process_cookie_existing: INIT processing failed\n"); } #endif return (NULL); @@ -1401,7 +1401,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset, initack_offset, sh, init_src)) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("Weird cookie load_address failure on cookie existing - 3\n"); + kprintf("Weird cookie load_address failure on cookie existing - 3\n"); } #endif return (NULL); @@ -1464,7 +1464,7 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, int offset, /* could not pull a INIT chunk in cookie */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("process_cookie_new: could not pull INIT chunk hdr\n"); + kprintf("process_cookie_new: could not pull INIT chunk hdr\n"); } #endif /* SCTP_DEBUG */ return (NULL); @@ -1473,7 +1473,7 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, int offset, if (init_cp->ch.chunk_type != SCTP_INITIATION) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("HUH? process_cookie_new: could not find INIT chunk!\n"); + kprintf("HUH? process_cookie_new: could not find INIT chunk!\n"); } #endif /* SCTP_DEBUG */ return (NULL); @@ -1491,7 +1491,7 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, int offset, /* could not pull INIT-ACK chunk in cookie */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("process_cookie_new: could not pull INIT-ACK chunk hdr\n"); + kprintf("process_cookie_new: could not pull INIT-ACK chunk hdr\n"); } #endif /* SCTP_DEBUG */ return (NULL); @@ -1502,8 +1502,8 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, int offset, if (sctp_debug_on & SCTP_DEBUG_INPUT2) { u_int8_t *pp; pp = (u_int8_t *)initack_cp; - printf("process_cookie_new: could not find INIT-ACK chunk!\n"); - printf("Found bytes %x %x %x %x at postion %d\n", + kprintf("process_cookie_new: could not find INIT-ACK chunk!\n"); + kprintf("Found bytes %x %x %x %x at postion %d\n", (u_int)pp[0], (u_int)pp[1], (u_int)pp[2], (u_int)pp[3], initack_offset); } @@ -1522,7 +1522,7 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, int offset, /* memory problem? */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("process_cookie_new: no room for another TCB!\n"); + kprintf("process_cookie_new: no room for another TCB!\n"); } #endif /* SCTP_DEBUG */ op_err = sctp_generate_invmanparam(SCTP_CAUSE_OUT_OF_RESC); @@ -1572,7 +1572,7 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, int offset, if (retval < 0) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("process_cookie_new: INIT processing failed\n"); + kprintf("process_cookie_new: INIT processing failed\n"); } #endif sctp_free_assoc(inp, stcb); @@ -1589,7 +1589,7 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, int offset, /* update current state */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("moving to OPEN state\n"); + kprintf("moving to OPEN state\n"); } #endif if (asoc->state & SCTP_STATE_SHUTDOWN_PENDING) { @@ -1715,14 +1715,14 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset, #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("sctp_handle_cookie: handling COOKIE-ECHO\n"); + kprintf("sctp_handle_cookie: handling COOKIE-ECHO\n"); } #endif if (inp_p == NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("sctp_handle_cookie: null inp_p!\n"); + kprintf("sctp_handle_cookie: null inp_p!\n"); } #endif return (NULL); @@ -1790,7 +1790,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset, /* cookie too long! or too small */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("sctp_handle_cookie: cookie_len=%u, pkt size=%u\n", cookie_len, size_of_pkt); + kprintf("sctp_handle_cookie: cookie_len=%u, pkt size=%u\n", cookie_len, size_of_pkt); } #endif /* SCTP_DEBUG */ return (NULL); @@ -1805,7 +1805,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset, /* XXX this may already be accounted for earlier... */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("sctp_handle_cookie: sig offset=%u, pkt size=%u\n", sig_offset, size_of_pkt); + kprintf("sctp_handle_cookie: sig offset=%u, pkt size=%u\n", sig_offset, size_of_pkt); } #endif return (NULL); @@ -1816,7 +1816,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset, /* out of memory or ?? */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("sctp_handle_cookie: couldn't m_split the signature\n"); + kprintf("sctp_handle_cookie: couldn't m_split the signature\n"); } #endif return (NULL); @@ -1839,7 +1839,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset, /* it's the old cookie */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("sctp_handle_cookie: old cookie sig\n"); + kprintf("sctp_handle_cookie: old cookie sig\n"); } #endif sctp_hash_digest_m((char *)ep->secret_key[(int)ep->last_secret_number], @@ -1848,7 +1848,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset, /* it's the current cookie */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("sctp_handle_cookie: current cookie sig\n"); + kprintf("sctp_handle_cookie: current cookie sig\n"); } #endif sctp_hash_digest_m((char *)ep->secret_key[(int)ep->current_secret_number], @@ -1861,7 +1861,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset, /* couldn't find signature */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("sctp_handle_cookie: couldn't pull the signature\n"); + kprintf("sctp_handle_cookie: couldn't pull the signature\n"); } #endif return (NULL); @@ -1874,7 +1874,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset, /* compute digest with old */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("sctp_handle_cookie: old cookie sig\n"); + kprintf("sctp_handle_cookie: old cookie sig\n"); } #endif sctp_hash_digest_m((char *)ep->secret_key[(int)ep->last_secret_number], @@ -1913,7 +1913,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset, */ int mmlen = 0; struct mbuf *lat; - printf("Warning: Hitting m_split join TSNH code - fixed\n"); + kprintf("Warning: Hitting m_split join TSNH code - fixed\n"); lat = m_sig; while (lat) { mmlen += lat->m_len; @@ -1927,8 +1927,8 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset, if (cookie_ok == 0) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("handle_cookie_echo: cookie signature validation failed!\n"); - printf("offset = %u, cookie_offset = %u, sig_offset = %u\n", + kprintf("handle_cookie_echo: cookie signature validation failed!\n"); + kprintf("offset = %u, cookie_offset = %u, sig_offset = %u\n", (u_int32_t)offset, cookie_offset, sig_offset); } #endif @@ -1936,7 +1936,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset, } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("handle_cookie_echo: cookie signature validation passed\n"); + kprintf("handle_cookie_echo: cookie signature validation passed\n"); } #endif @@ -1959,7 +1959,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset, u_int32_t tim; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("sctp_handle_cookie: got a STALE cookie!\n"); + kprintf("sctp_handle_cookie: got a STALE cookie!\n"); } #endif MGETHDR(op_err, MB_DONTWAIT, MT_HEADER); @@ -2024,7 +2024,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset, * findep got back l_inp and now */ if (l_inp != *inp_p) { - printf("Bad problem find_ep got a diff inp then special_locate?\n"); + kprintf("Bad problem find_ep got a diff inp then special_locate?\n"); } } } @@ -2034,7 +2034,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset, /* this is the "normal" case... get a new TCB */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("sctp_handle_cookie: processing NEW cookie\n"); + kprintf("sctp_handle_cookie: processing NEW cookie\n"); } #endif *stcb = sctp_process_cookie_new(m, iphlen, offset, sh, cookie, @@ -2046,7 +2046,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset, /* this is abnormal... cookie-echo on existing TCB */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("sctp_handle_cookie: processing EXISTING cookie\n"); + kprintf("sctp_handle_cookie: processing EXISTING cookie\n"); } #endif had_a_existing_tcb = 1; @@ -2058,7 +2058,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset, /* still no TCB... must be bad cookie-echo */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("handle_cookie_echo: ACK! don't have a TCB!\n"); + kprintf("handle_cookie_echo: ACK! don't have a TCB!\n"); } #endif /* SCTP_DEBUG */ return (NULL); @@ -2074,7 +2074,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset, if (netl == NULL) { int ret; #ifdef SCTP_DEBUG - printf("TSNH! Huh, why do I need to add this address here?\n"); + kprintf("TSNH! Huh, why do I need to add this address here?\n"); #endif ret = sctp_add_remote_addr(*stcb, to, 0, 100); netl = sctp_findnet(*stcb, to); @@ -2090,7 +2090,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset, } #ifdef SCTP_DEBUG else { - printf("Could not add source address for some reason\n"); + kprintf("Could not add source address for some reason\n"); } #endif @@ -2123,7 +2123,7 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset, /* Too many sockets */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("process_cookie_new: no room for another socket!\n"); + kprintf("process_cookie_new: no room for another socket!\n"); } #endif /* SCTP_DEBUG */ op_err = sctp_generate_invmanparam(SCTP_CAUSE_OUT_OF_RESC); @@ -2171,7 +2171,7 @@ sctp_handle_cookie_ack(struct sctp_cookie_ack_chunk *cp, #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("sctp_handle_cookie_ack: handling COOKIE-ACK\n"); + kprintf("sctp_handle_cookie_ack: handling COOKIE-ACK\n"); } #endif if (stcb == NULL) @@ -2186,7 +2186,7 @@ sctp_handle_cookie_ack(struct sctp_cookie_ack_chunk *cp, /* state change only needed when I am in right state */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("moving to OPEN state\n"); + kprintf("moving to OPEN state\n"); } #endif if (asoc->state & SCTP_STATE_SHUTDOWN_PENDING) { @@ -2365,7 +2365,7 @@ sctp_handle_shutdown_complete(struct sctp_shutdown_complete_chunk *cp, #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("sctp_handle_shutdown_complete: handling SHUTDOWN-COMPLETE\n"); + kprintf("sctp_handle_shutdown_complete: handling SHUTDOWN-COMPLETE\n"); } #endif if (stcb == NULL) @@ -2529,7 +2529,7 @@ process_chunk_drop(struct sctp_tcb *stcb, struct sctp_chunk_desc *desc, audit++; } if (audit != stcb->asoc.sent_queue_retran_cnt) { - printf("**Local Audit finds cnt:%d asoc cnt:%d\n", + kprintf("**Local Audit finds cnt:%d asoc cnt:%d\n", audit, stcb->asoc.sent_queue_retran_cnt); #ifndef SCTP_AUDITING_ENABLED stcb->asoc.sent_queue_retran_cnt = audit; @@ -2579,7 +2579,7 @@ process_chunk_drop(struct sctp_tcb *stcb, struct sctp_chunk_desc *desc, case SCTP_SHUTDOWN: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT4) { - printf("%s:%d sends a shutdown\n", + kprintf("%s:%d sends a shutdown\n", __FILE__, __LINE__ ); @@ -2651,7 +2651,7 @@ sctp_reset_in_stream(struct sctp_tcb *stcb, temp = ntohs(list[i]); list[i] = temp; if (list[i] >= stcb->asoc.streamincnt) { - printf("Invalid stream in-stream reset %d\n", list[i]); + kprintf("Invalid stream in-stream reset %d\n", list[i]); continue; } stcb->asoc.strmin[(list[i])].last_sequence_delivered = 0xffff; @@ -2684,7 +2684,7 @@ sctp_clean_up_stream_reset(struct sctp_tcb *stcb) /* we only clean up the request */ continue; } else if (strreq->sr_req.ph.param_type != ntohs(SCTP_STR_RESET_REQUEST)) { - printf("TSNH, an unknown stream reset request is in queue %x\n", + kprintf("TSNH, an unknown stream reset request is in queue %x\n", (u_int)ntohs(strreq->sr_req.ph.param_type)); continue; } @@ -2758,7 +2758,7 @@ sctp_handle_stream_reset_response(struct sctp_tcb *stcb, } else { /* duplicate */ #ifdef SCTP_DEBUG - printf("Duplicate old stream reset resp next:%x this one:%x\n", + kprintf("Duplicate old stream reset resp next:%x this one:%x\n", stcb->asoc.str_reset_seq_out, seq); #endif } @@ -3089,7 +3089,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("sctp_process_control: iphlen=%u, offset=%u, length=%u stcb:%p\n", + kprintf("sctp_process_control: iphlen=%u, offset=%u, length=%u stcb:%p\n", iphlen, *offset, length, stcb); } #endif /* SCTP_DEBUG */ @@ -3104,7 +3104,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("sctp_process_control: validating vtags\n"); + kprintf("sctp_process_control: validating vtags\n"); } #endif /* SCTP_DEBUG */ vtag_in = ntohl(sh->v_tag); @@ -3113,7 +3113,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, /* protocol error- silently discard... */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("sctp_process_control: INIT with vtag != 0\n"); + kprintf("sctp_process_control: INIT with vtag != 0\n"); } #endif /* SCTP_DEBUG */ sctp_pegs[SCTP_BAD_VTAGS]++; @@ -3135,7 +3135,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, sctp_handle_ootb(m, iphlen, *offset, sh, inp, NULL); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("sctp_process_control: handling OOTB packet, chunk type=%xh\n", + kprintf("sctp_process_control: handling OOTB packet, chunk type=%xh\n", ch->chunk_type); } #endif /* SCTP_DEBUG */ @@ -3182,7 +3182,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, /* invalid vtag... */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("invalid vtag: %xh, expect %xh\n", vtag_in, asoc->my_vtag); + kprintf("invalid vtag: %xh, expect %xh\n", vtag_in, asoc->my_vtag); } #endif /* SCTP_DEBUG */ sctp_pegs[SCTP_BAD_VTAGS]++; @@ -3196,7 +3196,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("sctp_process_control: vtags ok, processing ctrl chunks\n"); + kprintf("sctp_process_control: vtags ok, processing ctrl chunks\n"); } #endif /* SCTP_DEBUG */ @@ -3216,14 +3216,14 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, chk_length = ntohs(ch->chunk_length); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT2) { - printf("sctp_process_control: processing a chunk type=%u, len=%u\n", ch->chunk_type, chk_length); + kprintf("sctp_process_control: processing a chunk type=%u, len=%u\n", ch->chunk_type, chk_length); } #endif /* SCTP_DEBUG */ if ((size_t)chk_length < sizeof(*ch) || (*offset + chk_length) > length) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("sctp_process_control: chunk length invalid! *offset:%u, chk_length:%u > length:%u\n", + kprintf("sctp_process_control: chunk length invalid! *offset:%u, chk_length:%u > length:%u\n", *offset, length, chk_length); } #endif /* SCTP_DEBUG */ @@ -3274,7 +3274,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, ch = (struct sctp_chunkhdr *)sctp_m_getptr(m, *offset, chk_length, chunk_buf); if (ch == NULL) { - printf("sctp_process_control: Can't get the all data....\n"); + kprintf("sctp_process_control: Can't get the all data....\n"); *offset = length; if (locked_tcb) SCTP_TCB_UNLOCK(locked_tcb); @@ -3295,7 +3295,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, /* must be first and only chunk */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("SCTP_INIT\n"); + kprintf("SCTP_INIT\n"); } #endif /* SCTP_DEBUG */ if (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) { @@ -3337,7 +3337,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, /* must be first and only chunk */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("SCTP_INIT-ACK\n"); + kprintf("SCTP_INIT-ACK\n"); } #endif /* SCTP_DEBUG */ if (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) { @@ -3359,7 +3359,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, (sctp_strict_init && (length - *offset > SCTP_SIZE32(chk_length)))) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("Length is %d rounded chk_length:%d .. dropping\n", + kprintf("Length is %d rounded chk_length:%d .. dropping\n", length - *offset, SCTP_SIZE32(chk_length)); } @@ -3380,7 +3380,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, *offset = length; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("All done INIT-ACK processing\n"); + kprintf("All done INIT-ACK processing\n"); } #endif if (locked_tcb) @@ -3390,7 +3390,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, case SCTP_SELECTIVE_ACK: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("SCTP_SACK\n"); + kprintf("SCTP_SACK\n"); } #endif /* SCTP_DEBUG */ sctp_pegs[SCTP_PEG_SACKS_SEEN]++; @@ -3409,7 +3409,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, case SCTP_HEARTBEAT_REQUEST: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("SCTP_HEARTBEAT\n"); + kprintf("SCTP_HEARTBEAT\n"); } #endif /* SCTP_DEBUG */ sctp_pegs[SCTP_HB_RECV]++; @@ -3422,7 +3422,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, case SCTP_HEARTBEAT_ACK: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("SCTP_HEARTBEAT-ACK\n"); + kprintf("SCTP_HEARTBEAT-ACK\n"); } #endif /* SCTP_DEBUG */ @@ -3436,7 +3436,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, case SCTP_ABORT_ASSOCIATION: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("SCTP_ABORT\n"); + kprintf("SCTP_ABORT\n"); } #endif /* SCTP_DEBUG */ sctp_handle_abort((struct sctp_abort_chunk *)ch, @@ -3447,7 +3447,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, case SCTP_SHUTDOWN: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("SCTP_SHUTDOWN\n"); + kprintf("SCTP_SHUTDOWN\n"); } #endif /* SCTP_DEBUG */ { @@ -3463,7 +3463,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, case SCTP_SHUTDOWN_ACK: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("SCTP_SHUTDOWN-ACK\n"); + kprintf("SCTP_SHUTDOWN-ACK\n"); } #endif /* SCTP_DEBUG */ sctp_handle_shutdown_ack((struct sctp_shutdown_ack_chunk *)ch, stcb, *netp); @@ -3473,7 +3473,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, case SCTP_OPERATION_ERROR: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("SCTP_OP-ERR\n"); + kprintf("SCTP_OP-ERR\n"); } #endif /* SCTP_DEBUG */ if (sctp_handle_error(ch, stcb, *netp) < 0) { @@ -3484,7 +3484,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, case SCTP_COOKIE_ECHO: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("SCTP_COOKIE-ECHO stcb is %p\n", stcb); + kprintf("SCTP_COOKIE-ECHO stcb is %p\n", stcb); } #endif /* SCTP_DEBUG */ if (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) { @@ -3547,7 +3547,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, &stcb, netp); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("ret_buf:%p length:%d off:%d\n", + kprintf("ret_buf:%p length:%d off:%d\n", ret_buf, length, *offset); } #endif /* SCTP_DEBUG */ @@ -3558,7 +3558,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("GAK, null buffer\n"); + kprintf("GAK, null buffer\n"); } #endif /* SCTP_DEBUG */ *offset = length; @@ -3582,7 +3582,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, case SCTP_COOKIE_ACK: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("SCTP_COOKIE-ACK\n"); + kprintf("SCTP_COOKIE-ACK\n"); } #endif /* SCTP_DEBUG */ @@ -3600,7 +3600,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, case SCTP_ECN_ECHO: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("SCTP_ECN-ECHO\n"); + kprintf("SCTP_ECN-ECHO\n"); } #endif /* SCTP_DEBUG */ /* He's alive so give him credit */ @@ -3611,7 +3611,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, case SCTP_ECN_CWR: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("SCTP_ECN-CWR\n"); + kprintf("SCTP_ECN-CWR\n"); } #endif /* SCTP_DEBUG */ /* He's alive so give him credit */ @@ -3622,7 +3622,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, case SCTP_SHUTDOWN_COMPLETE: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("SCTP_SHUTDOWN-COMPLETE\n"); + kprintf("SCTP_SHUTDOWN-COMPLETE\n"); } #endif /* SCTP_DEBUG */ /* must be first and only chunk */ @@ -3642,7 +3642,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, case SCTP_ASCONF: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("SCTP_ASCONF\n"); + kprintf("SCTP_ASCONF\n"); } #endif /* SCTP_DEBUG */ /* He's alive so give him credit */ @@ -3654,7 +3654,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, case SCTP_ASCONF_ACK: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("SCTP_ASCONF-ACK\n"); + kprintf("SCTP_ASCONF-ACK\n"); } #endif /* SCTP_DEBUG */ /* He's alive so give him credit */ @@ -3666,7 +3666,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, case SCTP_FORWARD_CUM_TSN: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("SCTP_FWD-TSN\n"); + kprintf("SCTP_FWD-TSN\n"); } #endif /* SCTP_DEBUG */ /* He's alive so give him credit */ @@ -3688,7 +3688,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, case SCTP_STREAM_RESET: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("SCTP_STREAM_RESET\n"); + kprintf("SCTP_STREAM_RESET\n"); } #endif /* SCTP_DEBUG */ ch = (struct sctp_chunkhdr *)sctp_m_getptr(m, *offset, @@ -3705,7 +3705,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, case SCTP_PACKET_DROPPED: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("SCTP_PACKET_DROPPED\n"); + kprintf("SCTP_PACKET_DROPPED\n"); } #endif /* SCTP_DEBUG */ /* re-get it all please */ @@ -3749,7 +3749,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("Gak can't copy the chunk into operr %d bytes\n", + kprintf("Gak can't copy the chunk into operr %d bytes\n", chk_length); } #endif @@ -3758,7 +3758,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, #ifdef SCTP_DEBUG else { if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("Gak can't mgethdr for op-err of unrec chunk\n"); + kprintf("Gak can't mgethdr for op-err of unrec chunk\n"); } } #endif @@ -3877,7 +3877,7 @@ sctp_common_input_processing(struct mbuf **mm, int iphlen, int offset, #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("Ok, Common input processing called, m:%x iphlen:%d offset:%d\n", + kprintf("Ok, Common input processing called, m:%x iphlen:%d offset:%d\n", (u_int)m, iphlen, offset); } #endif /* SCTP_DEBUG */ @@ -3885,7 +3885,7 @@ sctp_common_input_processing(struct mbuf **mm, int iphlen, int offset, /* process the control portion of the SCTP packet */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("Processing control\n"); + kprintf("Processing control\n"); } #endif /* SCTP_DEBUG */ @@ -3898,7 +3898,7 @@ sctp_common_input_processing(struct mbuf **mm, int iphlen, int offset, */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("No control present\n"); + kprintf("No control present\n"); } #endif /* SCTP_DEBUG */ @@ -3925,7 +3925,7 @@ sctp_common_input_processing(struct mbuf **mm, int iphlen, int offset, } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("Ok, control finished time to look for data (%d) offset:%d\n", + kprintf("Ok, control finished time to look for data (%d) offset:%d\n", length, offset); } #endif /* SCTP_DEBUG */ @@ -3969,7 +3969,7 @@ sctp_common_input_processing(struct mbuf **mm, int iphlen, int offset, default: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("Got data in invalid state %d.. dropping\n", stcb->asoc.state); + kprintf("Got data in invalid state %d.. dropping\n", stcb->asoc.state); } #endif SCTP_TCB_UNLOCK(stcb); @@ -4028,7 +4028,7 @@ sctp_common_input_processing(struct mbuf **mm, int iphlen, int offset, #endif #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("Check for chunk output prw:%d tqe:%d tf=%d\n", + kprintf("Check for chunk output prw:%d tqe:%d tf=%d\n", stcb->asoc.peers_rwnd, TAILQ_EMPTY(&stcb->asoc.control_send_queue), stcb->asoc.total_flight); @@ -4039,13 +4039,13 @@ sctp_common_input_processing(struct mbuf **mm, int iphlen, int offset, (stcb->asoc.peers_rwnd <= 0 && stcb->asoc.total_flight == 0)) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("Calling chunk OUTPUT\n"); + kprintf("Calling chunk OUTPUT\n"); } #endif sctp_chunk_output(inp, stcb, 3); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("chunk OUTPUT returns\n"); + kprintf("chunk OUTPUT returns\n"); } #endif } @@ -4127,7 +4127,7 @@ sctp_input(struct mbuf *m, ...) sctp_pegs[SCTP_INPKTS]++; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("V4 input gets a packet iphlen:%d pktlen:%d\n", iphlen, m->m_pkthdr.len); + kprintf("V4 input gets a packet iphlen:%d pktlen:%d\n", iphlen, m->m_pkthdr.len); } #endif /*#ifdef INET6*/ @@ -4199,7 +4199,7 @@ sctp_input(struct mbuf *m, ...) if (calc_check != check) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("Bad CSUM on SCTP packet calc_check:%x check:%x m:%x mlen:%d iphlen:%d\n", + kprintf("Bad CSUM on SCTP packet calc_check:%x check:%x m:%x mlen:%d iphlen:%d\n", calc_check, check, (u_int)m, mlen, iphlen); } #endif @@ -4238,7 +4238,7 @@ sctp_input(struct mbuf *m, ...) */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("V4 find association\n"); + kprintf("V4 find association\n"); } #endif @@ -4260,7 +4260,7 @@ sctp_input(struct mbuf *m, ...) #endif /* ICMP_BANDLIM */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("Sending a ABORT from packet entry!\n"); + kprintf("Sending a ABORT from packet entry!\n"); } #endif if (ch->chunk_type == SCTP_INITIATION) { diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index afc81d8b8c..5412ce026d 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -1,5 +1,5 @@ /* $KAME: sctp_output.c,v 1.46 2005/03/06 16:04:17 itojun Exp $ */ -/* $DragonFly: src/sys/netinet/sctp_output.c,v 1.7 2006/06/23 17:20:13 eirikn Exp $ */ +/* $DragonFly: src/sys/netinet/sctp_output.c,v 1.8 2006/12/22 23:57:52 swildner Exp $ */ /* * Copyright (C) 2002, 2003, 2004 Cisco Systems Inc, @@ -491,7 +491,7 @@ sctp_is_addr_restricted(struct sctp_tcb *stcb, struct sockaddr *addr) cnt++; } if (sctp_debug_on & SCTP_DEBUG_OUTPUT4) { - printf("There are %d addresses on the restricted list\n", cnt); + kprintf("There are %d addresses on the restricted list\n", cnt); } cnt = 0; #endif @@ -499,7 +499,7 @@ sctp_is_addr_restricted(struct sctp_tcb *stcb, struct sockaddr *addr) if (laddr->ifa == NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Help I have fallen and I can't get up!\n"); + kprintf("Help I have fallen and I can't get up!\n"); } #endif continue; @@ -507,7 +507,7 @@ sctp_is_addr_restricted(struct sctp_tcb *stcb, struct sockaddr *addr) #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT4) { cnt++; - printf("Restricted address[%d]:", cnt); + kprintf("Restricted address[%d]:", cnt); sctp_print_address(laddr->ifa->ifa_addr); } #endif @@ -530,7 +530,7 @@ sctp_is_addr_in_ep(struct sctp_inpcb *inp, struct ifaddr *ifa) if (laddr->ifa == NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Help I have fallen and I can't get up!\n"); + kprintf("Help I have fallen and I can't get up!\n"); } #endif continue; @@ -623,7 +623,7 @@ sctp_choose_v4_boundspecific_inp(struct sctp_inpcb *inp, /* no address bound can be a source for the destination we are in trouble */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Src address selection for EP, no acceptable src address found for address\n"); + kprintf("Src address selection for EP, no acceptable src address found for address\n"); } #endif memset(&ans, 0, sizeof(ans)); @@ -667,7 +667,7 @@ sctp_choose_v4_boundspecific_stcb(struct sctp_inpcb *inp, */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Have a STCB - asconf allowed, not bound all have a netgative list\n"); + kprintf("Have a STCB - asconf allowed, not bound all have a netgative list\n"); } #endif /* first question, is the ifn we will emit on @@ -772,7 +772,7 @@ sctp_choose_v4_boundspecific_stcb(struct sctp_inpcb *inp, */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Have a STCB - no asconf allowed, not bound all have a postive list\n"); + kprintf("Have a STCB - no asconf allowed, not bound all have a postive list\n"); } #endif /* First look at all addresses for one that is on @@ -947,7 +947,7 @@ sctp_choose_v4_boundall(struct sctp_inpcb *inp, num_prefered = sctp_count_v4_num_prefered_boundall (ifn, stcb, non_asoc_addr_ok, loopscope, ipv4_scope, &sin_loop, &sin_local); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Found %d prefered source addresses\n", num_prefered); + kprintf("Found %d prefered source addresses\n", num_prefered); } #endif if (num_prefered == 0) { @@ -967,7 +967,7 @@ sctp_choose_v4_boundall(struct sctp_inpcb *inp, */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("cur_addr_num:%d\n", cur_addr_num); + kprintf("cur_addr_num:%d\n", cur_addr_num); } #endif sin = sctp_select_v4_nth_prefered_addr_from_ifn_boundall (ifn, stcb, non_asoc_addr_ok, loopscope, @@ -1016,7 +1016,7 @@ sctp_choose_v4_boundall(struct sctp_inpcb *inp, loopscope, ipv4_scope, &sin_loop, &sin_local); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Found ifn:%x %d prefered source addresses\n", (u_int)ifn, num_prefered); + kprintf("Found ifn:%x %d prefered source addresses\n", (u_int)ifn, num_prefered); } #endif if (num_prefered == 0) { @@ -1189,7 +1189,7 @@ sctp_ipv4_source_address_selection(struct sctp_inpcb *inp, } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Scope setup loop:%d ipv4_scope:%d\n", + kprintf("Scope setup loop:%d ipv4_scope:%d\n", loopscope, ipv4_scope); } #endif @@ -1320,7 +1320,7 @@ sctp_choose_v6_boundspecific_stcb(struct sctp_inpcb *inp, if (inp->sctp_flags & SCTP_PCB_FLAGS_DO_ASCONF) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Have a STCB - asconf allowed, not bound all have a netgative list\n"); + kprintf("Have a STCB - asconf allowed, not bound all have a netgative list\n"); } #endif /* first question, is the ifn we will emit on @@ -1413,7 +1413,7 @@ sctp_choose_v6_boundspecific_stcb(struct sctp_inpcb *inp, } else { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Have a STCB - no asconf allowed, not bound all have a postive list\n"); + kprintf("Have a STCB - no asconf allowed, not bound all have a postive list\n"); } #endif /* First try for interface output match */ @@ -1561,7 +1561,7 @@ sctp_choose_v6_boundspecific_inp(struct sctp_inpcb *inp, /* no address bound can be a source for the destination */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Src address selection for EP, no acceptable src address found for address\n"); + kprintf("Src address selection for EP, no acceptable src address found for address\n"); } #endif return (NULL); @@ -1679,7 +1679,7 @@ sctp_choose_v6_boundall(struct sctp_inpcb *inp, num_eligible_addr = sctp_count_v6_num_eligible_boundall (ifn, stcb, non_asoc_addr_ok, loopscope, loc_scope); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Found %d eligible source addresses\n", num_eligible_addr); + kprintf("Found %d eligible source addresses\n", num_eligible_addr); } #endif if (num_eligible_addr == 0) { @@ -1699,7 +1699,7 @@ sctp_choose_v6_boundall(struct sctp_inpcb *inp, */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("cur_addr_num:%d match_scope_prefered:%d select it\n", + kprintf("cur_addr_num:%d match_scope_prefered:%d select it\n", cur_addr_num, match_scope_prefered); } #endif @@ -1709,7 +1709,7 @@ sctp_choose_v6_boundall(struct sctp_inpcb *inp, /* retry without the preference for matching scope */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("retry with no match_scope_prefered\n"); + kprintf("retry with no match_scope_prefered\n"); } #endif sin6 = sctp_select_v6_nth_addr_from_ifn_boundall (ifn, stcb, non_asoc_addr_ok, loopscope, @@ -1718,7 +1718,7 @@ sctp_choose_v6_boundall(struct sctp_inpcb *inp, if (sin6) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Selected address %d ifn:%x for the route\n", cur_addr_num, (u_int)ifn); + kprintf("Selected address %d ifn:%x for the route\n", cur_addr_num, (u_int)ifn); } #endif if (net) { @@ -1740,7 +1740,7 @@ sctp_choose_v6_boundall(struct sctp_inpcb *inp, */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("bound-all Plan B\n"); + kprintf("bound-all Plan B\n"); } #endif if (inp->next_ifn_touse == NULL) { @@ -1748,20 +1748,20 @@ sctp_choose_v6_boundall(struct sctp_inpcb *inp, inp->next_ifn_touse = TAILQ_FIRST(&ifnet); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Start at first IFN:%x\n", (u_int)inp->next_ifn_touse); + kprintf("Start at first IFN:%x\n", (u_int)inp->next_ifn_touse); } #endif } else { inp->next_ifn_touse = TAILQ_NEXT(inp->next_ifn_touse, if_list); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Resume at IFN:%x\n", (u_int)inp->next_ifn_touse); + kprintf("Resume at IFN:%x\n", (u_int)inp->next_ifn_touse); } #endif if (inp->next_ifn_touse == NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("IFN Resets\n"); + kprintf("IFN Resets\n"); } #endif started_at_beginning=1; @@ -1798,7 +1798,7 @@ sctp_choose_v6_boundall(struct sctp_inpcb *inp, num_eligible_addr = sctp_count_v6_num_eligible_boundall (ifn, stcb, non_asoc_addr_ok, loopscope, loc_scope); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("IFN:%x has %d eligible\n", (u_int)ifn, num_eligible_addr); + kprintf("IFN:%x has %d eligible\n", (u_int)ifn, num_eligible_addr); } #endif if (num_eligible_addr == 0) { @@ -1824,7 +1824,7 @@ sctp_choose_v6_boundall(struct sctp_inpcb *inp, } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Selected the %d'th address of ifn:%x\n", + kprintf("Selected the %d'th address of ifn:%x\n", cur_addr_num, (u_int)ifn); } @@ -1837,7 +1837,7 @@ sctp_choose_v6_boundall(struct sctp_inpcb *inp, */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Force a recycle\n"); + kprintf("Force a recycle\n"); } #endif inp->next_ifn_touse = NULL; @@ -1922,7 +1922,7 @@ sctp_ipv6_source_address_selection(struct sctp_inpcb *inp, */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("No route to host, this packet cannot be sent!\n"); + kprintf("No route to host, this packet cannot be sent!\n"); } #endif memset(&ans, 0, sizeof(ans)); @@ -1944,7 +1944,7 @@ sctp_ipv6_source_address_selection(struct sctp_inpcb *inp, */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Loopback scope is set\n"); + kprintf("Loopback scope is set\n"); } #endif loc_scope = 0; @@ -1957,7 +1957,7 @@ sctp_ipv6_source_address_selection(struct sctp_inpcb *inp, } else if (IN6_IS_ADDR_LINKLOCAL(&to->sin6_addr)) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Link local scope is set, id:%d\n", to->sin6_scope_id); + kprintf("Link local scope is set, id:%d\n", to->sin6_scope_id); } #endif if (to->sin6_scope_id) @@ -1969,7 +1969,7 @@ sctp_ipv6_source_address_selection(struct sctp_inpcb *inp, } else { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Global scope is set\n"); + kprintf("Global scope is set\n"); } #endif } @@ -1979,7 +1979,7 @@ sctp_ipv6_source_address_selection(struct sctp_inpcb *inp, */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Destination address:"); + kprintf("Destination address:"); sctp_print_address((struct sockaddr *)to); } #endif @@ -1987,14 +1987,14 @@ sctp_ipv6_source_address_selection(struct sctp_inpcb *inp, if (inp->sctp_flags & SCTP_PCB_FLAGS_BOUNDALL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Calling bound-all src addr selection for v6\n"); + kprintf("Calling bound-all src addr selection for v6\n"); } #endif rt_addr = sctp_choose_v6_boundall(inp, stcb, net, ro->ro_rt, loc_scope, loopscope, non_asoc_addr_ok); } else { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Calling bound-specific src addr selection for v6\n"); + kprintf("Calling bound-specific src addr selection for v6\n"); } #endif if (stcb) @@ -2008,7 +2008,7 @@ sctp_ipv6_source_address_selection(struct sctp_inpcb *inp, struct in6_addr in6; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("V6 packet will reach dead-end no suitable src address\n"); + kprintf("V6 packet will reach dead-end no suitable src address\n"); } #endif memset(&in6, 0, sizeof(in6)); @@ -2016,7 +2016,7 @@ sctp_ipv6_source_address_selection(struct sctp_inpcb *inp, } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Source address selected is:"); + kprintf("Source address selected is:"); sctp_print_address((struct sockaddr *)rt_addr); } #endif @@ -2113,7 +2113,7 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, if ((m->m_flags & M_PKTHDR) == 0) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Software error: sctp_lowlevel_chunk_output() called with non pkthdr!\n"); + kprintf("Software error: sctp_lowlevel_chunk_output() called with non pkthdr!\n"); } #endif sctp_m_freem(m); @@ -2246,8 +2246,8 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("low_level_output: dropped v4 packet- no valid source addr\n"); - printf("Destination was %x\n", (u_int)(ntohl(ip->ip_dst.s_addr))); + kprintf("low_level_output: dropped v4 packet- no valid source addr\n"); + kprintf("Destination was %x\n", (u_int)(ntohl(ip->ip_dst.s_addr))); } #endif /* SCTP_DEBUG */ if (net) { @@ -2283,10 +2283,10 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, o_flgs = (IP_RAWOUTPUT | (inp->sctp_socket->so_options & (SO_DONTROUTE | SO_BROADCAST))); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT3) { - printf("Calling ipv4 output routine from low level src addr:%x\n", + kprintf("Calling ipv4 output routine from low level src addr:%x\n", (u_int)(ntohl(ip->ip_src.s_addr))); - printf("Destination is %x\n", (u_int)(ntohl(ip->ip_dst.s_addr))); - printf("RTP route is %p through\n", ro->ro_rt); + kprintf("Destination is %x\n", (u_int)(ntohl(ip->ip_dst.s_addr))); + kprintf("RTP route is %p through\n", ro->ro_rt); } #endif if ((have_mtu) && (net) && (have_mtu > net->mtu)) { @@ -2309,7 +2309,7 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, sctp_pegs[SCTP_DATAGRAMS_SENT]++; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT3) { - printf("Ip output returns %d\n", ret); + kprintf("Ip output returns %d\n", ret); } #endif if (net == NULL) { @@ -2433,7 +2433,7 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("low_level_output: dropped v6 pkt- no valid source addr\n"); + kprintf("low_level_output: dropped v6 pkt- no valid source addr\n"); } #endif sctp_m_freem(m); @@ -2500,10 +2500,10 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, sin6->sin6_addr = ip6h->ip6_dst; lsa6->sin6_addr = ip6h->ip6_src; - printf("Calling ipv6 output routine from low level\n"); - printf("src: "); + kprintf("Calling ipv6 output routine from low level\n"); + kprintf("src: "); sctp_print_address((struct sockaddr *)lsa6); - printf("dst: "); + kprintf("dst: "); sctp_print_address((struct sockaddr *)sin6); } #endif /* SCTP_DEBUG */ @@ -2536,7 +2536,7 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT3) { - printf("return from send is %d\n", ret); + kprintf("return from send is %d\n", ret); } #endif /* SCTP_DEBUG_OUTPUT */ sctp_pegs[SCTP_DATAGRAMS_SENT]++; @@ -2576,7 +2576,7 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, else { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Unknown protocol (TSNH) type %d\n", ((struct sockaddr *)to)->sa_family); + kprintf("Unknown protocol (TSNH) type %d\n", ((struct sockaddr *)to)->sa_family); } #endif sctp_m_freem(m); @@ -2682,7 +2682,7 @@ sctp_send_initiate(struct sctp_inpcb *inp, struct sctp_tcb *stcb) } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT4) { - printf("Sending INIT to "); + kprintf("Sending INIT to "); sctp_print_address ((struct sockaddr *)&net->ro._l_addr); } #endif @@ -2956,7 +2956,7 @@ sctp_send_initiate(struct sctp_inpcb *inp, struct sctp_tcb *stcb) } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT4) { - printf("Calling lowlevel output stcb:%x net:%x\n", + kprintf("Calling lowlevel output stcb:%x net:%x\n", (u_int)stcb, (u_int)net); } #endif @@ -2964,7 +2964,7 @@ sctp_send_initiate(struct sctp_inpcb *inp, struct sctp_tcb *stcb) (struct sockaddr *)&net->ro._l_addr, m, 0, 0, NULL, 0); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT4) { - printf("Low level output returns %d\n", ret); + kprintf("Low level output returns %d\n", ret); } #endif sctp_timer_start(SCTP_TIMER_TYPE_INIT, inp, stcb, net); @@ -3004,7 +3004,7 @@ sctp_arethere_unrecognized_parameters(struct mbuf *in_initpkt, limit = ntohs(cp->chunk_length) - sizeof(struct sctp_init_chunk); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT4) { - printf("Limit is %d bytes\n", limit); + kprintf("Limit is %d bytes\n", limit); } #endif at = param_offset; @@ -3018,7 +3018,7 @@ sctp_arethere_unrecognized_parameters(struct mbuf *in_initpkt, if (plen < sizeof(struct sctp_paramhdr)) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT4) { - printf("sctp_output.c:Impossible length in parameter < %d\n", plen); + kprintf("sctp_output.c:Impossible length in parameter < %d\n", plen); } #endif *abort_processing = 1; @@ -3057,7 +3057,7 @@ sctp_arethere_unrecognized_parameters(struct mbuf *in_initpkt, /* We can NOT handle HOST NAME addresses!! */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT4) { - printf("Can't handle hostname addresses.. abort processing\n"); + kprintf("Can't handle hostname addresses.. abort processing\n"); } #endif *abort_processing = 1; @@ -3105,7 +3105,7 @@ sctp_arethere_unrecognized_parameters(struct mbuf *in_initpkt, */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT4) { - printf("Got parameter type %x - unknown\n", + kprintf("Got parameter type %x - unknown\n", (u_int)ptype); } #endif @@ -3113,7 +3113,7 @@ sctp_arethere_unrecognized_parameters(struct mbuf *in_initpkt, /* Report bit is set?? */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT4) { - printf("Report bit is set\n"); + kprintf("Report bit is set\n"); } #endif if (op_err == NULL) { @@ -3160,7 +3160,7 @@ sctp_arethere_unrecognized_parameters(struct mbuf *in_initpkt, if ((ptype & 0x8000) == 0x0000) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT4) { - printf("Abort bit is now setting1\n"); + kprintf("Abort bit is now setting1\n"); } #endif return (op_err); @@ -3848,7 +3848,7 @@ sctp_send_initiate_ack(struct sctp_inpcb *inp, struct sctp_tcb *stcb, if (laddr->ifa == NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Help I have fallen and I can't get up!\n"); + kprintf("Help I have fallen and I can't get up!\n"); } #endif continue; @@ -4224,8 +4224,8 @@ sctp_msg_append(struct sctp_tcb *stcb, /* Software fault, you blew it on the call */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("software error in sctp_msg_append:1\n"); - printf("stcb:%p net:%p m:%p srcv:%p\n", + kprintf("software error in sctp_msg_append:1\n"); + kprintf("stcb:%p net:%p m:%p srcv:%p\n", stcb, net, m, srcv); } #endif @@ -4283,7 +4283,7 @@ sctp_msg_append(struct sctp_tcb *stcb, /* huh? software error */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("software error in sctp_msg_append:2\n"); + kprintf("software error in sctp_msg_append:2\n"); } #endif error = EFAULT; @@ -4302,7 +4302,7 @@ sctp_msg_append(struct sctp_tcb *stcb, } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Attempt to send out %d bytes\n", + kprintf("Attempt to send out %d bytes\n", dataout); } #endif @@ -4621,7 +4621,7 @@ zap_by_it_all: /* only send SHUTDOWN the first time through */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT4) { - printf("%s:%d sends a shutdown\n", + kprintf("%s:%d sends a shutdown\n", __FILE__, __LINE__ ); @@ -4664,7 +4664,7 @@ zap_by_it_all: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT2) { - printf("++total out:%d total_mbuf_out:%d\n", + kprintf("++total out:%d total_mbuf_out:%d\n", (int)asoc->total_output_queue_size, (int)asoc->total_output_mbuf_queue_size); } @@ -4904,7 +4904,7 @@ sctp_sendall (struct sctp_inpcb *inp, struct uio *uio, struct mbuf *m, struct sc (void *)ca, 0, sctp_sendall_completes, inp); if (ret) { #ifdef SCTP_DEBUG - printf("Failed to initate iterator to takeover associations\n"); + kprintf("Failed to initate iterator to takeover associations\n"); #endif FREE(ca, M_PCB); return (EFAULT); @@ -5008,7 +5008,7 @@ sctp_clean_up_datalist(struct sctp_tcb *stcb, /* Mark the chunk as being a window probe */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("WINDOW PROBE SET\n"); + kprintf("WINDOW PROBE SET\n"); } #endif sctp_pegs[SCTP_WINDOW_PROBES]++; @@ -5302,7 +5302,7 @@ sctp_fill_outqueue(struct sctp_tcb *stcb, sctp_pegs[SCTP_MOVED_MAX]++; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT3) { - printf("Ok we moved %d chunks to send queue\n", + kprintf("Ok we moved %d chunks to send queue\n", moved); } #endif @@ -5394,7 +5394,7 @@ sctp_med_chunk_output(struct sctp_inpcb *inp, #endif #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT3) { - printf("***********************\n"); + kprintf("***********************\n"); } #endif hbflag = 0; @@ -5409,7 +5409,7 @@ sctp_med_chunk_output(struct sctp_inpcb *inp, TAILQ_EMPTY(&asoc->out_wheel)) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT3) { - printf("All wheels empty\n"); + kprintf("All wheels empty\n"); } #endif return (0); @@ -5426,7 +5426,7 @@ sctp_med_chunk_output(struct sctp_inpcb *inp, } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT3) { - printf("Ok we have done the fillup no_data_chunk=%d tf=%d prw:%d\n", + kprintf("Ok we have done the fillup no_data_chunk=%d tf=%d prw:%d\n", (int)no_data_chunks, (int)asoc->total_flight, (int)asoc->peers_rwnd); } @@ -5434,7 +5434,7 @@ sctp_med_chunk_output(struct sctp_inpcb *inp, TAILQ_FOREACH(net, &asoc->nets, sctp_next) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT3) { - printf("net:%p fs:%d cwnd:%d\n", + kprintf("net:%p fs:%d cwnd:%d\n", net, net->flight_size, net->cwnd); } #endif @@ -5443,7 +5443,7 @@ sctp_med_chunk_output(struct sctp_inpcb *inp, cwnd_full_ind++; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT3) { - printf("Ok skip fillup->fs:%d > cwnd:%d\n", + kprintf("Ok skip fillup->fs:%d > cwnd:%d\n", net->flight_size, net->cwnd); } @@ -5465,16 +5465,16 @@ sctp_med_chunk_output(struct sctp_inpcb *inp, TAILQ_FOREACH(chk, &asoc->send_queue, sctp_next) { chk_cnt++; } - printf("We have %d chunks on the send_queue\n", chk_cnt); + kprintf("We have %d chunks on the send_queue\n", chk_cnt); chk_cnt = 0; TAILQ_FOREACH(chk, &asoc->sent_queue, sctp_next) { chk_cnt++; } - printf("We have %d chunks on the sent_queue\n", chk_cnt); + kprintf("We have %d chunks on the sent_queue\n", chk_cnt); TAILQ_FOREACH(chk, &asoc->control_send_queue, sctp_next) { chk_cnt++; } - printf("We have %d chunks on the control_queue\n", chk_cnt); + kprintf("We have %d chunks on the control_queue\n", chk_cnt); } #endif /* If we have data to send, and DSACK is running, stop it @@ -5546,7 +5546,7 @@ sctp_med_chunk_output(struct sctp_inpcb *inp, } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT3) { - printf("Ok r_mtu is %d mtu is %d for this net:%p one_chunk:%d\n", + kprintf("Ok r_mtu is %d mtu is %d for this net:%p one_chunk:%d\n", r_mtu, mtu, net, one_chunk); } #endif @@ -5706,14 +5706,14 @@ sctp_med_chunk_output(struct sctp_inpcb *inp, error_out_again: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT2) { - printf("Gak got ctrl error %d\n", error); + kprintf("Gak got ctrl error %d\n", error); } #endif /* error, could not output */ if (hbflag) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT3) { - printf("Update HB anyway\n"); + kprintf("Update HB anyway\n"); } #endif if (*now_filled == 0) { @@ -5733,7 +5733,7 @@ sctp_med_chunk_output(struct sctp_inpcb *inp, */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT3) { - printf("Moving data to an alterante\n"); + kprintf("Moving data to an alterante\n"); } #endif sctp_move_to_an_alt(stcb, asoc, net); @@ -5782,7 +5782,7 @@ sctp_med_chunk_output(struct sctp_inpcb *inp, #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT3) { - printf("Now to data transmission\n"); + kprintf("Now to data transmission\n"); } #endif @@ -5793,7 +5793,7 @@ sctp_med_chunk_output(struct sctp_inpcb *inp, /* let only control go out */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT3) { - printf("Either nothing to send or we are full\n"); + kprintf("Either nothing to send or we are full\n"); } #endif break; @@ -5802,7 +5802,7 @@ sctp_med_chunk_output(struct sctp_inpcb *inp, /* skip this net, no room for data */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT3) { - printf("fs:%d > cwnd:%d\n", + kprintf("fs:%d > cwnd:%d\n", net->flight_size, net->cwnd); } #endif @@ -5815,7 +5815,7 @@ sctp_med_chunk_output(struct sctp_inpcb *inp, /* No, not sent to this net */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT3) { - printf("chk->whoTo:%p not %p\n", + kprintf("chk->whoTo:%p not %p\n", chk->whoTo, net); } @@ -5824,7 +5824,7 @@ sctp_med_chunk_output(struct sctp_inpcb *inp, } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT3) { - printf("Can we pick up a chunk?\n"); + kprintf("Can we pick up a chunk?\n"); } #endif if ((chk->send_size > omtu) && ((chk->flags & CHUNK_FLAGS_FRAGMENT_OK) == 0)) { @@ -5836,7 +5836,7 @@ sctp_med_chunk_output(struct sctp_inpcb *inp, * printing a warning. This really should not happen ... */ /*#ifdef SCTP_DEBUG*/ - printf("Warning chunk of %d bytes > mtu:%d and yet PMTU disc missed\n", + kprintf("Warning chunk of %d bytes > mtu:%d and yet PMTU disc missed\n", chk->send_size, mtu); /*#endif*/ chk->flags |= CHUNK_FLAGS_FRAGMENT_OK; @@ -5847,14 +5847,14 @@ sctp_med_chunk_output(struct sctp_inpcb *inp, /* ok we will add this one */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT3) { - printf("Picking up the chunk\n"); + kprintf("Picking up the chunk\n"); } #endif outchain = sctp_copy_mbufchain(chk->data, outchain); if (outchain == NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT3) { - printf("Gakk no memory\n"); + kprintf("Gakk no memory\n"); } #endif if (!callout_pending(&net->rxt_timer.timer)) { @@ -5889,7 +5889,7 @@ sctp_med_chunk_output(struct sctp_inpcb *inp, */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT3) { - printf("ok no more chk:%d > mtu:%d || < r_mtu:%d\n", + kprintf("ok no more chk:%d > mtu:%d || < r_mtu:%d\n", chk->send_size, mtu, r_mtu); } #endif @@ -5901,7 +5901,7 @@ sctp_med_chunk_output(struct sctp_inpcb *inp, /* Is there something to send for this destination? */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT3) { - printf("ok now is chain assembled? %p\n", + kprintf("ok now is chain assembled? %p\n", outchain); } #endif @@ -5923,7 +5923,7 @@ sctp_med_chunk_output(struct sctp_inpcb *inp, */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT3) { - printf("ok lets start a send timer .. we will transmit %p\n", + kprintf("ok lets start a send timer .. we will transmit %p\n", outchain); } #endif @@ -5985,13 +5985,13 @@ sctp_med_chunk_output(struct sctp_inpcb *inp, errored_send: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT3) { - printf("Gak send error %d\n", error); + kprintf("Gak send error %d\n", error); } #endif if (hbflag) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT3) { - printf("Update HB time anyway\n"); + kprintf("Update HB time anyway\n"); } #endif if (*now_filled == 0) { @@ -6010,7 +6010,7 @@ sctp_med_chunk_output(struct sctp_inpcb *inp, */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT3) { - printf("Calling the movement routine\n"); + kprintf("Calling the movement routine\n"); } #endif sctp_move_to_an_alt(stcb, asoc, net); @@ -6585,7 +6585,7 @@ sctp_chunk_retransmission(struct sctp_inpcb *inp, if (TAILQ_EMPTY(&asoc->sent_queue)) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("SCTP hits empty queue with cnt set to %d?\n", + kprintf("SCTP hits empty queue with cnt set to %d?\n", asoc->sent_queue_retran_cnt); } #endif @@ -6686,7 +6686,7 @@ sctp_chunk_retransmission(struct sctp_inpcb *inp, } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Normal chunk retransmission cnt:%d\n", + kprintf("Normal chunk retransmission cnt:%d\n", asoc->sent_queue_retran_cnt); } #endif @@ -6728,7 +6728,7 @@ sctp_chunk_retransmission(struct sctp_inpcb *inp, } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("blocked-peers_rwnd:%d tf:%d\n", + kprintf("blocked-peers_rwnd:%d tf:%d\n", (int)asoc->peers_rwnd, (int)asoc->total_flight); } @@ -6959,7 +6959,7 @@ sctp_timer_validation(struct sctp_inpcb *inp, /* Gak, we did not have a timer somewhere */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT3) { - printf("Deadlock avoided starting timer on a dest at retran\n"); + kprintf("Deadlock avoided starting timer on a dest at retran\n"); } #endif sctp_timer_start(SCTP_TIMER_TYPE_SEND, inp, stcb, asoc->primary_destination); @@ -6997,7 +6997,7 @@ sctp_chunk_output(struct sctp_inpcb *inp, sctp_pegs[SCTP_CALLS_TO_CO]++; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT3) { - printf("in co - retran count:%d\n", asoc->sent_queue_retran_cnt); + kprintf("in co - retran count:%d\n", asoc->sent_queue_retran_cnt); } #endif while (asoc->sent_queue_retran_cnt) { @@ -7009,7 +7009,7 @@ sctp_chunk_output(struct sctp_inpcb *inp, /* Can't send anymore */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("retransmission ret:%d -- full\n", ret); + kprintf("retransmission ret:%d -- full\n", ret); } #endif /* @@ -7022,7 +7022,7 @@ sctp_chunk_output(struct sctp_inpcb *inp, &now, &now_filled); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Control send outputs:%d@full\n", num_out); + kprintf("Control send outputs:%d@full\n", num_out); } #endif #ifdef SCTP_AUDITING_ENABLED @@ -7037,7 +7037,7 @@ sctp_chunk_output(struct sctp_inpcb *inp, */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Done with retrans, none left fill up window\n"); + kprintf("Done with retrans, none left fill up window\n"); } #endif #ifdef SCTP_AUDITING_ENABLED @@ -7049,7 +7049,7 @@ sctp_chunk_output(struct sctp_inpcb *inp, /* Only one transmission allowed out of a timeout */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Only one packet allowed out\n"); + kprintf("Only one packet allowed out\n"); } #endif #ifdef SCTP_AUDITING_ENABLED @@ -7089,7 +7089,7 @@ sctp_chunk_output(struct sctp_inpcb *inp, */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT3) { - printf("examined net:%p burst limit:%d\n", net, asoc->max_burst); + kprintf("examined net:%p burst limit:%d\n", net, asoc->max_burst); } #endif @@ -7114,7 +7114,7 @@ sctp_chunk_output(struct sctp_inpcb *inp, do { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT3) { - printf("Burst count:%d - call m-c-o\n", burst_cnt); + kprintf("Burst count:%d - call m-c-o\n", burst_cnt); } #endif error = sctp_med_chunk_output(inp, stcb, asoc, &num_out, @@ -7123,7 +7123,7 @@ sctp_chunk_output(struct sctp_inpcb *inp, if (error) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Error %d was returned from med-c-op\n", error); + kprintf("Error %d was returned from med-c-op\n", error); } #endif #ifdef SCTP_LOG_MAXBURST @@ -7133,7 +7133,7 @@ sctp_chunk_output(struct sctp_inpcb *inp, } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT3) { - printf("m-c-o put out %d\n", num_out); + kprintf("m-c-o put out %d\n", num_out); } #endif tot_out += num_out; @@ -7157,7 +7157,7 @@ sctp_chunk_output(struct sctp_inpcb *inp, #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Ok, we have put out %d chunks\n", tot_out); + kprintf("Ok, we have put out %d chunks\n", tot_out); } #endif if (tot_out == 0) { @@ -7209,7 +7209,7 @@ sctp_output(struct sctp_inpcb *inp, struct mbuf *m, struct sockaddr *addr, #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("USR Send BEGINS\n"); + kprintf("USR Send BEGINS\n"); } #endif @@ -7418,7 +7418,7 @@ sctp_output(struct sctp_inpcb *inp, struct mbuf *m, struct sockaddr *addr, SCTP_ASOC_CREATE_UNLOCK(inp); create_lock_applied = 0; } else { - printf("Huh-1, create lock should have been applied!\n"); + kprintf("Huh-1, create lock should have been applied!\n"); } queue_only = 1; asoc = &stcb->asoc; @@ -7444,7 +7444,7 @@ sctp_output(struct sctp_inpcb *inp, struct mbuf *m, struct sockaddr *addr, /* Default is NOT correct */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Ok, defout:%d pre_open:%d\n", + kprintf("Ok, defout:%d pre_open:%d\n", asoc->streamoutcnt, asoc->pre_open_streams); } #endif @@ -7531,10 +7531,10 @@ sctp_output(struct sctp_inpcb *inp, struct mbuf *m, struct sockaddr *addr, #ifdef SCTP_DEBUG else { if (sctp_debug_on & SCTP_DEBUG_OUTPUT5) { - printf("stream:%d\n", srcv.sinfo_stream); - printf("flags:%x\n", (u_int)srcv.sinfo_flags); - printf("ppid:%d\n", srcv.sinfo_ppid); - printf("context:%d\n", srcv.sinfo_context); + kprintf("stream:%d\n", srcv.sinfo_stream); + kprintf("flags:%x\n", (u_int)srcv.sinfo_flags); + kprintf("ppid:%d\n", srcv.sinfo_ppid); + kprintf("context:%d\n", srcv.sinfo_context); } } #endif @@ -7584,7 +7584,7 @@ sctp_output(struct sctp_inpcb *inp, struct mbuf *m, struct sockaddr *addr, /* we can attempt to send too.*/ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("USR Send calls sctp_chunk_output\n"); + kprintf("USR Send calls sctp_chunk_output\n"); } #endif #ifdef SCTP_AUDITING_ENABLED @@ -7601,7 +7601,7 @@ sctp_output(struct sctp_inpcb *inp, struct mbuf *m, struct sockaddr *addr, } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("USR Send complete qo:%d prw:%d\n", queue_only, stcb->asoc.peers_rwnd); + kprintf("USR Send complete qo:%d prw:%d\n", queue_only, stcb->asoc.peers_rwnd); } #endif SCTP_TCB_UNLOCK(stcb); @@ -7852,7 +7852,7 @@ sctp_send_sack(struct sctp_tcb *stcb) */ #ifdef SCTP_DEBUG if (asoc->last_data_chunk_from == NULL) { - printf("Huh, last_data_chunk_from is null when we want to sack??\n"); + kprintf("Huh, last_data_chunk_from is null when we want to sack??\n"); } #endif asoc->used_alt_onsack = 0; @@ -7903,7 +7903,7 @@ sctp_send_sack(struct sctp_tcb *stcb) if (maxi > m_size) { /* impossible but who knows, someone is playing with us :> */ #ifdef SCTP_DEBUG - printf("GAK maxi:%d > m_size:%d came out higher than allowed htsn:%u base:%u cumack:%u\n", + kprintf("GAK maxi:%d > m_size:%d came out higher than allowed htsn:%u base:%u cumack:%u\n", maxi, m_size, asoc->highest_tsn_inside_map, @@ -8244,7 +8244,7 @@ sctp_send_shutdown_complete2(struct mbuf *m, int iphlen, struct sctphdr *sh) bzero(&ro, sizeof ro); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT2) { - printf("sctp_shutdown_complete2 calling ip_output:\n"); + kprintf("sctp_shutdown_complete2 calling ip_output:\n"); sctp_print_address_pkt(iph_out, &comp_cp->sh); } #endif @@ -8274,7 +8274,7 @@ sctp_send_shutdown_complete2(struct mbuf *m, int iphlen, struct sctphdr *sh) bzero(&ro, sizeof(ro)); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT2) { - printf("sctp_shutdown_complete2 calling ip6_output:\n"); + kprintf("sctp_shutdown_complete2 calling ip6_output:\n"); sctp_print_address_pkt((struct ip *)ip6_out, &comp_cp->sh); } @@ -8312,7 +8312,7 @@ sctp_select_hb_destination(struct sctp_tcb *stcb, struct timeval *now) /* Skip this guy from consideration if HB is off AND its confirmed*/ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT4) { - printf("Skipping net:%p state:%d nohb/out-of-scope\n", + kprintf("Skipping net:%p state:%d nohb/out-of-scope\n", net, net->dest_state); } #endif @@ -8322,7 +8322,7 @@ sctp_select_hb_destination(struct sctp_tcb *stcb, struct timeval *now) /* skip this dest net from consideration */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT4) { - printf("Skipping net:%p reachable NOT\n", + kprintf("Skipping net:%p reachable NOT\n", net); } #endif @@ -8336,7 +8336,7 @@ sctp_select_hb_destination(struct sctp_tcb *stcb, struct timeval *now) ms_goneby = 0x7fffffff; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT4) { - printf("net:%p ms_goneby:%d\n", + kprintf("net:%p ms_goneby:%d\n", net, ms_goneby); } #endif @@ -8356,7 +8356,7 @@ sctp_select_hb_destination(struct sctp_tcb *stcb, struct timeval *now) hnet = net; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT4) { - printf("net:%p is the new high\n", + kprintf("net:%p is the new high\n", net); } #endif @@ -8376,12 +8376,12 @@ sctp_select_hb_destination(struct sctp_tcb *stcb, struct timeval *now) */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT4) { - printf("net:%p is the hb winner -", + kprintf("net:%p is the hb winner -", hnet); if (hnet) sctp_print_address((struct sockaddr *)&hnet->ro._l_addr); else - printf(" none\n"); + kprintf(" none\n"); } #endif /* update the timer now */ @@ -8457,7 +8457,7 @@ sctp_send_hb(struct sctp_tcb *stcb, int user_req, struct sctp_nets *u_net) if (chk == NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT4) { - printf("Gak, can't get a chunk for hb\n"); + kprintf("Gak, can't get a chunk for hb\n"); } #endif return (0); @@ -8519,7 +8519,7 @@ sctp_send_hb(struct sctp_tcb *stcb, int user_req, struct sctp_nets *u_net) /* huh compiler bug */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Compiler bug bleeds a mbuf and a chunk\n"); + kprintf("Compiler bug bleeds a mbuf and a chunk\n"); } #endif return (0); @@ -8551,7 +8551,7 @@ sctp_send_hb(struct sctp_tcb *stcb, int user_req, struct sctp_nets *u_net) net->hb_responded = 0; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT4) { - printf("Inserting chunk for HB\n"); + kprintf("Inserting chunk for HB\n"); } #endif TAILQ_INSERT_TAIL(&stcb->asoc.control_send_queue, chk, sctp_next); @@ -9213,7 +9213,7 @@ sctp_send_abort(struct mbuf *m, int iphlen, struct sctphdr *sh, uint32_t vtag, bzero(&ro, sizeof ro); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT2) { - printf("sctp_send_abort calling ip_output:\n"); + kprintf("sctp_send_abort calling ip_output:\n"); sctp_print_address_pkt(iph_out, &abm->sh); } #endif @@ -9244,7 +9244,7 @@ sctp_send_abort(struct mbuf *m, int iphlen, struct sctphdr *sh, uint32_t vtag, bzero(&ro, sizeof(ro)); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT2) { - printf("sctp_send_abort calling ip6_output:\n"); + kprintf("sctp_send_abort calling ip6_output:\n"); sctp_print_address_pkt((struct ip *)ip6_out, &abm->sh); } #endif @@ -9282,7 +9282,7 @@ sctp_send_operr_to(struct mbuf *m, int iphlen, ihdr = (struct sctphdr *)((caddr_t)iph + iphlen); if (!(scm->m_flags & M_PKTHDR)) { /* must be a pkthdr */ - printf("Huh, not a packet header in send_operr\n"); + kprintf("Huh, not a packet header in send_operr\n"); m_freem(scm); return; } @@ -9380,10 +9380,10 @@ sctp_send_operr_to(struct mbuf *m, int iphlen, fsa6.sin6_family = AF_INET6; fsa6.sin6_addr = out6->ip6_dst; if (sctp_debug_on & SCTP_DEBUG_OUTPUT2) { - printf("sctp_operr_to calling ipv6 output:\n"); - printf("src: "); + kprintf("sctp_operr_to calling ipv6 output:\n"); + kprintf("src: "); sctp_print_address((struct sockaddr *)&lsa6); - printf("dst "); + kprintf("dst "); sctp_print_address((struct sockaddr *)&fsa6); } #endif /* SCTP_DEBUG */ @@ -9716,7 +9716,7 @@ sctp_copy_it_in(struct sctp_inpcb *inp, /* huh? software error */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("software error in sctp_copy_it_in\n"); + kprintf("software error in sctp_copy_it_in\n"); } #endif error = EFAULT; @@ -9976,7 +9976,7 @@ zap_by_it_now: /* only send SHUTDOWN the first time through */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT4) { - printf("%s:%d sends a shutdown\n", + kprintf("%s:%d sends a shutdown\n", __FILE__, __LINE__ ); @@ -10005,7 +10005,7 @@ zap_by_it_now: crit_exit(); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT2) { - printf("++total out:%d total_mbuf_out:%d\n", + kprintf("++total out:%d total_mbuf_out:%d\n", (int)asoc->total_output_queue_size, (int)asoc->total_output_mbuf_queue_size); } @@ -10199,7 +10199,7 @@ sctp_sosend(struct socket *so, SCTP_ASOC_CREATE_UNLOCK(inp); create_lock_applied = 0; } else { - printf("Huh-3? create lock should have been on??\n"); + kprintf("Huh-3? create lock should have been on??\n"); } /* Turn on queue only flag to prevent data from being sent */ queue_only = 1; @@ -10224,7 +10224,7 @@ sctp_sosend(struct socket *so, /* Default is NOT correct */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("Ok, defout:%d pre_open:%d\n", + kprintf("Ok, defout:%d pre_open:%d\n", asoc->streamoutcnt, asoc->pre_open_streams); } #endif @@ -10387,7 +10387,7 @@ sctp_sosend(struct socket *so, /* we can attempt to send too.*/ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("USR Send calls sctp_chunk_output\n"); + kprintf("USR Send calls sctp_chunk_output\n"); } #endif crit_enter(); @@ -10414,7 +10414,7 @@ sctp_sosend(struct socket *so, } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT1) { - printf("USR Send complete qo:%d prw:%d unsent:%d tf:%d cooq:%d toqs:%d \n", + kprintf("USR Send complete qo:%d prw:%d unsent:%d tf:%d cooq:%d toqs:%d \n", queue_only, stcb->asoc.peers_rwnd, un_sent, stcb->asoc.total_flight, stcb->asoc.chunks_on_out_queue, stcb->asoc.total_output_queue_size); diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index e960d9fb8c..ccab176e52 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -1,5 +1,5 @@ /* $KAME: sctp_pcb.c,v 1.37 2004/08/17 06:28:02 t-momose Exp $ */ -/* $DragonFly: src/sys/netinet/sctp_pcb.c,v 1.10 2006/06/23 17:20:13 eirikn Exp $ */ +/* $DragonFly: src/sys/netinet/sctp_pcb.c,v 1.11 2006/12/22 23:57:52 swildner Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Cisco Systems, Inc. @@ -327,7 +327,7 @@ sctp_tcb_special_locate(struct sctp_inpcb **inp_p, struct sockaddr *from, if (laddr->ifa == NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB1) { - printf("An ounce of prevention is worth a pound of cure\n"); + kprintf("An ounce of prevention is worth a pound of cure\n"); } #endif continue; @@ -335,7 +335,7 @@ sctp_tcb_special_locate(struct sctp_inpcb **inp_p, struct sockaddr *from, if (laddr->ifa->ifa_addr == NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB1) { - printf("ifa with a NULL address\n"); + kprintf("ifa with a NULL address\n"); } #endif continue; @@ -481,7 +481,7 @@ sctp_findassociation_ep_asconf(struct mbuf *m, int iphlen, int offset, if (phdr == NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("sctp_process_control: failed to get asconf lookup addr\n"); + kprintf("sctp_process_control: failed to get asconf lookup addr\n"); } #endif /* SCTP_DEBUG */ return NULL; @@ -501,7 +501,7 @@ sctp_findassociation_ep_asconf(struct mbuf *m, int iphlen, int offset, if (p6 == NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("sctp_process_control: failed to get asconf v6 lookup addr\n"); + kprintf("sctp_process_control: failed to get asconf v6 lookup addr\n"); } #endif /* SCTP_DEBUG */ return (NULL); @@ -524,7 +524,7 @@ sctp_findassociation_ep_asconf(struct mbuf *m, int iphlen, int offset, if (p4 == NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT3) { - printf("sctp_process_control: failed to get asconf v4 lookup addr\n"); + kprintf("sctp_process_control: failed to get asconf v4 lookup addr\n"); } #endif /* SCTP_DEBUG */ return (NULL); @@ -856,7 +856,7 @@ sctp_endpoint_probe(struct sockaddr *nam, struct sctppcbhead *head, */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB1) { - printf("Ok, there is NO bound-all available for port:%x\n", ntohs(lport)); + kprintf("Ok, there is NO bound-all available for port:%x\n", ntohs(lport)); } #endif LIST_FOREACH(inp, head, sctp_hash) { @@ -875,38 +875,38 @@ sctp_endpoint_probe(struct sockaddr *nam, struct sctppcbhead *head, } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB1) { - printf("Ok, found maching local port\n"); + kprintf("Ok, found maching local port\n"); } #endif LIST_FOREACH(laddr, &inp->sctp_addr_list, sctp_nxt_addr) { if (laddr->ifa == NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB1) { - printf("An ounce of prevention is worth a pound of cure\n"); + kprintf("An ounce of prevention is worth a pound of cure\n"); } #endif continue; } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB1) { - printf("Ok laddr->ifa:%p is possible, ", + kprintf("Ok laddr->ifa:%p is possible, ", laddr->ifa); } #endif if (laddr->ifa->ifa_addr == NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB1) { - printf("Huh IFA as an ifa_addr=NULL, "); + kprintf("Huh IFA as an ifa_addr=NULL, "); } #endif continue; } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB1) { - printf("Ok laddr->ifa:%p is possible, ", + kprintf("Ok laddr->ifa:%p is possible, ", laddr->ifa->ifa_addr); sctp_print_address(laddr->ifa->ifa_addr); - printf("looking for "); + kprintf("looking for "); sctp_print_address(nam); } #endif @@ -920,7 +920,7 @@ sctp_endpoint_probe(struct sockaddr *nam, struct sctppcbhead *head, intf_addr->sin_addr.s_addr) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB1) { - printf("YES, return ep:%p\n", inp); + kprintf("YES, return ep:%p\n", inp); } #endif SCTP_INP_RUNLOCK(inp); @@ -934,7 +934,7 @@ sctp_endpoint_probe(struct sockaddr *nam, struct sctppcbhead *head, &intf_addr6->sin6_addr)) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB1) { - printf("YES, return ep:%p\n", inp); + kprintf("YES, return ep:%p\n", inp); } #endif SCTP_INP_RUNLOCK(inp); @@ -947,7 +947,7 @@ sctp_endpoint_probe(struct sockaddr *nam, struct sctppcbhead *head, } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB1) { - printf("NO, Falls out to NULL\n"); + kprintf("NO, Falls out to NULL\n"); } #endif return (NULL); @@ -968,7 +968,7 @@ sctp_pcb_findep(struct sockaddr *nam, int find_tcp_pool, int have_lock) int lport; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB1) { - printf("Looking for endpoint %d :", + kprintf("Looking for endpoint %d :", ntohs(((struct sockaddr_in *)nam)->sin_port)); sctp_print_address(nam); } @@ -995,7 +995,7 @@ sctp_pcb_findep(struct sockaddr *nam, int find_tcp_pool, int have_lock) sctppcbinfo.hashmark)]; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB1) { - printf("Main hash to lookup at head:%p\n", head); + kprintf("Main hash to lookup at head:%p\n", head); } #endif inp = sctp_endpoint_probe(nam, head, lport); @@ -1011,7 +1011,7 @@ sctp_pcb_findep(struct sockaddr *nam, int find_tcp_pool, int have_lock) unsigned int i; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB1) { - printf("EP was NULL and TCP model is supported\n"); + kprintf("EP was NULL and TCP model is supported\n"); } #endif for (i = 0; i < sctppcbinfo.hashtblsize; i++) { @@ -1033,7 +1033,7 @@ sctp_pcb_findep(struct sockaddr *nam, int find_tcp_pool, int have_lock) } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB1) { - printf("EP to return is %p\n", inp); + kprintf("EP to return is %p\n", inp); } #endif if (have_lock == 0) { @@ -1137,7 +1137,7 @@ sctp_findassociation_special_addr(struct mbuf *m, int iphlen, int offset, if (plen == 0) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB1) { - printf("sctp_findassociation_special_addr: Impossible length in parameter\n"); + kprintf("sctp_findassociation_special_addr: Impossible length in parameter\n"); } #endif /* SCTP_DEBUG */ break; @@ -1320,10 +1320,10 @@ sctp_findassociation_addr(struct mbuf *m, int iphlen, int offset, } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB1) { - printf("Looking for port %d address :", + kprintf("Looking for port %d address :", ntohs(((struct sockaddr_in *)to)->sin_port)); sctp_print_address(to); - printf("From for port %d address :", + kprintf("From for port %d address :", ntohs(((struct sockaddr_in *)from)->sin_port)); sctp_print_address(from); } @@ -1355,14 +1355,14 @@ sctp_findassociation_addr(struct mbuf *m, int iphlen, int offset, } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB1) { - printf("retval:%p inp:%p\n", retval, inp); + kprintf("retval:%p inp:%p\n", retval, inp); } #endif if (retval == NULL && inp) { /* Found a EP but not this address */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB1) { - printf("Found endpoint %p but no asoc - ep state:%x\n", + kprintf("Found endpoint %p but no asoc - ep state:%x\n", inp, inp->sctp_flags); } #endif @@ -1379,7 +1379,7 @@ sctp_findassociation_addr(struct mbuf *m, int iphlen, int offset, if (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB1) { - printf("Gak, its in the TCP pool... return NULL"); + kprintf("Gak, its in the TCP pool... return NULL"); } #endif if (inp_p) { @@ -1389,7 +1389,7 @@ sctp_findassociation_addr(struct mbuf *m, int iphlen, int offset, } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB1) { - printf("Now doing SPECIAL find\n"); + kprintf("Now doing SPECIAL find\n"); } #endif retval = sctp_findassociation_special_addr(m, iphlen, @@ -1398,7 +1398,7 @@ sctp_findassociation_addr(struct mbuf *m, int iphlen, int offset, } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB1) { - printf("retval is %p\n", retval); + kprintf("retval is %p\n", retval); } #endif return (retval); @@ -1467,7 +1467,7 @@ sctp_inpcb_alloc(struct socket *so) if (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) { if (LIST_FIRST(&inp->sctp_asoc_list) == NULL) { /* finish the job now */ - printf("Found a GONE on list\n"); + kprintf("Found a GONE on list\n"); SCTP_INP_INFO_RUNLOCK(); sctp_inpcb_free(inp, 1); SCTP_INP_INFO_RLOCK(); @@ -1481,7 +1481,7 @@ sctp_inpcb_alloc(struct socket *so) SCTP_INP_INFO_WLOCK(); inp = (struct sctp_inpcb *)SCTP_ZONE_GET(sctppcbinfo.ipi_zone_ep); if (inp == NULL) { - printf("Out of SCTP-INPCB structures - no resources\n"); + kprintf("Out of SCTP-INPCB structures - no resources\n"); SCTP_INP_INFO_WUNLOCK(); return (ENOBUFS); } @@ -1558,7 +1558,7 @@ sctp_inpcb_alloc(struct socket *so) #endif &inp->sctp_hashmark); if (inp->sctp_tcbhash == NULL) { - printf("Out of SCTP-INPCB->hashinit - no resources\n"); + kprintf("Out of SCTP-INPCB->hashinit - no resources\n"); SCTP_ZONE_FREE(sctppcbinfo.ipi_zone_ep, inp); SCTP_INP_INFO_WUNLOCK(); return (ENOBUFS); @@ -1729,7 +1729,7 @@ sctp_move_pcb_and_assoc(struct sctp_inpcb *old_inp, struct sctp_inpcb *new_inp, */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB1) { - printf("Association hosed in TCP model, out of laddr memory\n"); + kprintf("Association hosed in TCP model, out of laddr memory\n"); } #endif /* SCTP_DEBUG */ continue; @@ -1837,9 +1837,9 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *addr, struct proc *p) #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB1) { if (addr) { - printf("Bind called port:%d\n", + kprintf("Bind called port:%d\n", ntohs(((struct sockaddr_in *)addr)->sin_port)); - printf("Addr :"); + kprintf("Addr :"); sctp_print_address(addr); } } @@ -2146,7 +2146,7 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *addr, struct proc *p) LIST_INSERT_HEAD(head, inp, sctp_hash); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB1) { - printf("Main hash to bind at head:%p, bound port:%d\n", head, ntohs(lport)); + kprintf("Main hash to bind at head:%p, bound port:%d\n", head, ntohs(lport)); } #endif /* set in the port */ @@ -2243,7 +2243,7 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate) if (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) { /* been here before */ crit_exit(); - printf("Endpoint was all gone (dup free)?\n"); + kprintf("Endpoint was all gone (dup free)?\n"); SCTP_INP_WUNLOCK(inp); SCTP_ASOC_CREATE_UNLOCK(inp); return; @@ -2598,7 +2598,7 @@ sctp_add_remote_addr(struct sctp_tcb *stcb, struct sockaddr *newaddr, #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB1) { - printf("Adding an address (from:%d) to the peer: ", from); + kprintf("Adding an address (from:%d) to the peer: ", from); sctp_print_address(newaddr); } #endif @@ -2743,7 +2743,7 @@ sctp_add_remote_addr(struct sctp_tcb *stcb, struct sockaddr *newaddr, if (addr_inscope == 0) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB1) { - printf("Adding an address which is OUT OF SCOPE\n"); + kprintf("Adding an address which is OUT OF SCOPE\n"); } #endif /* SCTP_DEBUG */ net->dest_state = (SCTP_ADDR_REACHABLE | @@ -2925,12 +2925,12 @@ sctp_aloc_assoc(struct sctp_inpcb *inp, struct sockaddr *firstaddr, #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB3) { - printf("Allocate an association for peer:"); + kprintf("Allocate an association for peer:"); if (firstaddr) sctp_print_address(firstaddr); else - printf("None\n"); - printf("Port:%d\n", + kprintf("None\n"); + kprintf("Port:%d\n", ntohs(((struct sockaddr_in *)firstaddr)->sin_port)); } #endif /* SCTP_DEBUG */ @@ -2941,7 +2941,7 @@ sctp_aloc_assoc(struct sctp_inpcb *inp, struct sockaddr *firstaddr, /* Invalid address */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB3) { - printf("peer address invalid\n"); + kprintf("peer address invalid\n"); } #endif SCTP_INP_RUNLOCK(inp); @@ -2957,7 +2957,7 @@ sctp_aloc_assoc(struct sctp_inpcb *inp, struct sockaddr *firstaddr, /* Invalid address */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB3) { - printf("peer address invalid\n"); + kprintf("peer address invalid\n"); } #endif SCTP_INP_RUNLOCK(inp); @@ -2969,7 +2969,7 @@ sctp_aloc_assoc(struct sctp_inpcb *inp, struct sockaddr *firstaddr, /* not supported family type */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB3) { - printf("BAD family %d\n", firstaddr->sa_family); + kprintf("BAD family %d\n", firstaddr->sa_family); } #endif SCTP_INP_RUNLOCK(inp); @@ -2984,7 +2984,7 @@ sctp_aloc_assoc(struct sctp_inpcb *inp, struct sockaddr *firstaddr, */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB3) { - printf("Doing implicit BIND\n"); + kprintf("Doing implicit BIND\n"); } #endif @@ -2999,7 +2999,7 @@ sctp_aloc_assoc(struct sctp_inpcb *inp, struct sockaddr *firstaddr, /* bind error, probably perm */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB3) { - printf("BIND FAILS ret:%d\n", err); + kprintf("BIND FAILS ret:%d\n", err); } #endif @@ -3012,7 +3012,7 @@ sctp_aloc_assoc(struct sctp_inpcb *inp, struct sockaddr *firstaddr, /* out of memory? */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB3) { - printf("aloc_assoc: no assoc mem left, stcb=NULL\n"); + kprintf("aloc_assoc: no assoc mem left, stcb=NULL\n"); } #endif *error = ENOMEM; @@ -3034,7 +3034,7 @@ sctp_aloc_assoc(struct sctp_inpcb *inp, struct sockaddr *firstaddr, sctppcbinfo.ipi_count_asoc--; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB3) { - printf("aloc_assoc: couldn't init asoc, out of mem?!\n"); + kprintf("aloc_assoc: couldn't init asoc, out of mem?!\n"); } #endif *error = err; @@ -3053,7 +3053,7 @@ sctp_aloc_assoc(struct sctp_inpcb *inp, struct sockaddr *firstaddr, sctppcbinfo.ipi_count_asoc--; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB3) { - printf("aloc_assoc: couldn't init asoc, out of mem?!\n"); + kprintf("aloc_assoc: couldn't init asoc, out of mem?!\n"); } #endif *error = EINVAL; @@ -3080,7 +3080,7 @@ sctp_aloc_assoc(struct sctp_inpcb *inp, struct sockaddr *firstaddr, sctppcbinfo.ipi_count_asoc--; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB3) { - printf("aloc_assoc: couldn't add remote addr!\n"); + kprintf("aloc_assoc: couldn't add remote addr!\n"); } #endif SCTP_TCB_LOCK_DESTROY (stcb); @@ -3113,7 +3113,7 @@ sctp_aloc_assoc(struct sctp_inpcb *inp, struct sockaddr *firstaddr, SCTP_INP_WUNLOCK(inp); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB1) { - printf("Association %p now allocated\n", stcb); + kprintf("Association %p now allocated\n", stcb); } #endif return (stcb); @@ -3316,7 +3316,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb) /* first, lets purge the entry from the hash table. */ crit_enter(); if (stcb->asoc.state == 0) { - printf("Freeing already free association:%p - huh??\n", + kprintf("Freeing already free association:%p - huh??\n", stcb); crit_exit(); return; @@ -3700,7 +3700,7 @@ sctp_update_ep_vflag(struct sctp_inpcb *inp) { if (laddr->ifa == NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB1) { - printf("An ounce of prevention is worth a pound of cure\n"); + kprintf("An ounce of prevention is worth a pound of cure\n"); } #endif /* SCTP_DEBUG */ continue; @@ -4352,7 +4352,7 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, struct mbuf *m, while (phdr) { ptype = ntohs(phdr->param_type); plen = ntohs(phdr->param_length); - /*printf("ptype => %d, plen => %d\n", ptype, plen);*/ + /*kprintf("ptype => %d, plen => %d\n", ptype, plen);*/ if (offset + plen > limit) { break; } @@ -4529,7 +4529,7 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, struct mbuf *m, if (lptype == SCTP_IPV4_ADDRESS) { if (plen != sizeof(struct sctp_asconf_addrv4_param)) { - printf("Sizeof setprim in init/init ack not %d but %d - ignored\n", + kprintf("Sizeof setprim in init/init ack not %d but %d - ignored\n", (int)sizeof(struct sctp_asconf_addrv4_param), plen); } else { @@ -4540,7 +4540,7 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, struct mbuf *m, } else if (lptype == SCTP_IPV6_ADDRESS) { if (plen != sizeof(struct sctp_asconf_addr_param)) { - printf("Sizeof setprim (v6) in init/init ack not %d but %d - ignored\n", + kprintf("Sizeof setprim (v6) in init/init ack not %d but %d - ignored\n", (int)sizeof(struct sctp_asconf_addr_param), plen); } else { @@ -4929,7 +4929,7 @@ sctp_drain_mbufs(struct sctp_inpcb *inp, struct sctp_tcb *stcb) #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB1) { if (cnt) { - printf("Freed %d chunks from reneg harvest\n", cnt); + kprintf("Freed %d chunks from reneg harvest\n", cnt); } } #endif /* SCTP_DEBUG */ diff --git a/sys/netinet/sctp_peeloff.c b/sys/netinet/sctp_peeloff.c index 4083003d61..77395c9f3b 100644 --- a/sys/netinet/sctp_peeloff.c +++ b/sys/netinet/sctp_peeloff.c @@ -1,5 +1,5 @@ /* $KAME: sctp_peeloff.c,v 1.12 2004/08/17 04:06:19 itojun Exp $ */ -/* $DragonFly: src/sys/netinet/sctp_peeloff.c,v 1.4 2006/06/23 17:20:14 eirikn Exp $ */ +/* $DragonFly: src/sys/netinet/sctp_peeloff.c,v 1.5 2006/12/22 23:57:52 swildner Exp $ */ /* * Copyright (C) 2002, 2003 Cisco Systems Inc, @@ -155,7 +155,7 @@ sctp_get_peeloff(struct socket *head, caddr_t assoc_id, int *error) #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PEEL1) { - printf("SCTP peel-off called\n"); + kprintf("SCTP peel-off called\n"); } #endif /* SCTP_DEBUG */ @@ -173,7 +173,7 @@ sctp_get_peeloff(struct socket *head, caddr_t assoc_id, int *error) if (newso == NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PEEL1) { - printf("sctp_peeloff:sonewconn failed err\n"); + kprintf("sctp_peeloff:sonewconn failed err\n"); } #endif /* SCTP_DEBUG */ *error = ENOMEM; diff --git a/sys/netinet/sctp_timer.c b/sys/netinet/sctp_timer.c index 606f029f26..5f9f7ea1a2 100644 --- a/sys/netinet/sctp_timer.c +++ b/sys/netinet/sctp_timer.c @@ -1,5 +1,5 @@ /* $KAME: sctp_timer.c,v 1.28 2004/08/17 04:06:20 itojun Exp $ */ -/* $DragonFly: src/sys/netinet/sctp_timer.c,v 1.5 2006/06/23 17:20:14 eirikn Exp $ */ +/* $DragonFly: src/sys/netinet/sctp_timer.c,v 1.6 2006/12/22 23:57:52 swildner Exp $ */ /* * Copyright (C) 2002, 2003, 2004 Cisco Systems Inc, @@ -123,7 +123,7 @@ sctp_audit_retranmission_queue(struct sctp_association *asoc) #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_TIMER4) { - printf("Audit invoked on send queue cnt:%d onqueue:%d\n", + kprintf("Audit invoked on send queue cnt:%d onqueue:%d\n", asoc->sent_queue_retran_cnt, asoc->sent_queue_cnt); } @@ -143,7 +143,7 @@ sctp_audit_retranmission_queue(struct sctp_association *asoc) } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_TIMER4) { - printf("Audit completes retran:%d onqueue:%d\n", + kprintf("Audit completes retran:%d onqueue:%d\n", asoc->sent_queue_retran_cnt, asoc->sent_queue_cnt); } @@ -158,7 +158,7 @@ sctp_threshold_management(struct sctp_inpcb *inp, struct sctp_tcb *stcb, net->error_count++; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_TIMER4) { - printf("Error count for %p now %d thresh:%d\n", + kprintf("Error count for %p now %d thresh:%d\n", net, net->error_count, net->failure_threshold); } @@ -196,7 +196,7 @@ sctp_threshold_management(struct sctp_inpcb *inp, struct sctp_tcb *stcb, } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_TIMER4) { - printf("Overall error count for %p now %d thresh:%u state:%x\n", + kprintf("Overall error count for %p now %d thresh:%u state:%x\n", &stcb->asoc, stcb->asoc.overall_error_count, (u_int)threshold, @@ -333,7 +333,7 @@ sctp_backoff_on_timeout(struct sctp_tcb *stcb, net->RTO <<= 1; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_TIMER2) { - printf("Timer doubles from %d ms -to-> %d ms\n", + kprintf("Timer doubles from %d ms -to-> %d ms\n", oldRTO, net->RTO); } #endif /* SCTP_DEBUG */ @@ -342,7 +342,7 @@ sctp_backoff_on_timeout(struct sctp_tcb *stcb, net->RTO = stcb->asoc.maxrto; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_TIMER2) { - printf("Growth capped by maxrto %d\n", + kprintf("Growth capped by maxrto %d\n", net->RTO); } #endif /* SCTP_DEBUG */ @@ -369,7 +369,7 @@ sctp_backoff_on_timeout(struct sctp_tcb *stcb, net->partial_bytes_acked = 0; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_TIMER1) { - printf("collapse cwnd to 1MTU ssthresh to %d\n", + kprintf("collapse cwnd to 1MTU ssthresh to %d\n", net->ssthresh); } #endif @@ -455,7 +455,7 @@ sctp_mark_all_for_resend(struct sctp_tcb *stcb, win_probes = non_win_probes = 0; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_TIMER2) { - printf("Marking ALL un-acked for retransmission at t3-timeout\n"); + kprintf("Marking ALL un-acked for retransmission at t3-timeout\n"); } #endif /* SCTP_DEBUG */ /* Now on to each chunk */ @@ -469,7 +469,7 @@ sctp_mark_all_for_resend(struct sctp_tcb *stcb, MAX_TSN)) || (stcb->asoc.last_acked_seq == chk->rec.data.TSN_seq)) { /* Strange case our list got out of order? */ - printf("Our list is out of order?\n"); + kprintf("Our list is out of order?\n"); TAILQ_REMOVE(&stcb->asoc.sent_queue, chk, sctp_next); if (chk->data) { sctp_release_pr_sctp_chunk(stcb, chk, 0xffff, @@ -555,7 +555,7 @@ sctp_mark_all_for_resend(struct sctp_tcb *stcb, fir = 1; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_TIMER1) { - printf("First TSN marked was %x\n", + kprintf("First TSN marked was %x\n", chk->rec.data.TSN_seq); } #endif @@ -573,7 +573,7 @@ sctp_mark_all_for_resend(struct sctp_tcb *stcb, chk->rec.data.doing_fast_retransmit = 0; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_TIMER3) { - printf("mark TSN:%x for retransmission\n", chk->rec.data.TSN_seq); + kprintf("mark TSN:%x for retransmission\n", chk->rec.data.TSN_seq); } #endif /* SCTP_DEBUG */ /* Clear any time so NO RTT is being done */ @@ -612,11 +612,11 @@ sctp_mark_all_for_resend(struct sctp_tcb *stcb, #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_TIMER1) { if (num_mk) { - printf("LAST TSN marked was %x\n", tsnlast); - printf("Num marked for retransmission was %d peer-rwd:%ld\n", + kprintf("LAST TSN marked was %x\n", tsnlast); + kprintf("Num marked for retransmission was %d peer-rwd:%ld\n", num_mk, (u_long)stcb->asoc.peers_rwnd); - printf("LAST TSN marked was %x\n", tsnlast); - printf("Num marked for retransmission was %d peer-rwd:%d\n", + kprintf("LAST TSN marked was %x\n", tsnlast); + kprintf("Num marked for retransmission was %d peer-rwd:%d\n", num_mk, (int)stcb->asoc.peers_rwnd ); @@ -625,7 +625,7 @@ sctp_mark_all_for_resend(struct sctp_tcb *stcb, #endif *num_marked = num_mk; if (stcb->asoc.sent_queue_retran_cnt != cnt_mk) { - printf("Local Audit says there are %d for retran asoc cnt:%d\n", + kprintf("Local Audit says there are %d for retran asoc cnt:%d\n", cnt_mk, stcb->asoc.sent_queue_retran_cnt); #ifndef SCTP_AUDITING_ENABLED stcb->asoc.sent_queue_retran_cnt = cnt_mk; @@ -633,7 +633,7 @@ sctp_mark_all_for_resend(struct sctp_tcb *stcb, } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_TIMER3) { - printf("**************************\n"); + kprintf("**************************\n"); } #endif /* SCTP_DEBUG */ @@ -660,7 +660,7 @@ sctp_mark_all_for_resend(struct sctp_tcb *stcb, non_win_probes = 0; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_TIMER1) { - printf("WIN_PROBE set via o_rwnd=0 tf=0 and all:%d fit in mtu:%d\n", + kprintf("WIN_PROBE set via o_rwnd=0 tf=0 and all:%d fit in mtu:%d\n", orig_flight, net->mtu); } #endif @@ -669,7 +669,7 @@ sctp_mark_all_for_resend(struct sctp_tcb *stcb, if (audit_tf) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_TIMER4) { - printf("Audit total flight due to negative value net:%p\n", + kprintf("Audit total flight due to negative value net:%p\n", net); } #endif /* SCTP_DEBUG */ @@ -680,7 +680,7 @@ sctp_mark_all_for_resend(struct sctp_tcb *stcb, lnets->flight_size = 0; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_TIMER4) { - printf("Net:%p c-f cwnd:%d ssthresh:%d\n", + kprintf("Net:%p c-f cwnd:%d ssthresh:%d\n", lnets, lnets->cwnd, lnets->ssthresh); } #endif /* SCTP_DEBUG */ @@ -848,7 +848,7 @@ sctp_t3rxt_timer(struct sctp_inpcb *inp, */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_TIMER1) { - printf("Special cookie case return\n"); + kprintf("Special cookie case return\n"); } #endif /* SCTP_DEBUG */ sctp_timer_start(SCTP_TIMER_TYPE_SEND, inp, stcb, net); @@ -867,7 +867,7 @@ sctp_t3rxt_timer(struct sctp_inpcb *inp, */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_TIMER1) { - printf("Forward TSN time\n"); + kprintf("Forward TSN time\n"); } #endif /* SCTP_DEBUG */ send_forward_tsn(stcb, &stcb->asoc); @@ -1011,7 +1011,7 @@ sctp_strreset_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb, if (strrst == NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_TIMER1) { - printf("Strange, strreset timer fires, but I can't find an str-reset?\n"); + kprintf("Strange, strreset timer fires, but I can't find an str-reset?\n"); } #endif /* SCTP_DEBUG */ return (0); @@ -1087,7 +1087,7 @@ sctp_asconf_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb, if (asconf == NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_TIMER1) { - printf("Strange, asconf timer fires, but I can't find an asconf?\n"); + kprintf("Strange, asconf timer fires, but I can't find an asconf?\n"); } #endif /* SCTP_DEBUG */ return (0); @@ -1112,7 +1112,7 @@ sctp_asconf_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb, */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_TIMER1) { - printf("asconf_timer: Peer has not responded to our repeated ASCONFs\n"); + kprintf("asconf_timer: Peer has not responded to our repeated ASCONFs\n"); } #endif /* SCTP_DEBUG */ sctp_asconf_cleanup(stcb, net); @@ -1179,7 +1179,7 @@ sctp_shutdown_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb, /* third generate a shutdown into the queue for out net */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT4) { - printf("%s:%d sends a shutdown\n", + kprintf("%s:%d sends a shutdown\n", __FILE__, __LINE__ ); @@ -1230,13 +1230,13 @@ sctp_audit_stream_queues_for_size(struct sctp_inpcb *inp, if ((stcb == NULL) || (inp == NULL)) return; if (TAILQ_EMPTY(&stcb->asoc.out_wheel)) { - printf("Strange, out_wheel empty nothing on sent/send and tot=%lu?\n", + kprintf("Strange, out_wheel empty nothing on sent/send and tot=%lu?\n", (u_long)stcb->asoc.total_output_queue_size); stcb->asoc.total_output_queue_size = 0; return; } if (stcb->asoc.sent_queue_retran_cnt) { - printf("Hmm, sent_queue_retran_cnt is non-zero %d\n", + kprintf("Hmm, sent_queue_retran_cnt is non-zero %d\n", stcb->asoc.sent_queue_retran_cnt); stcb->asoc.sent_queue_retran_cnt = 0; } @@ -1249,7 +1249,7 @@ sctp_audit_stream_queues_for_size(struct sctp_inpcb *inp, } } if (chks_in_queue != stcb->asoc.stream_queue_cnt) { - printf("Hmm, stream queue cnt at %d I counted %d in stream out wheel\n", + kprintf("Hmm, stream queue cnt at %d I counted %d in stream out wheel\n", stcb->asoc.stream_queue_cnt, chks_in_queue); } if (chks_in_queue) { @@ -1258,10 +1258,10 @@ sctp_audit_stream_queues_for_size(struct sctp_inpcb *inp, if ((TAILQ_EMPTY(&stcb->asoc.send_queue)) && (TAILQ_EMPTY(&stcb->asoc.sent_queue))) { /* Probably should go in and make it go back through and add fragments allowed */ - printf("Still nothing moved %d chunks are stuck\n", chks_in_queue); + kprintf("Still nothing moved %d chunks are stuck\n", chks_in_queue); } } else { - printf("Found no chunks on any queue tot:%lu\n", + kprintf("Found no chunks on any queue tot:%lu\n", (u_long)stcb->asoc.total_output_queue_size); stcb->asoc.total_output_queue_size = 0; } @@ -1427,7 +1427,7 @@ sctp_autoclose_timer(struct sctp_inpcb *inp, /* only send SHUTDOWN 1st time thru */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT4) { - printf("%s:%d sends a shutdown\n", + kprintf("%s:%d sends a shutdown\n", __FILE__, __LINE__ ); @@ -1505,7 +1505,7 @@ sctp_iterator_timer(struct sctp_iterator *it) } if ((it->inp->inp_starting_point_for_iterator != NULL) && (it->inp->inp_starting_point_for_iterator != it)) { - printf("Iterator collision, we must wait for other iterator at %x\n", + kprintf("Iterator collision, we must wait for other iterator at %x\n", (u_int)it->inp); SCTP_INP_WUNLOCK(it->inp); goto start_timer_return; diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c index 4b89a8ab33..0352a670ef 100644 --- a/sys/netinet/sctp_usrreq.c +++ b/sys/netinet/sctp_usrreq.c @@ -1,5 +1,5 @@ /* $KAME: sctp_usrreq.c,v 1.47 2005/03/06 16:04:18 itojun Exp $ */ -/* $DragonFly: src/sys/netinet/sctp_usrreq.c,v 1.9 2006/12/05 23:31:57 dillon Exp $ */ +/* $DragonFly: src/sys/netinet/sctp_usrreq.c,v 1.10 2006/12/22 23:57:52 swildner Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Cisco Systems, Inc. @@ -386,7 +386,7 @@ sctp_notify(struct sctp_inpcb *inp, (sh == NULL) || (to == NULL)) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ1) { - printf("sctp-notify, bad call\n"); + kprintf("sctp-notify, bad call\n"); } #endif /* SCTP_DEBUG */ return; @@ -882,7 +882,7 @@ sctp_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, /* now what about control */ if (control) { if (inp->control) { - printf("huh? control set?\n"); + kprintf("huh? control set?\n"); sctp_m_freem(inp->control); inp->control = NULL; } @@ -1014,7 +1014,7 @@ sctp_disconnect(struct socket *so) /* only send SHUTDOWN 1st time thru */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT4) { - printf("%s:%d sends a shutdown\n", + kprintf("%s:%d sends a shutdown\n", __FILE__, __LINE__ ); @@ -1123,7 +1123,7 @@ sctp_shutdown(struct socket *so) /* only send SHUTDOWN the first time through */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT4) { - printf("%s:%d sends a shutdown\n", + kprintf("%s:%d sends a shutdown\n", __FILE__, __LINE__ ); @@ -1431,7 +1431,7 @@ sctp_do_connect_x(struct socket *so, int num_v6=0, num_v4=0, *totaddrp, totaddr, i, incr, at; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB1) { - printf("Connectx called\n"); + kprintf("Connectx called\n"); } #endif /* SCTP_DEBUG */ @@ -1632,7 +1632,7 @@ sctp_optsget(struct socket *so, if (mp == NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ1) { - printf("optsget:MP is NULL EINVAL\n"); + kprintf("optsget:MP is NULL EINVAL\n"); } #endif /* SCTP_DEBUG */ return (EINVAL); @@ -1642,14 +1642,14 @@ sctp_optsget(struct socket *so, /* Got to have a mbuf */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ1) { - printf("Huh no mbuf\n"); + kprintf("Huh no mbuf\n"); } #endif /* SCTP_DEBUG */ return (EINVAL); } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ2) { - printf("optsget opt:%lxx sz:%u\n", (unsigned long)opt, + kprintf("optsget opt:%lxx sz:%u\n", (unsigned long)opt, m->m_len); } #endif /* SCTP_DEBUG */ @@ -1662,7 +1662,7 @@ sctp_optsget(struct socket *so, case SCTP_I_WANT_MAPPED_V4_ADDR: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ2) { - printf("other stuff\n"); + kprintf("other stuff\n"); } #endif /* SCTP_DEBUG */ SCTP_INP_RLOCK(inp); @@ -1891,7 +1891,7 @@ sctp_optsget(struct socket *so, error = 0; *level = sctp_debug_on; m->m_len = sizeof(u_int32_t); - printf("Returning DEBUG LEVEL %x is set\n", + kprintf("Returning DEBUG LEVEL %x is set\n", (u_int)sctp_debug_on); } #else /* SCTP_DEBUG */ @@ -1922,13 +1922,13 @@ sctp_optsget(struct socket *so, struct sctp_event_subscribe *events; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ2) { - printf("get events\n"); + kprintf("get events\n"); } #endif /* SCTP_DEBUG */ if ((size_t)m->m_len < sizeof(struct sctp_event_subscribe)) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ2) { - printf("M->M_LEN is %d not %d\n", + kprintf("M->M_LEN is %d not %d\n", (int)m->m_len, (int)sizeof(struct sctp_event_subscribe)); } @@ -1978,7 +1978,7 @@ sctp_optsget(struct socket *so, } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ1) { - printf("getadaption ind\n"); + kprintf("getadaption ind\n"); } #endif /* SCTP_DEBUG */ SCTP_INP_RLOCK(inp); @@ -1993,7 +1993,7 @@ sctp_optsget(struct socket *so, } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ1) { - printf("get initial dbg seq\n"); + kprintf("get initial dbg seq\n"); } #endif /* SCTP_DEBUG */ SCTP_INP_RLOCK(inp); @@ -2008,7 +2008,7 @@ sctp_optsget(struct socket *so, } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ1) { - printf("get local sizes\n"); + kprintf("get local sizes\n"); } #endif /* SCTP_DEBUG */ SCTP_INP_RLOCK(inp); @@ -2023,12 +2023,12 @@ sctp_optsget(struct socket *so, struct sctp_nets *net; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ1) { - printf("get remote size\n"); + kprintf("get remote size\n"); } #endif /* SCTP_DEBUG */ if ((size_t)m->m_len < sizeof(sctp_assoc_t)) { #ifdef SCTP_DEBUG - printf("m->m_len:%d not %d\n", + kprintf("m->m_len:%d not %d\n", m->m_len, sizeof(sctp_assoc_t)); #endif /* SCTP_DEBUG */ error = EINVAL; @@ -2083,7 +2083,7 @@ sctp_optsget(struct socket *so, struct sctp_getaddresses *saddr; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ1) { - printf("get peer addresses\n"); + kprintf("get peer addresses\n"); } #endif /* SCTP_DEBUG */ if ((size_t)m->m_len < sizeof(struct sctp_getaddresses)) { @@ -2122,7 +2122,7 @@ sctp_optsget(struct socket *so, /* not enough room. */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ1) { - printf("Out of room\n"); + kprintf("Out of room\n"); } #endif /* SCTP_DEBUG */ break; @@ -2142,7 +2142,7 @@ sctp_optsget(struct socket *so, m->m_len += cpsz; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ2) { - printf("left now:%d mlen:%d\n", + kprintf("left now:%d mlen:%d\n", left, m->m_len); } #endif /* SCTP_DEBUG */ @@ -2151,7 +2151,7 @@ sctp_optsget(struct socket *so, } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ1) { - printf("All done\n"); + kprintf("All done\n"); } #endif /* SCTP_DEBUG */ break; @@ -2162,7 +2162,7 @@ sctp_optsget(struct socket *so, struct sctp_getaddresses *saddr; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ1) { - printf("get local addresses\n"); + kprintf("get local addresses\n"); } #endif /* SCTP_DEBUG */ if ((size_t)m->m_len < sizeof(struct sctp_getaddresses)) { @@ -2210,13 +2210,13 @@ sctp_optsget(struct socket *so, #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ1) { - printf("Getting peer_addr_params\n"); + kprintf("Getting peer_addr_params\n"); } #endif /* SCTP_DEBUG */ if ((size_t)m->m_len < sizeof(struct sctp_paddrparams)) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ2) { - printf("Hmm m->m_len:%d is to small\n", + kprintf("Hmm m->m_len:%d is to small\n", m->m_len); } #endif /* SCTP_DEBUG */ @@ -2229,7 +2229,7 @@ sctp_optsget(struct socket *so, if (paddrp->spp_assoc_id) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ1) { - printf("In spp_assoc_id find type\n"); + kprintf("In spp_assoc_id find type\n"); } #endif /* SCTP_DEBUG */ if (inp->sctp_flags & SCTP_PCB_FLAGS_CONNECTED) { @@ -2254,7 +2254,7 @@ sctp_optsget(struct socket *so, /* Lookup via address */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ1) { - printf("Ok we need to lookup a param\n"); + kprintf("Ok we need to lookup a param\n"); } #endif /* SCTP_DEBUG */ if (inp->sctp_flags & SCTP_PCB_FLAGS_CONNECTED) { @@ -2287,7 +2287,7 @@ sctp_optsget(struct socket *so, /* Effects the Endpoint */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ1) { - printf("User wants EP level info\n"); + kprintf("User wants EP level info\n"); } #endif /* SCTP_DEBUG */ stcb = NULL; @@ -2296,7 +2296,7 @@ sctp_optsget(struct socket *so, /* Applys to the specific association */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ1) { - printf("In TCB side\n"); + kprintf("In TCB side\n"); } #endif /* SCTP_DEBUG */ if (net) { @@ -2313,7 +2313,7 @@ sctp_optsget(struct socket *so, SCTP_INP_RLOCK(inp); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ1) { - printf("In EP levle info\n"); + kprintf("In EP levle info\n"); } #endif /* SCTP_DEBUG */ paddrp->spp_pathmaxrxt = inp->sctp_ep.def_net_failure; @@ -2330,7 +2330,7 @@ sctp_optsget(struct socket *so, struct sctp_nets *net; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ1) { - printf("GetPEER ADDR_INFO\n"); + kprintf("GetPEER ADDR_INFO\n"); } #endif /* SCTP_DEBUG */ if ((size_t)m->m_len < sizeof(struct sctp_paddrinfo)) { @@ -2386,7 +2386,7 @@ sctp_optsget(struct socket *so, struct sctp_pcbinfo *spcb; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ1) { - printf("PCB status\n"); + kprintf("PCB status\n"); } #endif /* SCTP_DEBUG */ if ((size_t)m->m_len < sizeof(struct sctp_pcbinfo)) { @@ -2404,7 +2404,7 @@ sctp_optsget(struct socket *so, struct sctp_status *sstat; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ1) { - printf("SCTP status\n"); + kprintf("SCTP status\n"); } #endif /* SCTP_DEBUG */ @@ -2471,7 +2471,7 @@ sctp_optsget(struct socket *so, struct sctp_rtoinfo *srto; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ1) { - printf("RTO Info\n"); + kprintf("RTO Info\n"); } #endif /* SCTP_DEBUG */ if ((size_t)m->m_len < sizeof(struct sctp_rtoinfo)) { @@ -2513,7 +2513,7 @@ sctp_optsget(struct socket *so, struct sctp_assocparams *sasoc; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ1) { - printf("Associnfo\n"); + kprintf("Associnfo\n"); } #endif /* SCTP_DEBUG */ if ((size_t)m->m_len < sizeof(struct sctp_assocparams)) { @@ -2592,7 +2592,7 @@ sctp_optsget(struct socket *so, struct sctp_initmsg *sinit; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ1) { - printf("initmsg\n"); + kprintf("initmsg\n"); } #endif /* SCTP_DEBUG */ if ((size_t)m->m_len < sizeof(struct sctp_initmsg)) { @@ -2616,7 +2616,7 @@ sctp_optsget(struct socket *so, #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ1) { - printf("setprimary\n"); + kprintf("setprimary\n"); } #endif /* SCTP_DEBUG */ if ((size_t)m->m_len < sizeof(struct sctp_setprim)) { @@ -2688,7 +2688,7 @@ sctp_optsset(struct socket *so, if (mp == NULL) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ1) { - printf("optsset:MP is NULL EINVAL\n"); + kprintf("optsset:MP is NULL EINVAL\n"); } #endif /* SCTP_DEBUG */ return (EINVAL); @@ -2980,7 +2980,7 @@ sctp_optsset(struct socket *so, error = 0; sctp_debug_on = (*level & (SCTP_DEBUG_ALL | SCTP_DEBUG_NOISY)); - printf("SETTING DEBUG LEVEL to %x\n", + kprintf("SETTING DEBUG LEVEL to %x\n", (u_int)sctp_debug_on); } @@ -3730,9 +3730,9 @@ sctp_connect(struct socket *so, struct mbuf *nam, struct proc *p) #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_PCB1) { - printf("Connect called in SCTP to "); + kprintf("Connect called in SCTP to "); sctp_print_address(addr); - printf("Port %d\n", ntohs(((struct sockaddr_in *)addr)->sin_port)); + kprintf("Port %d\n", ntohs(((struct sockaddr_in *)addr)->sin_port)); } #endif /* SCTP_DEBUG */ crit_enter(); @@ -3839,7 +3839,7 @@ sctp_usr_recvd(struct socket *so, int flags) inp = (struct sctp_inpcb *)so->so_pcb; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ2) - printf("Read for so:%x inp:%x Flags:%x\n", + kprintf("Read for so:%x inp:%x Flags:%x\n", (u_int)so, (u_int)inp, (u_int)flags); #endif @@ -3847,7 +3847,7 @@ sctp_usr_recvd(struct socket *so, int flags) /* I made the same as TCP since we are not setup? */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ2) - printf("Nope, connection reset\n"); + kprintf("Nope, connection reset\n"); #endif return (ECONNRESET); } @@ -3890,7 +3890,7 @@ sctp_usr_recvd(struct socket *so, int flags) } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ2) - printf("remove from socket queue for inp:%x tcbret:%x\n", + kprintf("remove from socket queue for inp:%x tcbret:%x\n", (u_int)inp, (u_int)stcb); #endif @@ -3938,7 +3938,7 @@ sctp_usr_recvd(struct socket *so, int flags) int sq_cnt=0; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ2) - printf("Something off, inp:%x so->so_rcv->sb_mb is empty and sockq is not.. cleaning\n", + kprintf("Something off, inp:%x so->so_rcv->sb_mb is empty and sockq is not.. cleaning\n", (u_int)inp); #endif if (((inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) == 0) @@ -3953,7 +3953,7 @@ sctp_usr_recvd(struct socket *so, int flags) } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ2) - printf("Cleaned up %d sockq's\n", sq_cnt); + kprintf("Cleaned up %d sockq's\n", sq_cnt); #endif } SOCKBUF_UNLOCK(&so->so_rcv); @@ -4466,7 +4466,7 @@ sctp_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam, /* Flags are ignored */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_USRREQ1) { - printf("Send called on V4 side\n"); + kprintf("Send called on V4 side\n"); } #endif { diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index 46324e1f73..a506f082f2 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -1,5 +1,5 @@ /* $KAME: sctputil.c,v 1.36 2005/03/06 16:04:19 itojun Exp $ */ -/* $DragonFly: src/sys/netinet/sctputil.c,v 1.6 2006/06/23 17:20:14 eirikn Exp $ */ +/* $DragonFly: src/sys/netinet/sctputil.c,v 1.7 2006/12/22 23:57:52 swildner Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Cisco Systems, Inc. @@ -209,7 +209,7 @@ sctp_log_strm_del(struct sctp_tmit_chunk *chk, struct sctp_tmit_chunk *poschk, { if (chk == NULL) { - printf("Gak log of NULL?\n"); + kprintf("Gak log of NULL?\n"); return; } sctp_clog[sctp_cwnd_log_at].from = (u_int8_t)from; @@ -422,41 +422,41 @@ sctp_print_audit_report(void) if ((sctp_audit_data[i][0] == 0xe0) && (sctp_audit_data[i][1] == 0x01)) { cnt = 0; - printf("\n"); + kprintf("\n"); } else if (sctp_audit_data[i][0] == 0xf0) { cnt = 0; - printf("\n"); + kprintf("\n"); } else if ((sctp_audit_data[i][0] == 0xc0) && (sctp_audit_data[i][1] == 0x01)) { - printf("\n"); + kprintf("\n"); cnt = 0; } - printf("%2.2x%2.2x ", (uint32_t)sctp_audit_data[i][0], + kprintf("%2.2x%2.2x ", (uint32_t)sctp_audit_data[i][0], (uint32_t)sctp_audit_data[i][1]); cnt++; if ((cnt % 14) == 0) - printf("\n"); + kprintf("\n"); } for (i=0;i= SCTP_AUDIT_SIZE) { sctp_audit_indx = 0; } - printf("resend_cnt:%d asoc-tot:%d\n", + kprintf("resend_cnt:%d asoc-tot:%d\n", resend_cnt, stcb->asoc.sent_queue_retran_cnt); rep = 1; stcb->asoc.sent_queue_retran_cnt = resend_cnt; @@ -536,7 +536,7 @@ sctp_auditing(int from, struct sctp_inpcb *inp, struct sctp_tcb *stcb, sctp_audit_indx = 0; } rep = 1; - printf("tot_flt:%d asoc_tot:%d\n", tot_out, + kprintf("tot_flt:%d asoc_tot:%d\n", tot_out, (int)stcb->asoc.total_flight); stcb->asoc.total_flight = tot_out; } @@ -548,7 +548,7 @@ sctp_auditing(int from, struct sctp_inpcb *inp, struct sctp_tcb *stcb, sctp_audit_indx = 0; } rep = 1; - printf("tot_flt_book:%d\n", tot_book); + kprintf("tot_flt_book:%d\n", tot_book); stcb->asoc.total_flight_count = tot_book_cnt; } @@ -564,7 +564,7 @@ sctp_auditing(int from, struct sctp_inpcb *inp, struct sctp_tcb *stcb, sctp_audit_indx = 0; } rep = 1; - printf("real flight:%d net total was %d\n", + kprintf("real flight:%d net total was %d\n", stcb->asoc.total_flight, tot_out); /* now corrective action */ TAILQ_FOREACH(lnet, &stcb->asoc.nets, sctp_next) { @@ -576,7 +576,7 @@ sctp_auditing(int from, struct sctp_inpcb *inp, struct sctp_tcb *stcb, } } if (lnet->flight_size != tot_out) { - printf("net:%x flight was %d corrected to %d\n", + kprintf("net:%x flight was %d corrected to %d\n", (uint32_t)lnet, lnet->flight_size, tot_out); lnet->flight_size = tot_out; } @@ -895,7 +895,7 @@ sctp_expand_mapping_array(struct sctp_association *asoc) #endif if (new_array == NULL) { /* can't get more, forget it */ - printf("No memory for expansion of SCTP mapping array %d\n", + kprintf("No memory for expansion of SCTP mapping array %d\n", new_size); return (-1); } @@ -963,7 +963,7 @@ sctp_timeout_handler(void *t) } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_TIMER1) { - printf("Timer type %d goes off\n", tmr->type); + kprintf("Timer type %d goes off\n", tmr->type); } #endif /* SCTP_DEBUG */ #ifndef __NetBSD__ @@ -1157,7 +1157,7 @@ sctp_timeout_handler(void *t) default: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_TIMER1) { - printf("sctp_timeout_handler:unknown timer %d\n", + kprintf("sctp_timeout_handler:unknown timer %d\n", tmr->type); } #endif /* SCTP_DEBUG */ @@ -1189,7 +1189,7 @@ sctp_timeout_handler(void *t) #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_TIMER1) { - printf("Timer now complete (type %d)\n", typ); + kprintf("Timer now complete (type %d)\n", typ); } #endif /* SCTP_DEBUG */ @@ -1299,7 +1299,7 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, struct sctp_tcb *stcb, } #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_TIMER1) { - printf("HB timer to start unconfirmed:%d hb_delay:%d\n", + kprintf("HB timer to start unconfirmed:%d hb_delay:%d\n", cnt_of_unconf, stcb->asoc.heart_beat_delay); } #endif @@ -1357,7 +1357,7 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, struct sctp_tcb *stcb, to_ticks /= 1000; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_TIMER1) { - printf("Timer to expire in %d ticks\n", to_ticks); + kprintf("Timer to expire in %d ticks\n", to_ticks); } #endif tmr = &stcb->asoc.hb_timer; @@ -1478,7 +1478,7 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, struct sctp_tcb *stcb, default: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_TIMER1) { - printf("sctp_timer_start:Unknown timer type %d\n", + kprintf("sctp_timer_start:Unknown timer type %d\n", t_type); } #endif /* SCTP_DEBUG */ @@ -1488,7 +1488,7 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, struct sctp_tcb *stcb, if ((to_ticks <= 0) || (tmr == NULL)) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_TIMER1) { - printf("sctp_timer_start:%d:software error to_ticks:%d tmr:%p not set ??\n", + kprintf("sctp_timer_start:%d:software error to_ticks:%d tmr:%p not set ??\n", t_type, to_ticks, tmr); } #endif /* SCTP_DEBUG */ @@ -1625,7 +1625,7 @@ sctp_timer_stop(int t_type, struct sctp_inpcb *inp, struct sctp_tcb *stcb, default: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_TIMER1) { - printf("sctp_timer_stop:Unknown timer type %d\n", + kprintf("sctp_timer_stop:Unknown timer type %d\n", t_type); } #endif /* SCTP_DEBUG */ @@ -2833,7 +2833,7 @@ sctp_ulp_notify(u_int32_t notification, struct sctp_tcb *stcb, default: #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_UTIL1) { - printf("NOTIFY: unknown notification %xh (%u)\n", + kprintf("NOTIFY: unknown notification %xh (%u)\n", notification, notification); } #endif /* SCTP_DEBUG */ @@ -3176,16 +3176,16 @@ sctp_print_address(struct sockaddr *sa) if (sa->sa_family == AF_INET6) { struct sockaddr_in6 *sin6; sin6 = (struct sockaddr_in6 *)sa; - printf("IPv6 address: %s:%d scope:%u\n", + kprintf("IPv6 address: %s:%d scope:%u\n", ip6_sprintf(&sin6->sin6_addr), ntohs(sin6->sin6_port), sin6->sin6_scope_id); } else if (sa->sa_family == AF_INET) { struct sockaddr_in *sin; sin = (struct sockaddr_in *)sa; - printf("IPv4 address: %s:%d\n", inet_ntoa(sin->sin_addr), + kprintf("IPv4 address: %s:%d\n", inet_ntoa(sin->sin_addr), ntohs(sin->sin_port)); } else { - printf("?\n"); + kprintf("?\n"); } } @@ -3205,9 +3205,9 @@ sctp_print_address_pkt(struct ip *iph, struct sctphdr *sh) fsa.sin_family = AF_INET; fsa.sin_addr = iph->ip_dst; fsa.sin_port = sh->dest_port; - printf("src: "); + kprintf("src: "); sctp_print_address((struct sockaddr *)&lsa); - printf("dest: "); + kprintf("dest: "); sctp_print_address((struct sockaddr *)&fsa); } else if (iph->ip_v == (IPV6_VERSION >> 4)) { struct ip6_hdr *ip6; @@ -3224,9 +3224,9 @@ sctp_print_address_pkt(struct ip *iph, struct sctphdr *sh) fsa6.sin6_family = AF_INET6; fsa6.sin6_addr = ip6->ip6_dst; fsa6.sin6_port = sh->dest_port; - printf("src: "); + kprintf("src: "); sctp_print_address((struct sockaddr *)&lsa6); - printf("dest: "); + kprintf("dest: "); sctp_print_address((struct sockaddr *)&fsa6); } } @@ -3334,7 +3334,7 @@ sbappendaddr_nocheck(struct sockbuf *sb, struct sockaddr *asa, struct mbuf *m0, m->m_len = 0; /* safety */ if (m == m0) { - printf("Duplicate mbuf allocated %p in and mget returned %p?\n", + kprintf("Duplicate mbuf allocated %p in and mget returned %p?\n", m0, m); if (cnt) { panic("more than once"); @@ -3726,7 +3726,7 @@ sctp_release_pr_sctp_chunk(struct sctp_tcb *stcb, struct sctp_tmit_chunk *tp1, ret_sz += sctp_release_pr_sctp_chunk(stcb, tp1, reason, &stcb->asoc.send_queue); } else { - printf("hmm, nothing on the send queue and no EOM?\n"); + kprintf("hmm, nothing on the send queue and no EOM?\n"); } } return (ret_sz); diff --git a/sys/netinet/sctputil.h b/sys/netinet/sctputil.h index b52ed464a2..ae7794dafa 100644 --- a/sys/netinet/sctputil.h +++ b/sys/netinet/sctputil.h @@ -1,5 +1,5 @@ /* $KAME: sctputil.h,v 1.14 2004/08/17 04:06:21 itojun Exp $ */ -/* $DragonFly: src/sys/netinet/sctputil.h,v 1.4 2006/05/20 02:42:12 dillon Exp $ */ +/* $DragonFly: src/sys/netinet/sctputil.h,v 1.5 2006/12/22 23:57:52 swildner Exp $ */ #ifndef _NETINET_SCTPUTIL_H_ #define _NETINET_SCTPUTIL_H_ @@ -44,7 +44,7 @@ #ifdef SCTP_MBUF_DEBUG #define sctp_m_freem(m) do { \ - printf("m_freem(%p) m->nxtpkt:%p at %s[%d]\n", \ + kprintf("m_freem(%p) m->nxtpkt:%p at %s[%d]\n", \ (m), (m)->m_next, __FILE__, __LINE__); \ m_freem(m); \ } while (0); diff --git a/sys/netinet/tcp_debug.c b/sys/netinet/tcp_debug.c index acc894125c..0300b282ca 100644 --- a/sys/netinet/tcp_debug.c +++ b/sys/netinet/tcp_debug.c @@ -32,7 +32,7 @@ * * @(#)tcp_debug.c 8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/netinet/tcp_debug.c,v 1.16.2.1 2000/07/15 07:14:31 kris Exp $ - * $DragonFly: src/sys/netinet/tcp_debug.c,v 1.5 2006/01/14 11:33:50 swildner Exp $ + * $DragonFly: src/sys/netinet/tcp_debug.c,v 1.6 2006/12/22 23:57:52 swildner Exp $ */ #include "opt_inet.h" @@ -156,10 +156,10 @@ tcp_trace(short act, short ostate, struct tcpcb *tp, void *ipgen, if (tcpconsdebug == 0) return; if (tp) - printf("%p %s:", tp, tcpstates[ostate]); + kprintf("%p %s:", tp, tcpstates[ostate]); else - printf("???????? "); - printf("%s ", tanames[act]); + kprintf("???????? "); + kprintf("%s ", tanames[act]); switch (act) { case TA_INPUT: @@ -182,41 +182,41 @@ tcp_trace(short act, short ostate, struct tcpcb *tp, void *ipgen, if (act == TA_OUTPUT) len -= sizeof(struct tcphdr); if (len) - printf("[%x..%x)", seq, seq+len); + kprintf("[%x..%x)", seq, seq+len); else - printf("%x", seq); - printf("@%x, urp=%x", ack, th->th_urp); + kprintf("%x", seq); + kprintf("@%x, urp=%x", ack, th->th_urp); flags = th->th_flags; if (flags) { char *cp = "<"; #define pf(f) { \ if (th->th_flags & TH_##f) { \ - printf("%s%s", cp, #f); \ + kprintf("%s%s", cp, #f); \ cp = ","; \ } \ } pf(SYN); pf(ACK); pf(FIN); pf(RST); pf(PUSH); pf(URG); - printf(">"); + kprintf(">"); } break; case TA_USER: - printf("%s", prurequests[req&0xff]); + kprintf("%s", prurequests[req&0xff]); if ((req & 0xff) == PRU_SLOWTIMO) - printf("<%s>", tcptimers[req>>8]); + kprintf("<%s>", tcptimers[req>>8]); break; } if (tp) - printf(" -> %s", tcpstates[tp->t_state]); + kprintf(" -> %s", tcpstates[tp->t_state]); /* print out internal state of tp !?! */ - printf("\n"); + kprintf("\n"); if (tp == 0) return; - printf( + kprintf( "\trcv_(nxt,wnd,up) (%lx,%lx,%lx) snd_(una,nxt,max) (%lx,%lx,%lx)\n", (u_long)tp->rcv_nxt, tp->rcv_wnd, (u_long)tp->rcv_up, (u_long)tp->snd_una, (u_long)tp->snd_nxt, (u_long)tp->snd_max); - printf("\tsnd_(wl1,wl2,wnd) (%lx,%lx,%lx)\n", + kprintf("\tsnd_(wl1,wl2,wnd) (%lx,%lx,%lx)\n", (u_long)tp->snd_wl1, (u_long)tp->snd_wl2, tp->snd_wnd); #endif /* TCPDEBUG */ } diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index a1cf8f6aab..f92d1d3ffd 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -82,7 +82,7 @@ * * @(#)tcp_output.c 8.4 (Berkeley) 5/24/95 * $FreeBSD: src/sys/netinet/tcp_output.c,v 1.39.2.20 2003/01/29 22:45:36 hsu Exp $ - * $DragonFly: src/sys/netinet/tcp_output.c,v 1.31 2006/04/14 21:18:24 dillon Exp $ + * $DragonFly: src/sys/netinet/tcp_output.c,v 1.32 2006/12/22 23:57:52 swildner Exp $ */ #include "opt_inet6.h" @@ -645,7 +645,7 @@ send: if (last_optlen_report != time_second) { last_optlen_report = time_second; - printf("tcpcb %p: MSS (%d) too small to hold options!\n", tp, tp->t_maxopd); + kprintf("tcpcb %p: MSS (%d) too small to hold options!\n", tp, tp->t_maxopd); } error = EHOSTUNREACH; goto out; diff --git a/sys/netinet/tcp_sack.c b/sys/netinet/tcp_sack.c index 0a9bd23c58..444b18258e 100644 --- a/sys/netinet/tcp_sack.c +++ b/sys/netinet/tcp_sack.c @@ -30,7 +30,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/netinet/tcp_sack.c,v 1.3 2006/01/14 11:33:50 swildner Exp $ + * $DragonFly: src/sys/netinet/tcp_sack.c,v 1.4 2006/12/22 23:57:52 swildner Exp $ */ /* @@ -377,10 +377,10 @@ tcp_sack_dump_blocks(struct scoreboard *scb) { struct sackblock *sb; - printf("%d blocks:", scb->nblocks); + kprintf("%d blocks:", scb->nblocks); TAILQ_FOREACH(sb, &scb->sackblocks, sblk_list) - printf(" [%u, %u)", sb->sblk_start, sb->sblk_end); - printf("\n"); + kprintf(" [%u, %u)", sb->sblk_start, sb->sblk_end); + kprintf("\n"); } #else static __inline void @@ -584,11 +584,11 @@ tcp_sack_dump_history(char *msg, struct tcpcb *tp) if (++ndumped > 900) return; - printf("%s:\tnsackhistory %d: ", msg, tp->nsackhistory); + kprintf("%s:\tnsackhistory %d: ", msg, tp->nsackhistory); for (i = 0; i < tp->nsackhistory; ++i) - printf("[%u, %u) ", tp->sackhistory[i].rblk_start, + kprintf("[%u, %u) ", tp->sackhistory[i].rblk_start, tp->sackhistory[i].rblk_end); - printf("\n"); + kprintf("\n"); } #else static __inline void diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 4282475294..3d6e746d14 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -82,7 +82,7 @@ * * @(#)tcp_subr.c 8.2 (Berkeley) 5/24/95 * $FreeBSD: src/sys/netinet/tcp_subr.c,v 1.73.2.31 2003/01/24 05:11:34 sam Exp $ - * $DragonFly: src/sys/netinet/tcp_subr.c,v 1.54 2006/12/05 23:31:57 dillon Exp $ + * $DragonFly: src/sys/netinet/tcp_subr.c,v 1.55 2006/12/22 23:57:52 swildner Exp $ */ #include "opt_compat.h" @@ -338,7 +338,7 @@ tcp_init(void) TUNABLE_INT_FETCH("net.inet.tcp.tcbhashsize", &hashsize); if (!powerof2(hashsize)) { - printf("WARNING: TCB hash size not a power of 2\n"); + kprintf("WARNING: TCB hash size not a power of 2\n"); hashsize = 512; /* safe default */ } tcp_tcbhashsize = hashsize; @@ -1933,7 +1933,7 @@ tcp_xmit_bandwidth_limit(struct tcpcb *tp, tcp_seq ack_seq) static int ltime; if ((u_int)(ticks - ltime) >= hz / tcp_inflight_debug) { ltime = ticks; - printf("%p bw %ld rttbest %d srtt %d bwnd %ld\n", + kprintf("%p bw %ld rttbest %d srtt %d bwnd %ld\n", tp, bw, tp->t_rttbest, tp->t_srtt, bwnd); } } diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index be75c323e3..a4304ab7b9 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -86,7 +86,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/netinet/tcp_syncache.c,v 1.5.2.14 2003/02/24 04:02:27 silby Exp $ - * $DragonFly: src/sys/netinet/tcp_syncache.c,v 1.26 2006/09/03 18:29:17 dillon Exp $ + * $DragonFly: src/sys/netinet/tcp_syncache.c,v 1.27 2006/12/22 23:57:52 swildner Exp $ */ #include "opt_inet6.h" @@ -316,7 +316,7 @@ syncache_init(void) TUNABLE_INT_FETCH("net.inet.tcp.syncache.bucketlimit", &tcp_syncache.bucket_limit); if (!powerof2(tcp_syncache.hashsize)) { - printf("WARNING: syncache hash size is not a power of 2.\n"); + kprintf("WARNING: syncache hash size is not a power of 2.\n"); tcp_syncache.hashsize = 512; /* safe default */ } tcp_syncache.hashmask = tcp_syncache.hashsize - 1; @@ -705,7 +705,7 @@ syncache_socket(struct syncache *sc, struct socket *lso) #ifdef IPSEC /* copy old policy into new socket's */ if (ipsec_copy_policy(linp->inp_sp, inp->inp_sp)) - printf("syncache_expand: could not copy policy\n"); + kprintf("syncache_expand: could not copy policy\n"); #endif if (isipv6) { struct in6_addr laddr6; diff --git a/sys/netinet6/ah_input.c b/sys/netinet6/ah_input.c index ec7f987c01..a684549ad2 100644 --- a/sys/netinet6/ah_input.c +++ b/sys/netinet6/ah_input.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/ah_input.c,v 1.1.2.6 2002/04/28 05:40:26 suz Exp $ */ -/* $DragonFly: src/sys/netinet6/ah_input.c,v 1.12 2006/09/05 00:55:48 dillon Exp $ */ +/* $DragonFly: src/sys/netinet6/ah_input.c,v 1.13 2006/12/22 23:57:53 swildner Exp $ */ /* $KAME: ah_input.c,v 1.67 2002/01/07 11:39:56 kjc Exp $ */ /* @@ -163,7 +163,7 @@ ah4_input(struct mbuf *m, ...) goto fail; } KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP ah4_input called to allocate SA:%p\n", sav)); + kprintf("DP ah4_input called to allocate SA:%p\n", sav)); if (sav->state != SADB_SASTATE_MATURE && sav->state != SADB_SASTATE_DYING) { ipseclog((LOG_DEBUG, @@ -548,7 +548,7 @@ ah4_input(struct mbuf *m, ...) if (sav) { KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP ah4_input call free SA:%p\n", sav)); + kprintf("DP ah4_input call free SA:%p\n", sav)); key_freesav(sav); } ipsecstat.in_success++; @@ -557,7 +557,7 @@ ah4_input(struct mbuf *m, ...) fail: if (sav) { KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP ah4_input call free SA:%p\n", sav)); + kprintf("DP ah4_input call free SA:%p\n", sav)); key_freesav(sav); } if (m) @@ -617,7 +617,7 @@ ah6_input(struct mbuf **mp, int *offp, int proto) goto fail; } KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP ah6_input called to allocate SA:%p\n", sav)); + kprintf("DP ah6_input called to allocate SA:%p\n", sav)); if (sav->state != SADB_SASTATE_MATURE && sav->state != SADB_SASTATE_DYING) { ipseclog((LOG_DEBUG, @@ -931,7 +931,7 @@ ah6_input(struct mbuf **mp, int *offp, int proto) if (sav) { KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP ah6_input call free SA:%p\n", sav)); + kprintf("DP ah6_input call free SA:%p\n", sav)); key_freesav(sav); } ipsec6stat.in_success++; @@ -940,7 +940,7 @@ ah6_input(struct mbuf **mp, int *offp, int proto) fail: if (sav) { KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP ah6_input call free SA:%p\n", sav)); + kprintf("DP ah6_input call free SA:%p\n", sav)); key_freesav(sav); } if (m) diff --git a/sys/netinet6/esp_input.c b/sys/netinet6/esp_input.c index bd01f00b3d..aa415f6fdb 100644 --- a/sys/netinet6/esp_input.c +++ b/sys/netinet6/esp_input.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/esp_input.c,v 1.1.2.8 2003/01/23 21:06:47 sam Exp $ */ -/* $DragonFly: src/sys/netinet6/esp_input.c,v 1.13 2006/10/24 06:18:42 hsu Exp $ */ +/* $DragonFly: src/sys/netinet6/esp_input.c,v 1.14 2006/12/22 23:57:53 swildner Exp $ */ /* $KAME: esp_input.c,v 1.62 2002/01/07 11:39:57 kjc Exp $ */ /* @@ -161,7 +161,7 @@ esp4_input(struct mbuf *m, ...) goto bad; } KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP esp4_input called to allocate SA:%p\n", sav)); + kprintf("DP esp4_input called to allocate SA:%p\n", sav)); if (sav->state != SADB_SASTATE_MATURE && sav->state != SADB_SASTATE_DYING) { ipseclog((LOG_DEBUG, @@ -446,7 +446,7 @@ noreplaycheck: if (sav) { KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP esp4_input call free SA:%p\n", sav)); + kprintf("DP esp4_input call free SA:%p\n", sav)); key_freesav(sav); } ipsecstat.in_success++; @@ -455,7 +455,7 @@ noreplaycheck: bad: if (sav) { KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP esp4_input call free SA:%p\n", sav)); + kprintf("DP esp4_input call free SA:%p\n", sav)); key_freesav(sav); } if (m) @@ -521,7 +521,7 @@ esp6_input(struct mbuf **mp, int *offp, int proto) goto bad; } KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP esp6_input called to allocate SA:%p\n", sav)); + kprintf("DP esp6_input called to allocate SA:%p\n", sav)); if (sav->state != SADB_SASTATE_MATURE && sav->state != SADB_SASTATE_DYING) { ipseclog((LOG_DEBUG, @@ -816,7 +816,7 @@ noreplaycheck: n = m_getb(m->m_pkthdr.len, MB_DONTWAIT, MT_HEADER, M_PKTHDR); if (!n) { - printf("esp6_input: mbuf allocation failed\n"); + kprintf("esp6_input: mbuf allocation failed\n"); goto bad; } M_MOVE_PKTHDR(n, m); @@ -852,7 +852,7 @@ noreplaycheck: if (sav) { KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP esp6_input call free SA:%p\n", sav)); + kprintf("DP esp6_input call free SA:%p\n", sav)); key_freesav(sav); } ipsec6stat.in_success++; @@ -861,7 +861,7 @@ noreplaycheck: bad: if (sav) { KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP esp6_input call free SA:%p\n", sav)); + kprintf("DP esp6_input call free SA:%p\n", sav)); key_freesav(sav); } if (m) diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 4f5508ea70..ae76439acb 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/in6.c,v 1.7.2.9 2002/04/28 05:40:26 suz Exp $ */ -/* $DragonFly: src/sys/netinet6/in6.c,v 1.23 2006/10/24 06:18:42 hsu Exp $ */ +/* $DragonFly: src/sys/netinet6/in6.c,v 1.24 2006/12/22 23:57:53 swildner Exp $ */ /* $KAME: in6.c,v 1.259 2002/01/21 11:37:50 keiichi Exp $ */ /* @@ -1229,7 +1229,7 @@ in6_unlink_ifa(struct in6_ifaddr *ia, struct ifnet *ifp) ia->ia_next = oia->ia_next; else { /* search failed */ - printf("Couldn't unlink in6_ifaddr from in6_ifaddr\n"); + kprintf("Couldn't unlink in6_ifaddr from in6_ifaddr\n"); } } @@ -1919,7 +1919,7 @@ in6_ifawithscope(struct ifnet *oifp, struct in6_addr *dst) if (oifp == NULL) { #if 0 - printf("in6_ifawithscope: output interface is not specified\n"); + kprintf("in6_ifawithscope: output interface is not specified\n"); #endif return (NULL); } diff --git a/sys/netinet6/in6_gif.c b/sys/netinet6/in6_gif.c index 4864615b54..d3496f8a43 100644 --- a/sys/netinet6/in6_gif.c +++ b/sys/netinet6/in6_gif.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/in6_gif.c,v 1.2.2.7 2003/01/23 21:06:47 sam Exp $ */ -/* $DragonFly: src/sys/netinet6/in6_gif.c,v 1.16 2006/10/24 06:18:42 hsu Exp $ */ +/* $DragonFly: src/sys/netinet6/in6_gif.c,v 1.17 2006/12/22 23:57:53 swildner Exp $ */ /* $KAME: in6_gif.c,v 1.49 2001/05/14 14:02:17 itojun Exp $ */ /* @@ -138,7 +138,7 @@ in6_gif_output(struct ifnet *ifp, #endif default: #ifdef DEBUG - printf("in6_gif_output: warning: unknown family %d passed\n", + kprintf("in6_gif_output: warning: unknown family %d passed\n", family); #endif m_freem(m); @@ -150,7 +150,7 @@ in6_gif_output(struct ifnet *ifp, if (m && m->m_len < sizeof(struct ip6_hdr)) m = m_pullup(m, sizeof(struct ip6_hdr)); if (m == NULL) { - printf("ENOBUFS in in6_gif_output %d\n", __LINE__); + kprintf("ENOBUFS in in6_gif_output %d\n", __LINE__); return ENOBUFS; } diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c index e21d682930..1e0bd15fc4 100644 --- a/sys/netinet6/in6_ifattach.c +++ b/sys/netinet6/in6_ifattach.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/in6_ifattach.c,v 1.2.2.6 2002/04/28 05:40:26 suz Exp $ */ -/* $DragonFly: src/sys/netinet6/in6_ifattach.c,v 1.17 2006/10/24 06:18:42 hsu Exp $ */ +/* $DragonFly: src/sys/netinet6/in6_ifattach.c,v 1.18 2006/12/22 23:57:53 swildner Exp $ */ /* $KAME: in6_ifattach.c,v 1.118 2001/05/24 07:44:00 itojun Exp $ */ /* @@ -162,10 +162,10 @@ generate_tmp_ifid(u_int8_t *seed0, const u_int8_t *seed1, u_int8_t *ret) if (0) { /* for debugging purposes only */ int i; - printf("generate_tmp_ifid: new randomized ID from: "); + kprintf("generate_tmp_ifid: new randomized ID from: "); for (i = 0; i < 16; i++) - printf("%02x", seed[i]); - printf(" "); + kprintf("%02x", seed[i]); + kprintf(" "); } /* generate 16 bytes of pseudo-random value. */ @@ -207,10 +207,10 @@ generate_tmp_ifid(u_int8_t *seed0, const u_int8_t *seed1, u_int8_t *ret) if (0) { /* for debugging purposes only */ int i; - printf("to: "); + kprintf("to: "); for (i = 0; i < 16; i++) - printf("%02x", digest[i]); - printf("\n"); + kprintf("%02x", digest[i]); + kprintf("\n"); } return 0; @@ -397,7 +397,7 @@ get_ifid(struct ifnet *ifp0, goto success; } - printf("%s: failed to get interface identifier\n", if_name(ifp0)); + kprintf("%s: failed to get interface identifier\n", if_name(ifp0)); return -1; success: diff --git a/sys/netinet6/in6_prefix.c b/sys/netinet6/in6_prefix.c index 5ffe0e7053..8861582bea 100644 --- a/sys/netinet6/in6_prefix.c +++ b/sys/netinet6/in6_prefix.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/in6_prefix.c,v 1.4.2.3 2001/07/03 11:01:52 ume Exp $ */ -/* $DragonFly: src/sys/netinet6/in6_prefix.c,v 1.10 2006/10/24 06:18:42 hsu Exp $ */ +/* $DragonFly: src/sys/netinet6/in6_prefix.c,v 1.11 2006/12/22 23:57:53 swildner Exp $ */ /* $KAME: in6_prefix.c,v 1.47 2001/03/25 08:41:39 itojun Exp $ */ /* @@ -818,7 +818,7 @@ rp_remove(struct rr_prefix *rpp) TAILQ_NEXT(ifpr, ifpr_list) = TAILQ_NEXT(rp2ifpr(rpp), ifpr_list); else - printf("Couldn't unlink rr_prefix from ifp\n"); + kprintf("Couldn't unlink rr_prefix from ifp\n"); } } /* unlink rp_entry from rr_prefix list */ diff --git a/sys/netinet6/in6_rmx.c b/sys/netinet6/in6_rmx.c index c9c43d02cb..b1bfa9ef18 100644 --- a/sys/netinet6/in6_rmx.c +++ b/sys/netinet6/in6_rmx.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/in6_rmx.c,v 1.1.2.4 2004/10/06 02:35:17 suz Exp $ */ -/* $DragonFly: src/sys/netinet6/in6_rmx.c,v 1.14 2006/01/31 19:05:42 dillon Exp $ */ +/* $DragonFly: src/sys/netinet6/in6_rmx.c,v 1.15 2006/12/22 23:57:53 swildner Exp $ */ /* $KAME: in6_rmx.c,v 1.11 2001/07/26 06:53:16 jinmei Exp $ */ /* @@ -433,7 +433,7 @@ in6_mtutimo(void *rock) atv.tv_usec = 0; atv.tv_sec = arg.nextstop; if (atv.tv_sec < time_second) { - printf("invalid mtu expiration time on routing table\n"); + kprintf("invalid mtu expiration time on routing table\n"); arg.nextstop = time_second + 30; /* last resort */ } callout_reset(&in6_mtutimo_ch[mycpuid], tvtohz_high(&atv), in6_mtutimo, diff --git a/sys/netinet6/ip6_forward.c b/sys/netinet6/ip6_forward.c index 13507faa14..241c121aec 100644 --- a/sys/netinet6/ip6_forward.c +++ b/sys/netinet6/ip6_forward.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/ip6_forward.c,v 1.4.2.7 2003/01/24 05:11:35 sam Exp $ */ -/* $DragonFly: src/sys/netinet6/ip6_forward.c,v 1.12 2006/10/24 06:18:42 hsu Exp $ */ +/* $DragonFly: src/sys/netinet6/ip6_forward.c,v 1.13 2006/12/22 23:57:53 swildner Exp $ */ /* $KAME: ip6_forward.c,v 1.69 2001/05/17 03:48:30 itojun Exp $ */ /* @@ -221,7 +221,7 @@ ip6_forward(struct mbuf *m, int srcrt) case IPSEC_POLICY_IPSEC: if (sp->req == NULL) { /* XXX should be panic ? */ - printf("ip6_forward: No IPsec request specified.\n"); + kprintf("ip6_forward: No IPsec request specified.\n"); ip6stat.ip6s_cantforward++; key_freesp(sp); if (mcopy) { @@ -240,7 +240,7 @@ ip6_forward(struct mbuf *m, int srcrt) case IPSEC_POLICY_ENTRUST: default: /* should be panic ?? */ - printf("ip6_forward: Invalid policy found. %d\n", sp->policy); + kprintf("ip6_forward: Invalid policy found. %d\n", sp->policy); key_freesp(sp); goto skip_ipsec; } @@ -276,7 +276,7 @@ ip6_forward(struct mbuf *m, int srcrt) case ENOMEM: break; default: - printf("ip6_output (ipsec): error code %d\n", error); + kprintf("ip6_output (ipsec): error code %d\n", error); /* fall through */ case ENOENT: /* don't show these error codes to the user */ @@ -490,7 +490,7 @@ skip_ipsec: if ((rt->rt_flags & (RTF_BLACKHOLE | RTF_REJECT)) == 0) #endif { - printf("ip6_forward: outgoing interface is loopback. " + kprintf("ip6_forward: outgoing interface is loopback. " "src %s, dst %s, nxt %d, rcvif %s, outif %s\n", ip6_sprintf(&ip6->ip6_src), ip6_sprintf(&ip6->ip6_dst), diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c index a0cfbca4ec..0aec851ef2 100644 --- a/sys/netinet6/ip6_input.c +++ b/sys/netinet6/ip6_input.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/ip6_input.c,v 1.11.2.15 2003/01/24 05:11:35 sam Exp $ */ -/* $DragonFly: src/sys/netinet6/ip6_input.c,v 1.31 2006/10/24 06:18:42 hsu Exp $ */ +/* $DragonFly: src/sys/netinet6/ip6_input.c,v 1.32 2006/12/22 23:57:53 swildner Exp $ */ /* $KAME: ip6_input.c,v 1.259 2002/01/21 04:58:09 jinmei Exp $ */ /* @@ -193,7 +193,7 @@ ip6_init(void) inet6_pfil_hook.ph_type = PFIL_TYPE_AF; inet6_pfil_hook.ph_af = AF_INET6; if ((i = pfil_head_register(&inet6_pfil_hook)) != 0) { - printf("%s: WARNING: unable to register pfil hook, " + kprintf("%s: WARNING: unable to register pfil hook, " "error %d\n", __func__, i); } @@ -1374,7 +1374,7 @@ ip6_pullexthdr(struct mbuf *m, size_t off, int nxt) case IPPROTO_AH: /* is it possible? */ break; default: - printf("ip6_pullexthdr: invalid nxt=%d\n", nxt); + kprintf("ip6_pullexthdr: invalid nxt=%d\n", nxt); } #endif diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index ea812ebdcf..a4fe75f201 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/ip6_output.c,v 1.13.2.18 2003/01/24 05:11:35 sam Exp $ */ -/* $DragonFly: src/sys/netinet6/ip6_output.c,v 1.31 2006/10/25 07:41:45 hsu Exp $ */ +/* $DragonFly: src/sys/netinet6/ip6_output.c,v 1.32 2006/12/22 23:57:53 swildner Exp $ */ /* $KAME: ip6_output.c,v 1.279 2002/01/26 06:12:30 jinmei Exp $ */ /* @@ -233,7 +233,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, struct route_in6 *ro, case IPSEC_POLICY_ENTRUST: default: - printf("ip6_output: Invalid policy found. %d\n", sp->policy); + kprintf("ip6_output: Invalid policy found. %d\n", sp->policy); } #endif /* IPSEC */ #ifdef FAST_IPSEC @@ -275,7 +275,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, struct route_in6 *ro, case IPSEC_POLICY_ENTRUST: default: - printf("ip6_output: Invalid policy found. %d\n", sp->policy); + kprintf("ip6_output: Invalid policy found. %d\n", sp->policy); } #endif /* FAST_IPSEC */ @@ -424,7 +424,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, struct route_in6 *ro, case ENOMEM: break; default: - printf("ip6_output (ipsec): error code %d\n", + kprintf("ip6_output (ipsec): error code %d\n", error); /* fall through */ case ENOENT: @@ -545,7 +545,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, struct route_in6 *ro, case ENOMEM: break; default: - printf("ip6_output (ipsec): error code %d\n", error); + kprintf("ip6_output (ipsec): error code %d\n", error); /* fall through */ case ENOENT: /* don't show these error codes to the user */ @@ -1711,7 +1711,7 @@ ip6_pcbopts(struct ip6_pktopts **pktopt, struct mbuf *m, struct socket *so, if (opt->ip6po_pktinfo || opt->ip6po_nexthop || opt->ip6po_hbh || opt->ip6po_dest1 || opt->ip6po_dest2 || opt->ip6po_rhinfo.ip6po_rhi_rthdr) - printf("ip6_pcbopts: all specified options are cleared.\n"); + kprintf("ip6_pcbopts: all specified options are cleared.\n"); #endif ip6_clearpktopts(opt, 1, -1); } else @@ -1813,7 +1813,7 @@ ip6_copypktopts(struct ip6_pktopts *src, int canwait) struct ip6_pktopts *dst; if (src == NULL) { - printf("ip6_clearpktopts: invalid argument\n"); + kprintf("ip6_clearpktopts: invalid argument\n"); return (NULL); } diff --git a/sys/netinet6/ipsec.c b/sys/netinet6/ipsec.c index 1dbc478726..d804b9ebde 100644 --- a/sys/netinet6/ipsec.c +++ b/sys/netinet6/ipsec.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/ipsec.c,v 1.3.2.12 2003/05/06 06:46:58 suz Exp $ */ -/* $DragonFly: src/sys/netinet6/ipsec.c,v 1.18 2006/12/20 18:14:43 dillon Exp $ */ +/* $DragonFly: src/sys/netinet6/ipsec.c,v 1.19 2006/12/22 23:57:53 swildner Exp $ */ /* $KAME: ipsec.c,v 1.103 2001/05/24 07:14:18 sakane Exp $ */ /* @@ -307,7 +307,7 @@ ipsec4_getpolicybysock(struct mbuf *m, u_int dir, struct socket *so, int *error) /* SP found */ if (kernsp != NULL) { KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP ipsec4_getpolicybysock called " + kprintf("DP ipsec4_getpolicybysock called " "to allocate SP:%p\n", kernsp)); *error = 0; return kernsp; @@ -346,7 +346,7 @@ ipsec4_getpolicybysock(struct mbuf *m, u_int dir, struct socket *so, int *error) /* SP found */ if (kernsp != NULL) { KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP ipsec4_getpolicybysock called " + kprintf("DP ipsec4_getpolicybysock called " "to allocate SP:%p\n", kernsp)); *error = 0; return kernsp; @@ -424,7 +424,7 @@ ipsec4_getpolicybyaddr(struct mbuf *m, u_int dir, int flag, int *error) /* SP found */ if (sp != NULL) { KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP ipsec4_getpolicybyaddr called " + kprintf("DP ipsec4_getpolicybyaddr called " "to allocate SP:%p\n", sp)); *error = 0; return sp; @@ -509,7 +509,7 @@ ipsec6_getpolicybysock(struct mbuf *m, u_int dir, struct socket *so, int *error) /* SP found */ if (kernsp != NULL) { KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP ipsec6_getpolicybysock called " + kprintf("DP ipsec6_getpolicybysock called " "to allocate SP:%p\n", kernsp)); *error = 0; return kernsp; @@ -548,7 +548,7 @@ ipsec6_getpolicybysock(struct mbuf *m, u_int dir, struct socket *so, int *error) /* SP found */ if (kernsp != NULL) { KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP ipsec6_getpolicybysock called " + kprintf("DP ipsec6_getpolicybysock called " "to allocate SP:%p\n", kernsp)); *error = 0; return kernsp; @@ -633,7 +633,7 @@ ipsec6_getpolicybyaddr(struct mbuf *m, u_int dir, int flag, int *error) /* SP found */ if (sp != NULL) { KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP ipsec6_getpolicybyaddr called " + kprintf("DP ipsec6_getpolicybyaddr called " "to allocate SP:%p\n", sp)); *error = 0; return sp; @@ -791,7 +791,7 @@ ipsec_setspidx(struct mbuf *m, struct secpolicyindex *spidx, int needport) len += n->m_len; if (m->m_pkthdr.len != len) { KEYDEBUG(KEYDEBUG_IPSEC_DUMP, - printf("ipsec_setspidx: " + kprintf("ipsec_setspidx: " "total of m_len(%d) != pkthdr.len(%d), " "ignored.\n", len, m->m_pkthdr.len)); @@ -800,7 +800,7 @@ ipsec_setspidx(struct mbuf *m, struct secpolicyindex *spidx, int needport) if (m->m_pkthdr.len < sizeof(struct ip)) { KEYDEBUG(KEYDEBUG_IPSEC_DUMP, - printf("ipsec_setspidx: " + kprintf("ipsec_setspidx: " "pkthdr.len(%d) < sizeof(struct ip), ignored.\n", m->m_pkthdr.len)); return EINVAL; @@ -828,7 +828,7 @@ ipsec_setspidx(struct mbuf *m, struct secpolicyindex *spidx, int needport) case 6: if (m->m_pkthdr.len < sizeof(struct ip6_hdr)) { KEYDEBUG(KEYDEBUG_IPSEC_DUMP, - printf("ipsec_setspidx: " + kprintf("ipsec_setspidx: " "pkthdr.len(%d) < sizeof(struct ip6_hdr), " "ignored.\n", m->m_pkthdr.len)); return EINVAL; @@ -841,7 +841,7 @@ ipsec_setspidx(struct mbuf *m, struct secpolicyindex *spidx, int needport) #endif default: KEYDEBUG(KEYDEBUG_IPSEC_DUMP, - printf("ipsec_setspidx: " + kprintf("ipsec_setspidx: " "unknown IP version %u, ignored.\n", v)); return EINVAL; } @@ -965,7 +965,7 @@ ipsec6_get_ulp(struct mbuf *m, struct secpolicyindex *spidx, int needport) panic("ipsec6_get_ulp: NULL pointer was passed."); KEYDEBUG(KEYDEBUG_IPSEC_DUMP, - printf("ipsec6_get_ulp:\n"); kdebug_mbuf(m)); + kprintf("ipsec6_get_ulp:\n"); kdebug_mbuf(m)); /* set default */ spidx->ul_proto = IPSEC_ULPROTO_ANY; @@ -1203,7 +1203,7 @@ ipsec_set_policy(struct secpolicy **pcb_sp, int optname, caddr_t request, xpl = (struct sadb_x_policy *)request; KEYDEBUG(KEYDEBUG_IPSEC_DUMP, - printf("ipsec_set_policy: passed policy\n"); + kprintf("ipsec_set_policy: passed policy\n"); kdebug_sadb_x_policy((struct sadb_ext *)xpl)); /* check policy type */ @@ -1226,7 +1226,7 @@ ipsec_set_policy(struct secpolicy **pcb_sp, int optname, caddr_t request, key_freesp(*pcb_sp); *pcb_sp = newsp; KEYDEBUG(KEYDEBUG_IPSEC_DUMP, - printf("ipsec_set_policy: new policy\n"); + kprintf("ipsec_set_policy: new policy\n"); kdebug_secpolicy(newsp)); return 0; @@ -1248,7 +1248,7 @@ ipsec_get_policy(struct secpolicy *pcb_sp, struct mbuf **mp) KKASSERT((*mp)->m_type == MT_DATA); KEYDEBUG(KEYDEBUG_IPSEC_DUMP, - printf("ipsec_get_policy:\n"); + kprintf("ipsec_get_policy:\n"); kdebug_mbuf(*mp)); return 0; @@ -1550,7 +1550,7 @@ ipsec_in_reject(struct secpolicy *sp, struct mbuf *m) int need_auth, need_conf, need_icv; KEYDEBUG(KEYDEBUG_IPSEC_DATA, - printf("ipsec_in_reject: using SP\n"); + kprintf("ipsec_in_reject: using SP\n"); kdebug_secpolicy(sp)); /* check policy */ @@ -1608,7 +1608,7 @@ ipsec_in_reject(struct secpolicy *sp, struct mbuf *m) } KEYDEBUG(KEYDEBUG_IPSEC_DUMP, - printf("ipsec_in_reject: auth:%d conf:%d icv:%d m_flags:%x\n", + kprintf("ipsec_in_reject: auth:%d conf:%d icv:%d m_flags:%x\n", need_auth, need_conf, need_icv, m->m_flags)); if ((need_conf && !(m->m_flags & M_DECRYPTED)) @@ -1650,7 +1650,7 @@ ipsec4_in_reject_so(struct mbuf *m, struct socket *so) result = ipsec_in_reject(sp, m); KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP ipsec4_in_reject_so call free SP:%p\n", sp)); + kprintf("DP ipsec4_in_reject_so call free SP:%p\n", sp)); key_freesp(sp); return result; @@ -1698,7 +1698,7 @@ ipsec6_in_reject_so(struct mbuf *m, struct socket *so) result = ipsec_in_reject(sp, m); KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP ipsec6_in_reject_so call free SP:%p\n", sp)); + kprintf("DP ipsec6_in_reject_so call free SP:%p\n", sp)); key_freesp(sp); return result; @@ -1728,7 +1728,7 @@ ipsec_hdrsiz(struct secpolicy *sp) size_t siz, clen; KEYDEBUG(KEYDEBUG_IPSEC_DATA, - printf("ipsec_hdrsiz: using SP\n"); + kprintf("ipsec_hdrsiz: using SP\n"); kdebug_secpolicy(sp)); /* check policy */ @@ -1819,9 +1819,9 @@ ipsec4_hdrsiz(struct mbuf *m, u_int dir, struct inpcb *inp) size = ipsec_hdrsiz(sp); KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP ipsec4_hdrsiz call free SP:%p\n", sp)); + kprintf("DP ipsec4_hdrsiz call free SP:%p\n", sp)); KEYDEBUG(KEYDEBUG_IPSEC_DATA, - printf("ipsec4_hdrsiz: size:%lu.\n", (unsigned long)size)); + kprintf("ipsec4_hdrsiz: size:%lu.\n", (unsigned long)size)); key_freesp(sp); return size; @@ -1855,9 +1855,9 @@ ipsec6_hdrsiz(struct mbuf *m, u_int dir, struct in6pcb *in6p) return 0; size = ipsec_hdrsiz(sp); KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP ipsec6_hdrsiz call free SP:%p\n", sp)); + kprintf("DP ipsec6_hdrsiz call free SP:%p\n", sp)); KEYDEBUG(KEYDEBUG_IPSEC_DATA, - printf("ipsec6_hdrsiz: size:%lu.\n", (unsigned long)size)); + kprintf("ipsec6_hdrsiz: size:%lu.\n", (unsigned long)size)); key_freesp(sp); return size; @@ -2353,20 +2353,20 @@ ipsec_dumpmbuf(struct mbuf *m) u_char *p; totlen = 0; - printf("---\n"); + kprintf("---\n"); while (m) { p = mtod(m, u_char *); for (i = 0; i < m->m_len; i++) { - printf("%02x ", p[i]); + kprintf("%02x ", p[i]); totlen++; if (totlen % 16 == 0) - printf("\n"); + kprintf("\n"); } m = m->m_next; } if (totlen % 16 != 0) - printf("\n"); - printf("---\n"); + kprintf("\n"); + kprintf("---\n"); } #ifdef INET @@ -2393,7 +2393,7 @@ ipsec4_output(struct ipsec_output_state *state, struct secpolicy *sp, int flags) panic("state->dst == NULL in ipsec4_output"); KEYDEBUG(KEYDEBUG_IPSEC_DATA, - printf("ipsec4_output: applyed SP\n"); + kprintf("ipsec4_output: applyed SP\n"); kdebug_secpolicy(sp)); for (isr = sp->req; isr != NULL; isr = isr->next) { @@ -2618,7 +2618,7 @@ ipsec6_output_trans(struct ipsec_output_state *state, u_char *nexthdrp, panic("tun == NULL in ipsec6_output_trans"); KEYDEBUG(KEYDEBUG_IPSEC_DATA, - printf("ipsec6_output_trans: applyed SP\n"); + kprintf("ipsec6_output_trans: applyed SP\n"); kdebug_secpolicy(sp)); *tun = 0; @@ -2780,7 +2780,7 @@ ipsec6_output_tunnel(struct ipsec_output_state *state, struct secpolicy *sp, panic("sp == NULL in ipsec6_output_tunnel"); KEYDEBUG(KEYDEBUG_IPSEC_DATA, - printf("ipsec6_output_tunnel: applyed SP\n"); + kprintf("ipsec6_output_tunnel: applyed SP\n"); kdebug_secpolicy(sp)); /* diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index f643d2a442..801ec0c5c1 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/nd6.c,v 1.2.2.15 2003/05/06 06:46:58 suz Exp $ */ -/* $DragonFly: src/sys/netinet6/nd6.c,v 1.21 2006/12/05 08:09:10 hsu Exp $ */ +/* $DragonFly: src/sys/netinet6/nd6.c,v 1.22 2006/12/22 23:57:53 swildner Exp $ */ /* $KAME: nd6.c,v 1.144 2001/05/24 07:44:00 itojun Exp $ */ /* @@ -1127,7 +1127,7 @@ nd6_rtrequest(int req, struct rtentry *rt, if (ln && ln->ln_expire == 0) { /* kludge for desktops */ #if 0 - printf("nd6_rtequest: time.tv_sec is zero; " + kprintf("nd6_rtequest: time.tv_sec is zero; " "treat it as 1\n"); #endif ln->ln_expire = 1; @@ -2043,14 +2043,14 @@ nd6_storelladdr(struct ifnet *ifp, struct rtentry *rt0, struct mbuf *m, return (0); } if (rt->rt_gateway->sa_family != AF_LINK) { - printf("nd6_storelladdr: something odd happens\n"); + kprintf("nd6_storelladdr: something odd happens\n"); m_freem(m); return (0); } sdl = SDL(rt->rt_gateway); if (sdl->sdl_alen == 0) { /* this should be impossible, but we bark here for debugging */ - printf("nd6_storelladdr: sdl_alen == 0\n"); + kprintf("nd6_storelladdr: sdl_alen == 0\n"); m_freem(m); return (0); } diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c index 93173c682f..04f051bdbb 100644 --- a/sys/netinet6/nd6_nbr.c +++ b/sys/netinet6/nd6_nbr.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/nd6_nbr.c,v 1.4.2.6 2003/01/23 21:06:47 sam Exp $ */ -/* $DragonFly: src/sys/netinet6/nd6_nbr.c,v 1.17 2006/10/24 06:18:42 hsu Exp $ */ +/* $DragonFly: src/sys/netinet6/nd6_nbr.c,v 1.18 2006/12/22 23:57:53 swildner Exp $ */ /* $KAME: nd6_nbr.c,v 1.86 2002/01/21 02:33:04 jinmei Exp $ */ /* @@ -355,7 +355,7 @@ nd6_ns_output(struct ifnet *ifp, const struct in6_addr *daddr6, maxlen += (sizeof(struct nd_opt_hdr) + ifp->if_addrlen + 7) & ~7; if (max_linkhdr + maxlen >= MCLBYTES) { #ifdef DIAGNOSTIC - printf("nd6_ns_output: max_linkhdr + maxlen >= MCLBYTES " + kprintf("nd6_ns_output: max_linkhdr + maxlen >= MCLBYTES " "(%d + %d > %d)\n", max_linkhdr, maxlen, MCLBYTES); #endif return; @@ -827,7 +827,7 @@ nd6_na_output(struct ifnet *ifp, const struct in6_addr *daddr6, maxlen += (sizeof(struct nd_opt_hdr) + ifp->if_addrlen + 7) & ~7; if (max_linkhdr + maxlen >= MCLBYTES) { #ifdef DIAGNOSTIC - printf("nd6_na_output: max_linkhdr + maxlen >= MCLBYTES " + kprintf("nd6_na_output: max_linkhdr + maxlen >= MCLBYTES " "(%d + %d > %d)\n", max_linkhdr, maxlen, MCLBYTES); #endif return; @@ -1280,13 +1280,13 @@ nd6_dad_ns_output(struct dadq *dp, struct ifaddr *ifa) dp->dad_ns_tcount++; if (!(ifp->if_flags & IFF_UP)) { #if 0 - printf("%s: interface down?\n", if_name(ifp)); + kprintf("%s: interface down?\n", if_name(ifp)); #endif return; } if (!(ifp->if_flags & IFF_RUNNING)) { #if 0 - printf("%s: interface not running?\n", if_name(ifp)); + kprintf("%s: interface not running?\n", if_name(ifp)); #endif return; } diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c index fe854e270e..b606654331 100644 --- a/sys/netinet6/nd6_rtr.c +++ b/sys/netinet6/nd6_rtr.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/nd6_rtr.c,v 1.2.2.5 2003/04/05 10:28:53 ume Exp $ */ -/* $DragonFly: src/sys/netinet6/nd6_rtr.c,v 1.14 2006/10/24 06:18:42 hsu Exp $ */ +/* $DragonFly: src/sys/netinet6/nd6_rtr.c,v 1.15 2006/12/22 23:57:53 swildner Exp $ */ /* $KAME: nd6_rtr.c,v 1.111 2001/04/27 01:37:15 jinmei Exp $ */ /* @@ -1636,7 +1636,7 @@ in6_ifadd(struct nd_prefix *pr, struct in6_addr *ifid) #if 0 /* don't care link local addr state, and always do DAD */ /* if link-local address is not eligible, do not autoconfigure. */ if (((struct in6_ifaddr *)ifa)->ia6_flags & IN6_IFF_NOTREADY) { - printf("in6_ifadd: link-local address not ready\n"); + kprintf("in6_ifadd: link-local address not ready\n"); return NULL; } #endif diff --git a/sys/netinet6/sctp6_usrreq.c b/sys/netinet6/sctp6_usrreq.c index b32e5dfbe8..3950bd15a8 100644 --- a/sys/netinet6/sctp6_usrreq.c +++ b/sys/netinet6/sctp6_usrreq.c @@ -1,5 +1,5 @@ /* $KAME: sctp6_usrreq.c,v 1.35 2004/08/17 06:28:03 t-momose Exp $ */ -/* $DragonFly: src/sys/netinet6/sctp6_usrreq.c,v 1.7 2006/10/24 06:18:42 hsu Exp $ */ +/* $DragonFly: src/sys/netinet6/sctp6_usrreq.c,v 1.8 2006/12/22 23:57:53 swildner Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Cisco Systems, Inc. @@ -242,7 +242,7 @@ sctp6_input(struct mbuf **mp, int *offp, int proto) sctp_pegs[SCTP_INPKTS]++; #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("V6 input gets a packet iphlen:%d pktlen:%d\n", iphlen, m->m_pkthdr.len); + kprintf("V6 input gets a packet iphlen:%d pktlen:%d\n", iphlen, m->m_pkthdr.len); } #endif if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { @@ -272,7 +272,7 @@ sctp6_input(struct mbuf **mp, int *offp, int proto) if (calc_check != check) { #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("Bad CSUM on SCTP packet calc_check:%x check:%x m:%x mlen:%d iphlen:%d\n", + kprintf("Bad CSUM on SCTP packet calc_check:%x check:%x m:%x mlen:%d iphlen:%d\n", calc_check, check, (u_int)m, mlen, iphlen); } @@ -301,7 +301,7 @@ sctp_skip_csum: */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("V6 Find the association\n"); + kprintf("V6 Find the association\n"); } #endif stcb = sctp_findassociation_addr(m, iphlen, offset - sizeof(*ch), @@ -993,7 +993,7 @@ sctp6_disconnect(struct socket *so) /* only send SHUTDOWN the first time */ #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_OUTPUT4) { - printf("%s:%d sends a shutdown\n", + kprintf("%s:%d sends a shutdown\n", __FILE__, __LINE__ ); @@ -1135,7 +1135,7 @@ connected_type: /* now what about control */ if (control) { if (inp->control) { - printf("huh? control set?\n"); + kprintf("huh? control set?\n"); m_freem(inp->control); inp->control = NULL; } diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c index a989dc4dfd..485734f5e3 100644 --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netinet6/udp6_usrreq.c,v 1.6.2.13 2003/01/24 05:11:35 sam Exp $ */ -/* $DragonFly: src/sys/netinet6/udp6_usrreq.c,v 1.22 2006/10/24 06:18:42 hsu Exp $ */ +/* $DragonFly: src/sys/netinet6/udp6_usrreq.c,v 1.23 2006/12/22 23:57:53 swildner Exp $ */ /* $KAME: udp6_usrreq.c,v 1.27 2001/05/21 05:45:10 jinmei Exp $ */ /* @@ -369,7 +369,7 @@ udp6_input(struct mbuf **mp, int *offp, int proto) } udpstat.udps_noport++; if (m->m_flags & M_MCAST) { - printf("UDP6: M_MCAST is set in a unicast packet.\n"); + kprintf("UDP6: M_MCAST is set in a unicast packet.\n"); udpstat.udps_noportmcast++; goto bad; } diff --git a/sys/netproto/802_11/ieee80211_var.h b/sys/netproto/802_11/ieee80211_var.h index 453efcbff8..dbd393d8a2 100644 --- a/sys/netproto/802_11/ieee80211_var.h +++ b/sys/netproto/802_11/ieee80211_var.h @@ -30,7 +30,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/net80211/ieee80211_var.h,v 1.22.2.11 2006/03/13 03:05:48 sam Exp $ - * $DragonFly: src/sys/netproto/802_11/ieee80211_var.h,v 1.9 2006/12/15 12:44:22 sephe Exp $ + * $DragonFly: src/sys/netproto/802_11/ieee80211_var.h,v 1.10 2006/12/22 23:57:53 swildner Exp $ */ #ifndef _NET80211_IEEE80211_VAR_H_ #define _NET80211_IEEE80211_VAR_H_ @@ -408,7 +408,7 @@ ieee80211_anyhdrspace(struct ieee80211com *ic, const void *data) ieee80211_note(_ic, "%s: [%6D] rate set: ", __func__, \ _ni->ni_macaddr, ":"); \ ieee80211_print_rateset(&_ni->ni_rates); \ - printf("\n"); \ + kprintf("\n"); \ } \ } while (0) #define IEEE80211_NOTE(_ic, _m, _ni, _fmt, ...) do { \ diff --git a/sys/netproto/802_11/wlan/ieee80211.c b/sys/netproto/802_11/wlan/ieee80211.c index 8668c45798..d8c9340fd9 100644 --- a/sys/netproto/802_11/wlan/ieee80211.c +++ b/sys/netproto/802_11/wlan/ieee80211.c @@ -30,7 +30,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/net80211/ieee80211.c,v 1.19.2.7 2006/03/11 19:25:23 sam Exp $ - * $DragonFly: src/sys/netproto/802_11/wlan/ieee80211.c,v 1.9 2006/12/01 04:42:53 sephe Exp $ + * $DragonFly: src/sys/netproto/802_11/wlan/ieee80211.c,v 1.10 2006/12/22 23:57:53 swildner Exp $ */ /* @@ -471,11 +471,11 @@ ieee80211_announce(struct ieee80211com *ic) mword = ieee80211_rate2media(ic, rate, mode); if (mword == 0) continue; - printf("%s%d%sMbps", (i != 0 ? " " : ""), + kprintf("%s%d%sMbps", (i != 0 ? " " : ""), (rate & IEEE80211_RATE_VAL) / 2, ((rate & 0x1) != 0 ? ".5" : "")); } - printf("\n"); + kprintf("\n"); } } diff --git a/sys/netproto/802_11/wlan/ieee80211_crypto.c b/sys/netproto/802_11/wlan/ieee80211_crypto.c index add954907c..a7c4394659 100644 --- a/sys/netproto/802_11/wlan/ieee80211_crypto.c +++ b/sys/netproto/802_11/wlan/ieee80211_crypto.c @@ -30,7 +30,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/net80211/ieee80211_crypto.c,v 1.10.2.2 2005/09/03 22:40:02 sam Exp $ - * $DragonFly: src/sys/netproto/802_11/wlan/ieee80211_crypto.c,v 1.4 2006/09/03 07:37:58 sephe Exp $ + * $DragonFly: src/sys/netproto/802_11/wlan/ieee80211_crypto.c,v 1.5 2006/12/22 23:57:53 swildner Exp $ */ /* @@ -185,12 +185,12 @@ void ieee80211_crypto_register(const struct ieee80211_cipher *cip) { if (cip->ic_cipher >= IEEE80211_CIPHER_MAX) { - printf("%s: cipher %s has an invalid cipher index %u\n", + kprintf("%s: cipher %s has an invalid cipher index %u\n", __func__, cip->ic_name, cip->ic_cipher); return; } if (ciphers[cip->ic_cipher] != NULL && ciphers[cip->ic_cipher] != cip) { - printf("%s: cipher %s registered with a different template\n", + kprintf("%s: cipher %s registered with a different template\n", __func__, cip->ic_name); return; } @@ -204,12 +204,12 @@ void ieee80211_crypto_unregister(const struct ieee80211_cipher *cip) { if (cip->ic_cipher >= IEEE80211_CIPHER_MAX) { - printf("%s: cipher %s has an invalid cipher index %u\n", + kprintf("%s: cipher %s has an invalid cipher index %u\n", __func__, cip->ic_name, cip->ic_cipher); return; } if (ciphers[cip->ic_cipher] != NULL && ciphers[cip->ic_cipher] != cip) { - printf("%s: cipher %s registered with a different template\n", + kprintf("%s: cipher %s registered with a different template\n", __func__, cip->ic_name); return; } diff --git a/sys/netproto/802_11/wlan/ieee80211_dragonfly.c b/sys/netproto/802_11/wlan/ieee80211_dragonfly.c index 26125e09b4..01936f0689 100644 --- a/sys/netproto/802_11/wlan/ieee80211_dragonfly.c +++ b/sys/netproto/802_11/wlan/ieee80211_dragonfly.c @@ -25,7 +25,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/net80211/ieee80211_freebsd.c,v 1.7.2.2 2005/12/22 19:22:51 sam Exp $ - * $DragonFly: src/sys/netproto/802_11/wlan/ieee80211_dragonfly.c,v 1.7 2006/12/20 18:14:43 dillon Exp $ + * $DragonFly: src/sys/netproto/802_11/wlan/ieee80211_dragonfly.c,v 1.8 2006/12/22 23:57:53 swildner Exp $ */ /* @@ -57,7 +57,7 @@ SYSCTL_NODE(_net, OID_AUTO, wlan, CTLFLAG_RD, 0, "IEEE 80211 parameters"); #ifdef IEEE80211_DEBUG int ieee80211_debug = 0; SYSCTL_INT(_net_wlan, OID_AUTO, debug, CTLFLAG_RW, &ieee80211_debug, - 0, "debugging printfs"); + 0, "debugging kprintfs"); #endif static int @@ -97,7 +97,7 @@ ieee80211_sysctl_attach(struct ieee80211com *ic) oid = SYSCTL_ADD_NODE(ctx, &SYSCTL_NODE_CHILDREN(_net, wlan), OID_AUTO, num, CTLFLAG_RD, NULL, ""); if (oid == NULL) { - printf("add sysctl node net.wlan.%s failed\n", num); + kprintf("add sysctl node net.wlan.%s failed\n", num); kfree(ctx, M_DEVBUF); return; } @@ -109,7 +109,7 @@ ieee80211_sysctl_attach(struct ieee80211com *ic) ic->ic_debug = ieee80211_debug; SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "debug", CTLFLAG_RW, &ic->ic_debug, 0, - "control debugging printfs"); + "control debugging kprintfs"); #endif /* XXX inherit from tunables */ SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, @@ -327,7 +327,7 @@ ieee80211_load_module(const char *modname) crit_exit(); } #else - printf("%s: load the %s module by hand for now.\n", __func__, modname); + kprintf("%s: load the %s module by hand for now.\n", __func__, modname); #endif } @@ -532,7 +532,7 @@ wlan_modevent(module_t mod, int type, void *unused) switch (type) { case MOD_LOAD: if (bootverbose) - printf("wlan: <802.11 Link Layer>\n"); + kprintf("wlan: <802.11 Link Layer>\n"); return 0; case MOD_UNLOAD: return 0; diff --git a/sys/netproto/802_11/wlan/ieee80211_input.c b/sys/netproto/802_11/wlan/ieee80211_input.c index b2922b6c39..79db81bc7b 100644 --- a/sys/netproto/802_11/wlan/ieee80211_input.c +++ b/sys/netproto/802_11/wlan/ieee80211_input.c @@ -30,7 +30,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/net80211/ieee80211_input.c,v 1.62.2.14 2006/09/02 15:16:12 sam Exp $ - * $DragonFly: src/sys/netproto/802_11/wlan/ieee80211_input.c,v 1.11 2006/12/18 20:41:02 dillon Exp $ + * $DragonFly: src/sys/netproto/802_11/wlan/ieee80211_input.c,v 1.12 2006/12/22 23:57:53 swildner Exp $ */ #include @@ -1266,9 +1266,9 @@ static void ieee80211_ssid_mismatch(struct ieee80211com *ic, const char *tag, uint8_t mac[IEEE80211_ADDR_LEN], uint8_t *ssid) { - printf("[%6D] discard %s frame, ssid mismatch: ", mac, ":", tag); + kprintf("[%6D] discard %s frame, ssid mismatch: ", mac, ":", tag); ieee80211_print_essid(ssid + 2, ssid[1]); - printf("\n"); + kprintf("\n"); } #define IEEE80211_VERIFY_SSID(_ni, _ssid) do { \ @@ -2836,16 +2836,16 @@ ieee80211_discard_frame(struct ieee80211com *ic, { __va_list ap; - printf("[%s:%6D] discard ", ic->ic_ifp->if_xname, + kprintf("[%s:%6D] discard ", ic->ic_ifp->if_xname, ieee80211_getbssid(ic, wh), ":"); if (type != NULL) - printf("%s frame, ", type); + kprintf("%s frame, ", type); else - printf("frame, "); + kprintf("frame, "); __va_start(ap, fmt); kvprintf(fmt, ap); __va_end(ap); - printf("\n"); + kprintf("\n"); } static void @@ -2855,16 +2855,16 @@ ieee80211_discard_ie(struct ieee80211com *ic, { __va_list ap; - printf("[%s:%6D] discard ", ic->ic_ifp->if_xname, + kprintf("[%s:%6D] discard ", ic->ic_ifp->if_xname, ieee80211_getbssid(ic, wh), ":"); if (type != NULL) - printf("%s information element, ", type); + kprintf("%s information element, ", type); else - printf("information element, "); + kprintf("information element, "); __va_start(ap, fmt); kvprintf(fmt, ap); __va_end(ap); - printf("\n"); + kprintf("\n"); } static void @@ -2874,14 +2874,14 @@ ieee80211_discard_mac(struct ieee80211com *ic, { __va_list ap; - printf("[%s:%6D] discard ", ic->ic_ifp->if_xname, mac, ":"); + kprintf("[%s:%6D] discard ", ic->ic_ifp->if_xname, mac, ":"); if (type != NULL) - printf("%s frame, ", type); + kprintf("%s frame, ", type); else - printf("frame, "); + kprintf("frame, "); __va_start(ap, fmt); kvprintf(fmt, ap); __va_end(ap); - printf("\n"); + kprintf("\n"); } #endif /* IEEE80211_DEBUG */ diff --git a/sys/netproto/802_11/wlan/ieee80211_node.c b/sys/netproto/802_11/wlan/ieee80211_node.c index 8d35d3766e..fab20b4c6e 100644 --- a/sys/netproto/802_11/wlan/ieee80211_node.c +++ b/sys/netproto/802_11/wlan/ieee80211_node.c @@ -30,7 +30,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/net80211/ieee80211_node.c,v 1.48.2.12 2006/07/10 00:46:27 sam Exp $ - * $DragonFly: src/sys/netproto/802_11/wlan/ieee80211_node.c,v 1.12 2006/12/15 12:44:23 sephe Exp $ + * $DragonFly: src/sys/netproto/802_11/wlan/ieee80211_node.c,v 1.13 2006/12/22 23:57:53 swildner Exp $ */ #include @@ -238,7 +238,7 @@ dump_chanlist(const u_char chans[]) sep = " "; for (i = 0; i < IEEE80211_CHAN_MAX; i++) if (isset(chans, i)) { - printf("%s%u", sep, i); + kprintf("%s%u", sep, i); sep = ", "; } } @@ -262,9 +262,9 @@ ieee80211_reset_scan(struct ieee80211com *ic) sizeof(ic->ic_chan_active)); #ifdef IEEE80211_DEBUG if (ieee80211_msg_scan(ic)) { - printf("%s: scan set:", __func__); + kprintf("%s: scan set:", __func__); dump_chanlist(ic->ic_chan_scan); - printf(" start chan %u\n", + kprintf(" start chan %u\n", ieee80211_chan2ieee(ic, ic->ic_curchan)); } #endif /* IEEE80211_DEBUG */ @@ -524,27 +524,27 @@ ieee80211_match_bss(struct ieee80211com *ic, struct ieee80211_node *ni) fail |= 0x40; #ifdef IEEE80211_DEBUG if (ieee80211_msg_scan(ic)) { - printf(" %c %6D", + kprintf(" %c %6D", fail & 0x40 ? '=' : fail & 0x80 ? '^' : fail ? '-' : '+', ni->ni_macaddr, ":"); - printf(" %6D%c", ni->ni_bssid, ":", + kprintf(" %6D%c", ni->ni_bssid, ":", fail & 0x20 ? '!' : ' '); - printf(" %3d%c", ieee80211_chan2ieee(ic, ni->ni_chan), + kprintf(" %3d%c", ieee80211_chan2ieee(ic, ni->ni_chan), fail & 0x01 ? '!' : ' '); - printf(" %+4d", ni->ni_rssi); - printf(" %2dM%c", (rate & IEEE80211_RATE_VAL) / 2, + kprintf(" %+4d", ni->ni_rssi); + kprintf(" %2dM%c", (rate & IEEE80211_RATE_VAL) / 2, fail & 0x08 ? '!' : ' '); - printf(" %4s%c", + kprintf(" %4s%c", (ni->ni_capinfo & IEEE80211_CAPINFO_ESS) ? "ess" : (ni->ni_capinfo & IEEE80211_CAPINFO_IBSS) ? "ibss" : "????", fail & 0x02 ? '!' : ' '); - printf(" %3s%c ", + kprintf(" %3s%c ", (ni->ni_capinfo & IEEE80211_CAPINFO_PRIVACY) ? "wep" : "no", fail & 0x04 ? '!' : ' '); ieee80211_print_essid(ni->ni_essid, ni->ni_esslen); - printf("%s\n", fail & 0x10 ? "!" : ""); + kprintf("%s\n", fail & 0x10 ? "!" : ""); } #endif return fail; @@ -1147,28 +1147,28 @@ dump_probe_beacon(uint8_t subtype, int isnew, const struct ieee80211_scanparams *sp) { - printf("[%6D] %s%s on chan %u (bss chan %u) ", + kprintf("[%6D] %s%s on chan %u (bss chan %u) ", mac, ":", isnew ? "new " : "", ieee80211_mgt_subtype_name[subtype >> IEEE80211_FC0_SUBTYPE_SHIFT], sp->chan, sp->bchan); ieee80211_print_essid(sp->ssid + 2, sp->ssid[1]); - printf("\n"); + kprintf("\n"); if (isnew) { - printf("[%6D] caps 0x%x bintval %u erp 0x%x", + kprintf("[%6D] caps 0x%x bintval %u erp 0x%x", mac, ":", sp->capinfo, sp->bintval, sp->erp); if (sp->country != NULL) { #if defined(__FreeBSD__) || defined(__DragonFly__) - printf(" country info %*D", + kprintf(" country info %*D", sp->country[1], sp->country+2, " "); #else int i; - printf(" country info"); + kprintf(" country info"); for (i = 0; i < sp->country[1]; i++) - printf(" %02x", sp->country[i+2]); + kprintf(" %02x", sp->country[i+2]); #endif } - printf("\n"); + kprintf("\n"); } } #endif /* IEEE80211_DEBUG */ @@ -1935,24 +1935,24 @@ ieee80211_iterate_nodes(struct ieee80211_node_table *nt, ieee80211_iter_func *f, void ieee80211_dump_node(struct ieee80211_node_table *nt, struct ieee80211_node *ni) { - printf("0x%p: mac %6D refcnt %d\n", ni, + kprintf("0x%p: mac %6D refcnt %d\n", ni, ni->ni_macaddr, ":", ieee80211_node_refcnt(ni)); - printf("\tauthmode %u flags 0x%x\n", + kprintf("\tauthmode %u flags 0x%x\n", ni->ni_authmode, ni->ni_flags); - printf("\tassocid 0x%x txpower %u vlan %u\n", + kprintf("\tassocid 0x%x txpower %u vlan %u\n", ni->ni_associd, ni->ni_txpower, ni->ni_vlan); - printf("\ttxseq %u rxseq %u fragno %u rxfragstamp %u\n", + kprintf("\ttxseq %u rxseq %u fragno %u rxfragstamp %u\n", ni->ni_txseqs[0], ni->ni_rxseqs[0] >> IEEE80211_SEQ_SEQ_SHIFT, ni->ni_rxseqs[0] & IEEE80211_SEQ_FRAG_MASK, ni->ni_rxfragstamp); - printf("\trstamp %u rssi %u intval %u capinfo 0x%x\n", + kprintf("\trstamp %u rssi %u intval %u capinfo 0x%x\n", ni->ni_rstamp, ni->ni_rssi, ni->ni_intval, ni->ni_capinfo); - printf("\tbssid %6D essid \"%.*s\" channel %u:0x%x\n", + kprintf("\tbssid %6D essid \"%.*s\" channel %u:0x%x\n", ni->ni_bssid, ":", ni->ni_esslen, ni->ni_essid, ni->ni_chan->ic_freq, ni->ni_chan->ic_flags); - printf("\tfails %u inact %u txrate %u\n", + kprintf("\tfails %u inact %u txrate %u\n", ni->ni_fails, ni->ni_inact, ni->ni_txrate); } @@ -2331,7 +2331,7 @@ ieee80211_node_table_cleanup(struct ieee80211_node_table *nt) int i; for (i = 0; i < nt->nt_keyixmax; i++) if (nt->nt_keyixmap[i] != NULL) { - printf("%s: %s[%u] still active\n", __func__, + kprintf("%s: %s[%u] still active\n", __func__, nt->nt_name, i); } kfree(nt->nt_keyixmap, M_80211_NODE); diff --git a/sys/netproto/802_11/wlan/ieee80211_output.c b/sys/netproto/802_11/wlan/ieee80211_output.c index e715e45784..45fe4117ca 100644 --- a/sys/netproto/802_11/wlan/ieee80211_output.c +++ b/sys/netproto/802_11/wlan/ieee80211_output.c @@ -30,7 +30,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/net80211/ieee80211_output.c,v 1.26.2.8 2006/09/02 15:06:04 sam Exp $ - * $DragonFly: src/sys/netproto/802_11/wlan/ieee80211_output.c,v 1.9 2006/12/09 07:22:49 sephe Exp $ + * $DragonFly: src/sys/netproto/802_11/wlan/ieee80211_output.c,v 1.10 2006/12/22 23:57:53 swildner Exp $ */ #include "opt_inet.h" @@ -183,7 +183,7 @@ ieee80211_mgmt_output(struct ieee80211com *ic, struct ieee80211_node *ni, /* avoid printing too many frames */ if ((ieee80211_msg_debug(ic) && doprint(ic, type)) || ieee80211_msg_dumppkts(ic)) { - printf("[%6D] send %s on channel %u\n", + kprintf("[%6D] send %s on channel %u\n", wh->i_addr1, ":", ieee80211_mgt_subtype_name[ (type & IEEE80211_FC0_SUBTYPE_MASK) >> diff --git a/sys/netproto/802_11/wlan/ieee80211_proto.c b/sys/netproto/802_11/wlan/ieee80211_proto.c index 057e6d8657..8fdda64a7d 100644 --- a/sys/netproto/802_11/wlan/ieee80211_proto.c +++ b/sys/netproto/802_11/wlan/ieee80211_proto.c @@ -30,7 +30,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/net80211/ieee80211_proto.c,v 1.17.2.9 2006/03/13 03:10:31 sam Exp $ - * $DragonFly: src/sys/netproto/802_11/wlan/ieee80211_proto.c,v 1.5 2006/12/15 12:44:23 sephe Exp $ + * $DragonFly: src/sys/netproto/802_11/wlan/ieee80211_proto.c,v 1.6 2006/12/22 23:57:53 swildner Exp $ */ /* @@ -210,7 +210,7 @@ static const struct ieee80211_aclator *acl = NULL; void ieee80211_aclator_register(const struct ieee80211_aclator *iac) { - printf("wlan: %s acl policy registered\n", iac->iac_name); + kprintf("wlan: %s acl policy registered\n", iac->iac_name); acl = iac; } @@ -219,7 +219,7 @@ ieee80211_aclator_unregister(const struct ieee80211_aclator *iac) { if (acl == iac) acl = NULL; - printf("wlan: %s acl policy unregistered\n", iac->iac_name); + kprintf("wlan: %s acl policy unregistered\n", iac->iac_name); } const struct ieee80211_aclator * @@ -244,14 +244,14 @@ ieee80211_print_essid(const uint8_t *essid, int len) break; } if (i == len) { - printf("\""); + kprintf("\""); for (i = 0, p = essid; i < len; i++, p++) - printf("%c", *p); - printf("\""); + kprintf("%c", *p); + kprintf("\""); } else { - printf("0x"); + kprintf("0x"); for (i = 0, p = essid; i < len; i++, p++) - printf("%02x", *p); + kprintf("%02x", *p); } } @@ -261,7 +261,7 @@ ieee80211_print_rateset(const struct ieee80211_rateset *rs) int i; for (i = 0; i < rs->rs_nrates; ++i) { - printf("%d%s ", IEEE80211_RS_RATE(rs, i), + kprintf("%d%s ", IEEE80211_RS_RATE(rs, i), (rs->rs_rates[i] & IEEE80211_RATE_BASIC) ? "*" : ""); } } @@ -275,59 +275,59 @@ ieee80211_dump_pkt(const uint8_t *buf, int len, int rate, int rssi) wh = (const struct ieee80211_frame *)buf; switch (wh->i_fc[1] & IEEE80211_FC1_DIR_MASK) { case IEEE80211_FC1_DIR_NODS: - printf("NODS %6D", wh->i_addr2, ":"); - printf("->%6D", wh->i_addr1, ":"); - printf("(%6D)", wh->i_addr3, ":"); + kprintf("NODS %6D", wh->i_addr2, ":"); + kprintf("->%6D", wh->i_addr1, ":"); + kprintf("(%6D)", wh->i_addr3, ":"); break; case IEEE80211_FC1_DIR_TODS: - printf("TODS %6D", wh->i_addr2, ":"); - printf("->%6D", wh->i_addr3, ":"); - printf("(%6D)", wh->i_addr1, ":"); + kprintf("TODS %6D", wh->i_addr2, ":"); + kprintf("->%6D", wh->i_addr3, ":"); + kprintf("(%6D)", wh->i_addr1, ":"); break; case IEEE80211_FC1_DIR_FROMDS: - printf("FRDS %6D", wh->i_addr3, ":"); - printf("->%6D", wh->i_addr1, ":"); - printf("(%6D)", wh->i_addr2, ":"); + kprintf("FRDS %6D", wh->i_addr3, ":"); + kprintf("->%6D", wh->i_addr1, ":"); + kprintf("(%6D)", wh->i_addr2, ":"); break; case IEEE80211_FC1_DIR_DSTODS: - printf("DSDS %6D", (const uint8_t *)&wh[1], ":"); - printf("->%6D", wh->i_addr3, ":"); - printf("(%6D", wh->i_addr2, ":"); - printf("->%6D)", wh->i_addr1, ":"); + kprintf("DSDS %6D", (const uint8_t *)&wh[1], ":"); + kprintf("->%6D", wh->i_addr3, ":"); + kprintf("(%6D", wh->i_addr2, ":"); + kprintf("->%6D)", wh->i_addr1, ":"); break; } switch (wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) { case IEEE80211_FC0_TYPE_DATA: - printf(" data"); + kprintf(" data"); break; case IEEE80211_FC0_TYPE_MGT: - printf(" %s", ieee80211_mgt_subtype_name[ + kprintf(" %s", ieee80211_mgt_subtype_name[ (wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK) >> IEEE80211_FC0_SUBTYPE_SHIFT]); break; default: - printf(" type#%d", wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK); + kprintf(" type#%d", wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK); break; } if (wh->i_fc[1] & IEEE80211_FC1_WEP) { int i; - printf(" WEP [IV"); + kprintf(" WEP [IV"); for (i = 0; i < IEEE80211_WEP_IVLEN; i++) - printf(" %.02x", buf[sizeof(*wh)+i]); - printf(" KID %u]", buf[sizeof(*wh)+i] >> 6); + kprintf(" %.02x", buf[sizeof(*wh)+i]); + kprintf(" KID %u]", buf[sizeof(*wh)+i] >> 6); } if (rate >= 0) - printf(" %dM", rate / 2); + kprintf(" %dM", rate / 2); if (rssi >= 0) - printf(" +%d", rssi); - printf("\n"); + kprintf(" +%d", rssi); + kprintf("\n"); if (len > 0) { for (i = 0; i < len; i++) { if ((i & 1) == 0) - printf(" "); - printf("%02x", buf[i]); + kprintf(" "); + kprintf("%02x", buf[i]); } - printf("\n"); + kprintf("\n"); } } @@ -1117,10 +1117,10 @@ ieee80211_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg if_printf(ifp, "associated "); else if_printf(ifp, "synchronized "); - printf("with %6D ssid ", ni->ni_bssid, ":"); + kprintf("with %6D ssid ", ni->ni_bssid, ":"); ieee80211_print_essid(ic->ic_bss->ni_essid, ni->ni_esslen); - printf(" channel %d start %uMb\n", + kprintf(" channel %d start %uMb\n", ieee80211_chan2ieee(ic, ic->ic_curchan), IEEE80211_RATE2MBS(ni->ni_rates.rs_rates[ni->ni_txrate])); } diff --git a/sys/netproto/802_11/wlan/ieee80211_ratectl.c b/sys/netproto/802_11/wlan/ieee80211_ratectl.c index 662fbdc9b7..c3d26a1698 100644 --- a/sys/netproto/802_11/wlan/ieee80211_ratectl.c +++ b/sys/netproto/802_11/wlan/ieee80211_ratectl.c @@ -31,7 +31,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/netproto/802_11/wlan/ieee80211_ratectl.c,v 1.1 2006/09/01 15:12:11 sephe Exp $ + * $DragonFly: src/sys/netproto/802_11/wlan/ieee80211_ratectl.c,v 1.2 2006/12/22 23:57:53 swildner Exp $ */ #include @@ -77,13 +77,13 @@ ieee80211_ratectl_register(const struct ieee80211_ratectl *rc) * Sanity checks */ if (rc->rc_ratectl >= IEEE80211_RATECTL_MAX) { - printf("%s: rate control %s has an invalid index %d\n", + kprintf("%s: rate control %s has an invalid index %d\n", __func__, rc->rc_name, rc->rc_ratectl); return; } if (ratectls[rc->rc_ratectl] != NULL && ratectls[rc->rc_ratectl] != rc) { - printf("%s: rate control index %d is registered by %s\n", + kprintf("%s: rate control index %d is registered by %s\n", __func__, rc->rc_ratectl, ratectls[rc->rc_ratectl]->rc_name); return; @@ -99,13 +99,13 @@ ieee80211_ratectl_unregister(const struct ieee80211_ratectl *rc) * Sanity checks */ if (rc->rc_ratectl >= IEEE80211_RATECTL_MAX) { - printf("%s: rate control %s has an invalid index %d\n", + kprintf("%s: rate control %s has an invalid index %d\n", __func__, rc->rc_name, rc->rc_ratectl); return; } if (ratectls[rc->rc_ratectl] != NULL && ratectls[rc->rc_ratectl] != rc) { - printf("%s: rate control index %d is registered by %s\n", + kprintf("%s: rate control index %d is registered by %s\n", __func__, rc->rc_ratectl, ratectls[rc->rc_ratectl]->rc_name); return; @@ -145,7 +145,7 @@ ieee80211_ratectl_change(struct ieee80211com *ic, u_int rc_idx) */ rc = ratectls[rc_idx]; if (rc == NULL) { - printf("%s: can't load requested rate control module", + kprintf("%s: can't load requested rate control module", __func__); return EOPNOTSUPP; } diff --git a/sys/netproto/802_11/wlan_acl/ieee80211_acl.c b/sys/netproto/802_11/wlan_acl/ieee80211_acl.c index 3ffb4b7b2c..be28dd43b3 100644 --- a/sys/netproto/802_11/wlan_acl/ieee80211_acl.c +++ b/sys/netproto/802_11/wlan_acl/ieee80211_acl.c @@ -29,7 +29,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/net80211/ieee80211_acl.c,v 1.3.2.1 2005/09/03 22:40:02 sam Exp $ - * $DragonFly: src/sys/netproto/802_11/wlan_acl/ieee80211_acl.c,v 1.2 2006/09/05 00:55:48 dillon Exp $ + * $DragonFly: src/sys/netproto/802_11/wlan_acl/ieee80211_acl.c,v 1.3 2006/12/22 23:57:53 swildner Exp $ */ /* @@ -329,7 +329,7 @@ wlan_acl_modevent(module_t mod, int type, void *unused) switch (type) { case MOD_LOAD: if (bootverbose) - printf("wlan: <802.11 MAC ACL support>\n"); + kprintf("wlan: <802.11 MAC ACL support>\n"); ieee80211_aclator_register(&mac); return 0; case MOD_UNLOAD: diff --git a/sys/netproto/802_11/wlan_ccmp/ieee80211_crypto_ccmp.c b/sys/netproto/802_11/wlan_ccmp/ieee80211_crypto_ccmp.c index 34be844e51..c2d10c232e 100644 --- a/sys/netproto/802_11/wlan_ccmp/ieee80211_crypto_ccmp.c +++ b/sys/netproto/802_11/wlan_ccmp/ieee80211_crypto_ccmp.c @@ -29,7 +29,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/net80211/ieee80211_crypto_ccmp.c,v 1.7.2.1 2005/12/22 19:02:08 sam Exp $ - * $DragonFly: src/sys/netproto/802_11/wlan_ccmp/ieee80211_crypto_ccmp.c,v 1.3 2006/11/28 14:44:03 sephe Exp $ + * $DragonFly: src/sys/netproto/802_11/wlan_ccmp/ieee80211_crypto_ccmp.c,v 1.4 2006/12/22 23:57:53 swildner Exp $ */ /* @@ -645,7 +645,7 @@ ccmp_modevent(module_t mod, int type, void *unused) return 0; case MOD_UNLOAD: if (nrefs) { - printf("wlan_ccmp: still in use (%u dynamic refs)\n", + kprintf("wlan_ccmp: still in use (%u dynamic refs)\n", nrefs); return EBUSY; } diff --git a/sys/netproto/802_11/wlan_ratectl/amrr/ieee80211_ratectl_amrr.c b/sys/netproto/802_11/wlan_ratectl/amrr/ieee80211_ratectl_amrr.c index 791f5e2056..4ff6684085 100644 --- a/sys/netproto/802_11/wlan_ratectl/amrr/ieee80211_ratectl_amrr.c +++ b/sys/netproto/802_11/wlan_ratectl/amrr/ieee80211_ratectl_amrr.c @@ -35,7 +35,7 @@ * THE POSSIBILITY OF SUCH DAMAGES. * * $FreeBSD: src/sys/dev/ath/ath_rate/amrr/amrr.c,v 1.8.2.3 2006/02/24 19:51:11 sam Exp $ - * $DragonFly: src/sys/netproto/802_11/wlan_ratectl/amrr/ieee80211_ratectl_amrr.c,v 1.5 2006/10/24 14:39:44 sephe Exp $ + * $DragonFly: src/sys/netproto/802_11/wlan_ratectl/amrr/ieee80211_ratectl_amrr.c,v 1.6 2006/12/22 23:57:53 swildner Exp $ */ /* @@ -64,7 +64,7 @@ #ifdef AMRR_DEBUG #define DPRINTF(asc, lv, fmt, ...) do { \ if ((asc)->debug >= lv) \ - printf(fmt, __VA_ARGS__); \ + kprintf(fmt, __VA_ARGS__); \ } while (0) #else #define DPRINTF(asc, lv, fmt, ...) @@ -476,7 +476,7 @@ amrr_sysctl_attach(struct amrr_softc *asc) SYSCTL_CHILDREN(ic->ic_sysctl_oid), OID_AUTO, "amrr_ratectl", CTLFLAG_RD, 0, ""); if (asc->sysctl_oid == NULL) { - printf("wlan_ratectl_amrr: create sysctl tree failed\n"); + kprintf("wlan_ratectl_amrr: create sysctl tree failed\n"); return; } @@ -587,7 +587,7 @@ amrr_modevent(module_t mod, int type, void *unused) return 0; case MOD_UNLOAD: if (amrr_nrefs) { - printf("wlan_ratectl_amrr: still in use " + kprintf("wlan_ratectl_amrr: still in use " "(%u dynamic refs)\n", amrr_nrefs); return EBUSY; } diff --git a/sys/netproto/802_11/wlan_ratectl/onoe/ieee80211_ratectl_onoe.c b/sys/netproto/802_11/wlan_ratectl/onoe/ieee80211_ratectl_onoe.c index 12579ede67..65d260727a 100644 --- a/sys/netproto/802_11/wlan_ratectl/onoe/ieee80211_ratectl_onoe.c +++ b/sys/netproto/802_11/wlan_ratectl/onoe/ieee80211_ratectl_onoe.c @@ -34,7 +34,7 @@ * THE POSSIBILITY OF SUCH DAMAGES. * * $FreeBSD: src/sys/dev/ath/ath_rate/onoe/onoe.c,v 1.8.2.3 2006/02/24 19:51:11 sam Exp $ - * $DragonFly: src/sys/netproto/802_11/wlan_ratectl/onoe/ieee80211_ratectl_onoe.c,v 1.4 2006/10/24 14:39:45 sephe Exp $ + * $DragonFly: src/sys/netproto/802_11/wlan_ratectl/onoe/ieee80211_ratectl_onoe.c,v 1.5 2006/12/22 23:57:53 swildner Exp $ */ /* @@ -61,7 +61,7 @@ #ifdef ONOE_DEBUG #define DPRINTF(osc, lv, fmt, ...) do { \ if ((osc)->debug >= lv) \ - printf(fmt, __VA_ARGS__); \ + kprintf(fmt, __VA_ARGS__); \ } while (0) #else #define DPRINTF(osc, lv, fmt, ...) @@ -454,7 +454,7 @@ onoe_sysctl_attach(struct onoe_softc *osc) SYSCTL_CHILDREN(osc->ic->ic_sysctl_oid), OID_AUTO, "onoe_ratectl", CTLFLAG_RD, 0, ""); if (osc->sysctl_oid == NULL) { - printf("wlan_ratectl_onoe: create sysctl tree failed\n"); + kprintf("wlan_ratectl_onoe: create sysctl tree failed\n"); return; } @@ -562,7 +562,7 @@ onoe_modevent(module_t mod, int type, void *unused) return 0; case MOD_UNLOAD: if (onoe_nrefs) { - printf("wlan_ratectl_onoe: still in use " + kprintf("wlan_ratectl_onoe: still in use " "(%u dynamic refs)\n", onoe_nrefs); return EBUSY; } diff --git a/sys/netproto/802_11/wlan_tkip/ieee80211_crypto_tkip.c b/sys/netproto/802_11/wlan_tkip/ieee80211_crypto_tkip.c index 296d69d28d..15d02dc1b4 100644 --- a/sys/netproto/802_11/wlan_tkip/ieee80211_crypto_tkip.c +++ b/sys/netproto/802_11/wlan_tkip/ieee80211_crypto_tkip.c @@ -29,7 +29,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/net80211/ieee80211_crypto_tkip.c,v 1.9.2.2 2005/12/22 19:02:08 sam Exp $ - * $DragonFly: src/sys/netproto/802_11/wlan_tkip/ieee80211_crypto_tkip.c,v 1.3 2006/11/28 14:44:03 sephe Exp $ + * $DragonFly: src/sys/netproto/802_11/wlan_tkip/ieee80211_crypto_tkip.c,v 1.4 2006/12/22 23:57:53 swildner Exp $ */ /* @@ -1001,7 +1001,7 @@ tkip_modevent(module_t mod, int type, void *unused) return 0; case MOD_UNLOAD: if (nrefs) { - printf("wlan_tkip: still in use (%u dynamic refs)\n", + kprintf("wlan_tkip: still in use (%u dynamic refs)\n", nrefs); return EBUSY; } diff --git a/sys/netproto/802_11/wlan_wep/ieee80211_crypto_wep.c b/sys/netproto/802_11/wlan_wep/ieee80211_crypto_wep.c index 66147f25af..d891ccad2a 100644 --- a/sys/netproto/802_11/wlan_wep/ieee80211_crypto_wep.c +++ b/sys/netproto/802_11/wlan_wep/ieee80211_crypto_wep.c @@ -29,7 +29,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/net80211/ieee80211_crypto_wep.c,v 1.7.2.1 2005/12/22 19:02:08 sam Exp $ - * $DragonFly: src/sys/netproto/802_11/wlan_wep/ieee80211_crypto_wep.c,v 1.3 2006/11/28 14:44:03 sephe Exp $ + * $DragonFly: src/sys/netproto/802_11/wlan_wep/ieee80211_crypto_wep.c,v 1.4 2006/12/22 23:57:53 swildner Exp $ */ /* @@ -487,7 +487,7 @@ wep_modevent(module_t mod, int type, void *unused) return 0; case MOD_UNLOAD: if (nrefs) { - printf("wlan_wep: still in use (%u dynamic refs)\n", + kprintf("wlan_wep: still in use (%u dynamic refs)\n", nrefs); return EBUSY; } diff --git a/sys/netproto/atalk/aarp.c b/sys/netproto/atalk/aarp.c index 682236eed3..31097d9a31 100644 --- a/sys/netproto/atalk/aarp.c +++ b/sys/netproto/atalk/aarp.c @@ -3,7 +3,7 @@ * All Rights Reserved. * * $FreeBSD: src/sys/netatalk/aarp.c,v 1.12.2.2 2001/06/23 20:43:09 iedowse Exp $ - * $DragonFly: src/sys/netproto/atalk/aarp.c,v 1.19 2006/05/20 06:32:41 dillon Exp $ + * $DragonFly: src/sys/netproto/atalk/aarp.c,v 1.20 2006/12/22 23:57:53 swildner Exp $ */ #include "opt_atalk.h" @@ -183,7 +183,7 @@ aarpwhohas(struct arpcom *ac, struct sockaddr_at *sat) } #ifdef NETATALKDEBUG - printf("aarp: sending request for %u.%u\n", + kprintf("aarp: sending request for %u.%u\n", ntohs(AA_SAT( aa )->sat_addr.s_net), AA_SAT( aa )->sat_addr.s_node); #endif /* NETATALKDEBUG */ @@ -537,7 +537,7 @@ aarpprobe(void *arg) } } if ( aa == NULL ) { /* serious error XXX */ - printf( "aarpprobe why did this happen?!\n" ); + kprintf( "aarpprobe why did this happen?!\n" ); return; } @@ -595,7 +595,7 @@ aarpprobe(void *arg) } #ifdef NETATALKDEBUG - printf("aarp: sending probe for %u.%u\n", + kprintf("aarp: sending probe for %u.%u\n", ntohs(AA_SAT( aa )->sat_addr.s_net), AA_SAT( aa )->sat_addr.s_node); #endif /* NETATALKDEBUG */ diff --git a/sys/netproto/atalk/at_control.c b/sys/netproto/atalk/at_control.c index 1df13cc93a..abd0fd594f 100644 --- a/sys/netproto/atalk/at_control.c +++ b/sys/netproto/atalk/at_control.c @@ -2,7 +2,7 @@ * Copyright (c) 1990,1991 Regents of The University of Michigan. * All Rights Reserved. * - * $DragonFly: src/sys/netproto/atalk/at_control.c,v 1.11 2006/09/05 00:55:49 dillon Exp $ + * $DragonFly: src/sys/netproto/atalk/at_control.c,v 1.12 2006/12/22 23:57:53 swildner Exp $ */ #include @@ -402,7 +402,7 @@ at_ifinit(struct ifnet *ifp, struct at_ifaddr *aa, struct sockaddr_at *sat) /* XXX ALC */ #if 0 - printf("at_ifinit: %s: %u.%u range %u-%u phase %d\n", + kprintf("at_ifinit: %s: %u.%u range %u-%u phase %d\n", ifp->if_name, ntohs(sat->sat_addr.s_net), sat->sat_addr.s_node, ntohs(aa->aa_firstnet), ntohs(aa->aa_lastnet), @@ -529,7 +529,7 @@ at_ifinit(struct ifnet *ifp, struct at_ifaddr *aa, struct sockaddr_at *sat) * theoretically we shouldn't time out here * so if we returned with an error.. */ - printf( "at_ifinit: why did this happen?!\n" ); + kprintf( "at_ifinit: why did this happen?!\n" ); aa->aa_addr = oldaddr; aa->aa_firstnet = onr.nr_firstnet; aa->aa_lastnet = onr.nr_lastnet; @@ -771,14 +771,14 @@ aa_addsingleroute(struct ifaddr *ifa, int error; #if 0 - printf("aa_addsingleroute: %x.%x mask %x.%x ...\n", + kprintf("aa_addsingleroute: %x.%x mask %x.%x ...\n", ntohs(addr->s_net), addr->s_node, ntohs(mask->s_net), mask->s_node); #endif error = aa_dosingleroute(ifa, addr, mask, RTM_ADD, RTF_UP); if (error) - printf("aa_addsingleroute: error %d\n", error); + kprintf("aa_addsingleroute: error %d\n", error); return(error); } @@ -790,7 +790,7 @@ aa_delsingleroute(struct ifaddr *ifa, error = aa_dosingleroute(ifa, addr, mask, RTM_DELETE, 0); if (error) - printf("aa_delsingleroute: error %d\n", error); + kprintf("aa_delsingleroute: error %d\n", error); return(error); } @@ -875,7 +875,7 @@ aa_claim_addr(struct ifaddr *ifa, struct sockaddr *gw0) } break; default: - printf("atalk: bad phase\n"); + kprintf("atalk: bad phase\n"); } return 0; } diff --git a/sys/netproto/atalk/at_rmx.c b/sys/netproto/atalk/at_rmx.c index cff4b1528a..637d501f2c 100644 --- a/sys/netproto/atalk/at_rmx.c +++ b/sys/netproto/atalk/at_rmx.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * at_rmx.c,v 1.13 1995/05/30 08:09:31 rgrimes Exp - * $DragonFly: src/sys/netproto/atalk/at_rmx.c,v 1.3 2006/12/20 18:14:43 dillon Exp $ + * $DragonFly: src/sys/netproto/atalk/at_rmx.c,v 1.4 2006/12/22 23:57:53 swildner Exp $ */ /* This code generates debugging traces to the radix code */ @@ -73,14 +73,14 @@ at_addroute(char *key, char *mask, struct radix_node_head *head, { struct radix_node *rn; - printf("at_addroute: v=%s\n", prsockaddr(key)); - printf("at_addroute: n=%s\n", prsockaddr(mask)); - printf("at_addroute: head=%p treenodes=%p\n", + kprintf("at_addroute: v=%s\n", prsockaddr(key)); + kprintf("at_addroute: n=%s\n", prsockaddr(mask)); + kprintf("at_addroute: head=%p treenodes=%p\n", (void *)head, (void *)treenodes); rn = rn_addroute(key, mask, head, treenodes); - printf("at_addroute: returns rn=%p\n", (void *)rn); + kprintf("at_addroute: returns rn=%p\n", (void *)rn); return rn; } @@ -90,12 +90,12 @@ at_matroute(char *key, struct radix_node_head *head) { struct radix_node *rn; - printf("at_matroute: v=%s\n", prsockaddr(key)); - printf("at_matroute: head=%p\n", (void *)head); + kprintf("at_matroute: v=%s\n", prsockaddr(key)); + kprintf("at_matroute: head=%p\n", (void *)head); rn = rn_match(key, head); - printf("at_matroute: returnr rn=%p\n", (void *)rn); + kprintf("at_matroute: returnr rn=%p\n", (void *)rn); return rn; } @@ -105,13 +105,13 @@ at_lookup(char *key, char *mask, struct radix_node_head *head) { struct radix_node *rn; - printf("at_lookup: v=%s\n", prsockaddr(key)); - printf("at_lookup: n=%s\n", prsockaddr(mask)); - printf("at_lookup: head=%p\n", (void *)head); + kprintf("at_lookup: v=%s\n", prsockaddr(key)); + kprintf("at_lookup: n=%s\n", prsockaddr(mask)); + kprintf("at_lookup: head=%p\n", (void *)head); rn = rn_lookup(key, mask, head); - printf("at_lookup: returns rn=%p\n", (void *)rn); + kprintf("at_lookup: returns rn=%p\n", (void *)rn); return rn; } @@ -121,13 +121,13 @@ at_delroute(char *key, char *netmask, struct radix_node_head *head) { struct radix_node *rn; - printf("at_delroute: v=%s\n", prsockaddr(key)); - printf("at_delroute: n=%s\n", prsockaddr(netmask)); - printf("at_delroute: head=%p\n", (void *)head); + kprintf("at_delroute: v=%s\n", prsockaddr(key)); + kprintf("at_delroute: n=%s\n", prsockaddr(netmask)); + kprintf("at_delroute: head=%p\n", (void *)head); rn = rn_delete(key, netmask, head); - printf("at_delroute: returns rn=%p\n", (void *)rn); + kprintf("at_delroute: returns rn=%p\n", (void *)rn); return rn; } diff --git a/sys/netproto/atalk/ddp_input.c b/sys/netproto/atalk/ddp_input.c index 43913e34d0..506f038dc9 100644 --- a/sys/netproto/atalk/ddp_input.c +++ b/sys/netproto/atalk/ddp_input.c @@ -3,7 +3,7 @@ * All Rights Reserved. See COPYRIGHT. * * $FreeBSD: src/sys/netatalk/ddp_input.c,v 1.12 2000/02/13 03:31:58 peter Exp $ - * $DragonFly: src/sys/netproto/atalk/ddp_input.c,v 1.11 2006/05/20 06:32:41 dillon Exp $ + * $DragonFly: src/sys/netproto/atalk/ddp_input.c,v 1.12 2006/12/22 23:57:53 swildner Exp $ */ #include @@ -406,9 +406,9 @@ bprint(char *data, int len) for ( ;; ) { if ( len < 1 ) { if ( i != 0 ) { - printf( "%s\t%s\n", xout, aout ); + kprintf( "%s\t%s\n", xout, aout ); } - printf( "%s\n", "(end)" ); + kprintf( "%s\n", "(end)" ); break; } @@ -428,7 +428,7 @@ bprint(char *data, int len) data++; if ( i > BPALEN - 2 ) { - printf( "%s\t%s\n", xout, aout ); + kprintf( "%s\t%s\n", xout, aout ); bzero( xout, BPXLEN ); bzero( aout, BPALEN ); i = 0; diff --git a/sys/netproto/atalk/ddp_output.c b/sys/netproto/atalk/ddp_output.c index 8ca2793920..98dca87c90 100644 --- a/sys/netproto/atalk/ddp_output.c +++ b/sys/netproto/atalk/ddp_output.c @@ -22,7 +22,7 @@ */ /* $FreeBSD: src/sys/netatalk/ddp_output.c,v 1.13.6.1 2000/06/02 22:39:07 archie Exp $ */ -/* $DragonFly: src/sys/netproto/atalk/ddp_output.c,v 1.8 2005/11/28 17:13:46 dillon Exp $ */ +/* $DragonFly: src/sys/netproto/atalk/ddp_output.c,v 1.9 2006/12/22 23:57:53 swildner Exp $ */ #include #include @@ -78,7 +78,7 @@ ddp_output(struct mbuf *m, struct socket *so, ...) deh->deh_bytes = htonl( deh->deh_bytes ); #ifdef NETATALK_DEBUG - printf ("ddp_output: from %d.%d:%d to %d.%d:%d\n", + kprintf ("ddp_output: from %d.%d:%d to %d.%d:%d\n", ntohs(deh->deh_snet), deh->deh_snode, deh->deh_sport, ntohs(deh->deh_dnet), deh->deh_dnode, deh->deh_dport); #endif @@ -155,18 +155,18 @@ ddp_route( struct mbuf *m, struct route *ro) m_freem( m ); #ifdef NETATALK_DEBUG if (ro->ro_rt == NULL) - printf ("ddp_route: no ro_rt.\n"); + kprintf ("ddp_route: no ro_rt.\n"); else if (ro->ro_rt->rt_ifa == NULL) - printf ("ddp_route: no ro_rt->rt_ifa\n"); + kprintf ("ddp_route: no ro_rt->rt_ifa\n"); else - printf ("ddp_route: no ro_rt->rt_ifa->ifa_ifp\n"); + kprintf ("ddp_route: no ro_rt->rt_ifa->ifa_ifp\n"); #endif return( ENETUNREACH ); } if ( aa == NULL ) { #ifdef NETATALK_DEBUG - printf( "ddp_route: no atalk address found for %s\n", + kprintf( "ddp_route: no atalk address found for %s\n", ifp->if_xname); #endif m_freem( m ); @@ -196,7 +196,7 @@ ddp_route( struct mbuf *m, struct route *ro) MGET( m0, MB_WAIT, MT_HEADER ); if ( m0 == 0 ) { m_freem( m ); - printf("ddp_route: no buffers\n"); + kprintf("ddp_route: no buffers\n"); return( ENOBUFS ); } m0->m_next = m; @@ -212,7 +212,7 @@ ddp_route( struct mbuf *m, struct route *ro) ro->ro_rt->rt_use++; #ifdef NETATALK_DEBUG - printf ("ddp_route: from %d.%d to %d.%d, via %d.%d (%s)\n", + kprintf ("ddp_route: from %d.%d to %d.%d, via %d.%d (%s)\n", ntohs(satosat(&aa->aa_addr)->sat_addr.s_net), satosat(&aa->aa_addr)->sat_addr.s_node, ntohs(satosat(&ro->ro_dst)->sat_addr.s_net), diff --git a/sys/netproto/atm/atm_subr.c b/sys/netproto/atm/atm_subr.c index 05bd25bed9..20048b238b 100644 --- a/sys/netproto/atm/atm_subr.c +++ b/sys/netproto/atm/atm_subr.c @@ -24,7 +24,7 @@ * notice must be reproduced on all copies. * * @(#) $FreeBSD: src/sys/netatm/atm_subr.c,v 1.7 2000/02/13 03:31:59 peter Exp $ - * @(#) $DragonFly: src/sys/netproto/atm/atm_subr.c,v 1.19 2006/05/20 06:32:41 dillon Exp $ + * @(#) $DragonFly: src/sys/netproto/atm/atm_subr.c,v 1.20 2006/12/22 23:57:53 swildner Exp $ */ /* @@ -900,19 +900,19 @@ atm_pdu_print(KBuffer *m, char *msg) int i; char c = ' '; - printf("%s:", msg); + kprintf("%s:", msg); while (m) { KB_DATASTART(m, cp, caddr_t); - printf("%cbfr=%p data=%p len=%d: ", + kprintf("%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++); + kprintf("%2x ", (u_char)*cp++); } - printf("\n"); + kprintf("\n"); } else { - printf("\n"); + kprintf("\n"); } m = KB_NEXT(m); } diff --git a/sys/netproto/atm/atm_sys.h b/sys/netproto/atm/atm_sys.h index 2623c90790..9e8dd7baea 100644 --- a/sys/netproto/atm/atm_sys.h +++ b/sys/netproto/atm/atm_sys.h @@ -24,7 +24,7 @@ * notice must be reproduced on all copies. * * @(#) $FreeBSD: src/sys/netatm/atm_sys.h,v 1.3 1999/08/28 00:48:38 peter Exp $ - * @(#) $DragonFly: src/sys/netproto/atm/atm_sys.h,v 1.3 2003/08/23 10:06:21 rob Exp $ + * @(#) $DragonFly: src/sys/netproto/atm/atm_sys.h,v 1.4 2006/12/22 23:57:53 swildner Exp $ * */ @@ -242,20 +242,20 @@ struct sp_link { delta.tv_sec--; \ delta.tv_usec += 1000000; \ } \ - printf("%3ld.%6ld: ", delta.tv_sec, delta.tv_usec); - -#define ATM_DEBUG0(f) if (atm_debug) {ATM_TIME; printf(f);} -#define ATM_DEBUGN0(f) if (atm_debug) {printf(f);} -#define ATM_DEBUG1(f,a1) if (atm_debug) {ATM_TIME; printf(f, a1);} -#define ATM_DEBUGN1(f,a1) if (atm_debug) {printf(f, a1);} -#define ATM_DEBUG2(f,a1,a2) if (atm_debug) {ATM_TIME; printf(f, a1, a2);} -#define ATM_DEBUGN2(f,a1,a2) if (atm_debug) {printf(f, a1, a2);} -#define ATM_DEBUG3(f,a1,a2,a3) if (atm_debug) {ATM_TIME; printf(f, a1, a2, a3);} -#define ATM_DEBUGN3(f,a1,a2,a3) if (atm_debug) {printf(f, a1, a2, a3);} -#define ATM_DEBUG4(f,a1,a2,a3,a4) if (atm_debug) {ATM_TIME; printf(f, a1, a2, a3, a4);} -#define ATM_DEBUGN4(f,a1,a2,a3,a4) if (atm_debug) {printf(f, a1, a2, a3, a4);} -#define ATM_DEBUG5(f,a1,a2,a3,a4,a5) if (atm_debug) {ATM_TIME; printf(f, a1, a2, a3, a4, a5);} -#define ATM_DEBUGN5(f,a1,a2,a3,a4,a5) if (atm_debug) {printf(f, a1, a2, a3, a4, a5);} + kprintf("%3ld.%6ld: ", delta.tv_sec, delta.tv_usec); + +#define ATM_DEBUG0(f) if (atm_debug) {ATM_TIME; kprintf(f);} +#define ATM_DEBUGN0(f) if (atm_debug) {kprintf(f);} +#define ATM_DEBUG1(f,a1) if (atm_debug) {ATM_TIME; kprintf(f, a1);} +#define ATM_DEBUGN1(f,a1) if (atm_debug) {kprintf(f, a1);} +#define ATM_DEBUG2(f,a1,a2) if (atm_debug) {ATM_TIME; kprintf(f, a1, a2);} +#define ATM_DEBUGN2(f,a1,a2) if (atm_debug) {kprintf(f, a1, a2);} +#define ATM_DEBUG3(f,a1,a2,a3) if (atm_debug) {ATM_TIME; kprintf(f, a1, a2, a3);} +#define ATM_DEBUGN3(f,a1,a2,a3) if (atm_debug) {kprintf(f, a1, a2, a3);} +#define ATM_DEBUG4(f,a1,a2,a3,a4) if (atm_debug) {ATM_TIME; kprintf(f, a1, a2, a3, a4);} +#define ATM_DEBUGN4(f,a1,a2,a3,a4) if (atm_debug) {kprintf(f, a1, a2, a3, a4);} +#define ATM_DEBUG5(f,a1,a2,a3,a4,a5) if (atm_debug) {ATM_TIME; kprintf(f, a1, a2, a3, a4, a5);} +#define ATM_DEBUGN5(f,a1,a2,a3,a4,a5) if (atm_debug) {kprintf(f, a1, a2, a3, a4, a5);} #else #define ATM_DEBUG0(f) #define ATM_DEBUGN0(f) diff --git a/sys/netproto/atm/spans/spans_kxdr.c b/sys/netproto/atm/spans/spans_kxdr.c index bb5dba0a07..ef3e7c5dbe 100644 --- a/sys/netproto/atm/spans/spans_kxdr.c +++ b/sys/netproto/atm/spans/spans_kxdr.c @@ -24,7 +24,7 @@ * notice must be reproduced on all copies. * * @(#) $FreeBSD: src/sys/netatm/spans/spans_kxdr.c,v 1.3 1999/08/28 00:48:50 peter Exp $ - * @(#) $DragonFly: src/sys/netproto/atm/spans/spans_kxdr.c,v 1.7 2006/01/14 13:36:39 swildner Exp $ + * @(#) $DragonFly: src/sys/netproto/atm/spans/spans_kxdr.c,v 1.8 2006/12/22 23:57:54 swildner Exp $ */ /* @@ -440,7 +440,7 @@ xdrmbuf_getlong(XDR *xdrs, long *lp) * We (currently) don't allow a long to span a buffer */ if (xdrs->x_handy != -sizeof(long)) { - printf("xdrmbuf_getlong: data spans buffers\n"); + kprintf("xdrmbuf_getlong: data spans buffers\n"); return (FALSE); } @@ -457,7 +457,7 @@ xdrmbuf_getlong(XDR *xdrs, long *lp) */ KB_DATASTART(m, xdrs->x_private, caddr_t); if ((xdrs->x_handy = KB_LEN(m) - sizeof(long)) < 0) { - printf("xdrmbuf_getlong: short buffer\n"); + kprintf("xdrmbuf_getlong: short buffer\n"); return (FALSE); } } else { @@ -494,7 +494,7 @@ xdrmbuf_putlong(XDR *xdrs, long *lp) * We (currently) don't allow a long to span a buffer */ if (xdrs->x_handy != -sizeof(long)) { - printf("xdrmbuf_putlong: data spans buffers\n"); + kprintf("xdrmbuf_putlong: data spans buffers\n"); return (FALSE); } @@ -511,7 +511,7 @@ xdrmbuf_putlong(XDR *xdrs, long *lp) */ KB_DATASTART(m, xdrs->x_private, caddr_t); if ((xdrs->x_handy = KB_LEN(m) - sizeof(long)) < 0) { - printf("xdrmbuf_putlong: short buffer\n"); + kprintf("xdrmbuf_putlong: short buffer\n"); return (FALSE); } } else { diff --git a/sys/netproto/atm/spans/spans_msg.c b/sys/netproto/atm/spans/spans_msg.c index 6206b4efac..3f2c144ccd 100644 --- a/sys/netproto/atm/spans/spans_msg.c +++ b/sys/netproto/atm/spans/spans_msg.c @@ -24,7 +24,7 @@ * notice must be reproduced on all copies. * * @(#) $FreeBSD: src/sys/netatm/spans/spans_msg.c,v 1.5 1999/08/28 00:48:50 peter Exp $ - * @(#) $DragonFly: src/sys/netproto/atm/spans/spans_msg.c,v 1.6 2006/01/14 13:36:39 swildner Exp $ + * @(#) $DragonFly: src/sys/netproto/atm/spans/spans_msg.c,v 1.7 2006/12/22 23:57:54 swildner Exp $ */ /* @@ -133,7 +133,7 @@ spans_send_msg(struct spans *spp, spans_msg *msg) if (msg->sm_type != SPANS_STAT_REQ && msg->sm_type != SPANS_STAT_IND && msg->sm_type != SPANS_STAT_RSP) { - printf("spans_send_msg: sending "); + kprintf("spans_send_msg: sending "); spans_print_msg(msg); } #endif @@ -1453,7 +1453,7 @@ spans_rcv_msg(struct spans *spp, KBuffer *m) if (msg->sm_type != SPANS_STAT_REQ && msg->sm_type != SPANS_STAT_IND && msg->sm_type != SPANS_STAT_RSP) { - printf("spans_rcv_msg: got "); + kprintf("spans_rcv_msg: got "); spans_print_msg(msg); } #endif diff --git a/sys/netproto/atm/spans/spans_print.c b/sys/netproto/atm/spans/spans_print.c index a4f237a973..b39ad7f7e6 100644 --- a/sys/netproto/atm/spans/spans_print.c +++ b/sys/netproto/atm/spans/spans_print.c @@ -24,7 +24,7 @@ * notice must be reproduced on all copies. * * @(#) $FreeBSD: src/sys/netatm/spans/spans_print.c,v 1.6 1999/08/28 00:48:50 peter Exp $ - * @(#) $DragonFly: src/sys/netproto/atm/spans/spans_print.c,v 1.7 2006/12/20 18:14:43 dillon Exp $ + * @(#) $DragonFly: src/sys/netproto/atm/spans/spans_print.c,v 1.8 2006/12/22 23:57:54 swildner Exp $ */ /* @@ -270,13 +270,13 @@ spans_state_str(spans_query_type *objp, char *dest, int len) static void spans_print_version(spans_version *objp) { - printf("%sspans_version 0x%x\n", spans_indent, *objp); + kprintf("%sspans_version 0x%x\n", spans_indent, *objp); } static void spans_print_vpvc(spans_vpvc *objp) { - printf("%sVP/VC %d/%d\n", spans_indent, + kprintf("%sVP/VC %d/%d\n", spans_indent, SPANS_EXTRACT_VPI(*objp), SPANS_EXTRACT_VCI(*objp)); } @@ -284,9 +284,9 @@ spans_print_vpvc(spans_vpvc *objp) static void spans_print_vpvc_pref(spans_vpvc_pref *objp) { - printf("%sspans_vpvc_pref\n", spans_indent); + kprintf("%sspans_vpvc_pref\n", spans_indent); inc_indent(); - printf("%s%s\n", spans_indent, + kprintf("%s%s\n", spans_indent, (objp->vpf_valid ? "Valid" : "Not valid")); spans_print_vpvc(&objp->vpf_vpvc); dec_indent(); @@ -298,19 +298,19 @@ spans_print_addr(spans_addr *objp) char addr_str[80]; strncpy(addr_str, spans_addr_print(objp), sizeof(addr_str)); - printf("%sspans_addr %s\n", spans_indent, addr_str); + kprintf("%sspans_addr %s\n", spans_indent, addr_str); } static void spans_print_sap(spans_sap *objp) { - printf("%sSAP %d\n", spans_indent, *objp); + kprintf("%sSAP %d\n", spans_indent, *objp); } static void spans_print_atm_conn(spans_atm_conn *objp) { - printf("%sspans_atm_conn\n", spans_indent); + kprintf("%sspans_atm_conn\n", spans_indent); inc_indent(); spans_print_addr(&objp->con_dst); spans_print_addr(&objp->con_src); @@ -322,11 +322,11 @@ spans_print_atm_conn(spans_atm_conn *objp) static void spans_print_resrc(spans_resrc *objp) { - printf("%sspans_resrc\n", spans_indent); + kprintf("%sspans_resrc\n", spans_indent); inc_indent(); - printf("%srsc_peak %d\n", spans_indent, objp->rsc_peak); - printf("%srsc_mean %d\n", spans_indent, objp->rsc_mean); - printf("%srsc_burst %d\n", spans_indent, objp->rsc_burst); + kprintf("%srsc_peak %d\n", spans_indent, objp->rsc_peak); + kprintf("%srsc_mean %d\n", spans_indent, objp->rsc_mean); + kprintf("%srsc_burst %d\n", spans_indent, objp->rsc_burst); dec_indent(); } @@ -336,7 +336,7 @@ spans_print_aal(spans_aal *objp) char aal_str[80]; spans_aal_str(objp, aal_str, sizeof(aal_str)); - printf("%sspans_aal %s\n", spans_indent, aal_str); + kprintf("%sspans_aal %s\n", spans_indent, aal_str); } static void @@ -345,7 +345,7 @@ spans_print_result(spans_result *objp) char result_str[80]; spans_result_str(objp, result_str, sizeof(result_str)); - printf("%sspans_result %s\n", spans_indent, result_str); + kprintf("%sspans_result %s\n", spans_indent, result_str); } static void @@ -354,15 +354,15 @@ spans_print_msgtype(spans_msgtype *objp) char msgtype_str[80]; spans_msgtype_str(objp, msgtype_str, sizeof(msgtype_str)); - printf("%sspans_msgtype %s\n", spans_indent, msgtype_str); + kprintf("%sspans_msgtype %s\n", spans_indent, msgtype_str); } static void spans_print_parm_stat_req(spans_parm_stat_req *objp) { - printf("%sspans_parm_stat_req\n", spans_indent); + kprintf("%sspans_parm_stat_req\n", spans_indent); inc_indent(); - printf("%sstreq_es_epoch %d\n", spans_indent, + kprintf("%sstreq_es_epoch %d\n", spans_indent, objp->streq_es_epoch); dec_indent(); } @@ -370,9 +370,9 @@ spans_print_parm_stat_req(spans_parm_stat_req *objp) static void spans_print_parm_stat_ind(spans_parm_stat_ind *objp) { - printf("%sspans_parm_stat_ind\n", spans_indent); + kprintf("%sspans_parm_stat_ind\n", spans_indent); inc_indent(); - printf("%sstind_sw_epoch %d\n", spans_indent, + kprintf("%sstind_sw_epoch %d\n", spans_indent, objp->stind_sw_epoch); spans_print_addr(&objp->stind_es_addr); spans_print_addr(&objp->stind_sw_addr); @@ -382,9 +382,9 @@ spans_print_parm_stat_ind(spans_parm_stat_ind *objp) static void spans_print_parm_stat_rsp(spans_parm_stat_rsp *objp) { - printf("%sspans_parm_stat_rsp\n", spans_indent); + kprintf("%sspans_parm_stat_rsp\n", spans_indent); inc_indent(); - printf("%sstrsp_es_epoch %d\n", spans_indent, + kprintf("%sstrsp_es_epoch %d\n", spans_indent, objp->strsp_es_epoch); spans_print_addr(&objp->strsp_es_addr); dec_indent(); @@ -393,7 +393,7 @@ spans_print_parm_stat_rsp(spans_parm_stat_rsp *objp) static void spans_print_parm_open_req(spans_parm_open_req *objp) { - printf("%sspans_parm_open_req\n", spans_indent); + kprintf("%sspans_parm_open_req\n", spans_indent); inc_indent(); spans_print_atm_conn(&objp->opreq_conn); spans_print_aal(&objp->opreq_aal); @@ -406,7 +406,7 @@ spans_print_parm_open_req(spans_parm_open_req *objp) static void spans_print_parm_open_ind(spans_parm_open_ind *objp) { - printf("%sspans_parm_open_ind\n", spans_indent); + kprintf("%sspans_parm_open_ind\n", spans_indent); inc_indent(); spans_print_atm_conn(&objp->opind_conn); spans_print_aal(&objp->opind_aal); @@ -419,7 +419,7 @@ spans_print_parm_open_ind(spans_parm_open_ind *objp) static void spans_print_parm_open_rsp(spans_parm_open_rsp *objp) { - printf("%sspans_parm_open_rsp\n", spans_indent); + kprintf("%sspans_parm_open_rsp\n", spans_indent); inc_indent(); spans_print_atm_conn(&objp->oprsp_conn); spans_print_result(&objp->oprsp_result); @@ -431,7 +431,7 @@ spans_print_parm_open_rsp(spans_parm_open_rsp *objp) static void spans_print_parm_open_cnf(spans_parm_open_cnf *objp) { - printf("%sspans_parm_open_cnf\n", spans_indent); + kprintf("%sspans_parm_open_cnf\n", spans_indent); inc_indent(); spans_print_atm_conn(&objp->opcnf_conn); spans_print_result(&objp->opcnf_result); @@ -443,7 +443,7 @@ spans_print_parm_open_cnf(spans_parm_open_cnf *objp) static void spans_print_parm_close_req(spans_parm_close_req *objp) { - printf("%sspans_parm_close_req\n", spans_indent); + kprintf("%sspans_parm_close_req\n", spans_indent); inc_indent(); spans_print_atm_conn(&objp->clreq_conn); dec_indent(); @@ -452,7 +452,7 @@ spans_print_parm_close_req(spans_parm_close_req *objp) static void spans_print_parm_close_ind(spans_parm_close_ind *objp) { - printf("%sspans_parm_close_ind\n", spans_indent); + kprintf("%sspans_parm_close_ind\n", spans_indent); inc_indent(); spans_print_atm_conn(&objp->clind_conn); dec_indent(); @@ -461,7 +461,7 @@ spans_print_parm_close_ind(spans_parm_close_ind *objp) static void spans_print_parm_close_rsp(spans_parm_close_rsp *objp) { - printf("%sspans_parm_close_rsp\n", spans_indent); + kprintf("%sspans_parm_close_rsp\n", spans_indent); inc_indent(); spans_print_atm_conn(&objp->clrsp_conn); spans_print_result(&objp->clrsp_result); @@ -471,7 +471,7 @@ spans_print_parm_close_rsp(spans_parm_close_rsp *objp) static void spans_print_parm_close_cnf(spans_parm_close_cnf *objp) { - printf("%sspans_parm_close_cnf\n", spans_indent); + kprintf("%sspans_parm_close_cnf\n", spans_indent); inc_indent(); spans_print_atm_conn(&objp->clcnf_conn); spans_print_result(&objp->clcnf_result); @@ -481,7 +481,7 @@ spans_print_parm_close_cnf(spans_parm_close_cnf *objp) static void spans_print_parm_rclose_req(spans_parm_rclose_req *objp) { - printf("%sspans_parm_rclose_req\n", spans_indent); + kprintf("%sspans_parm_rclose_req\n", spans_indent); inc_indent(); spans_print_atm_conn(&objp->rcreq_conn); dec_indent(); @@ -490,7 +490,7 @@ spans_print_parm_rclose_req(spans_parm_rclose_req *objp) static void spans_print_parm_rclose_ind(spans_parm_rclose_ind *objp) { - printf("%sspans_parm_rclose_ind\n", spans_indent); + kprintf("%sspans_parm_rclose_ind\n", spans_indent); inc_indent(); spans_print_atm_conn(&objp->rcind_conn); dec_indent(); @@ -499,7 +499,7 @@ spans_print_parm_rclose_ind(spans_parm_rclose_ind *objp) static void spans_print_parm_rclose_rsp(spans_parm_rclose_rsp *objp) { - printf("%sspans_parm_rclose_rsp\n", spans_indent); + kprintf("%sspans_parm_rclose_rsp\n", spans_indent); inc_indent(); spans_print_atm_conn(&objp->rcrsp_conn); spans_print_result(&objp->rcrsp_result); @@ -509,7 +509,7 @@ spans_print_parm_rclose_rsp(spans_parm_rclose_rsp *objp) static void spans_print_parm_rclose_cnf(spans_parm_rclose_cnf *objp) { - printf("%sspans_parm_rclose_cnf\n", spans_indent); + kprintf("%sspans_parm_rclose_cnf\n", spans_indent); inc_indent(); spans_print_atm_conn(&objp->rccnf_conn); spans_print_result(&objp->rccnf_result); @@ -519,7 +519,7 @@ spans_print_parm_rclose_cnf(spans_parm_rclose_cnf *objp) static void spans_print_parm_multi_req(spans_parm_multi_req *objp) { - printf("%sspans_parm_multi_req\n", spans_indent); + kprintf("%sspans_parm_multi_req\n", spans_indent); inc_indent(); spans_print_atm_conn(&objp->mureq_conn); spans_print_aal(&objp->mureq_aal); @@ -532,7 +532,7 @@ spans_print_parm_multi_req(spans_parm_multi_req *objp) static void spans_print_parm_multi_ind(spans_parm_multi_ind *objp) { - printf("%sspans_parm_multi_ind\n", spans_indent); + kprintf("%sspans_parm_multi_ind\n", spans_indent); inc_indent(); spans_print_atm_conn(&objp->muind_conn); spans_print_aal(&objp->muind_aal); @@ -545,7 +545,7 @@ spans_print_parm_multi_ind(spans_parm_multi_ind *objp) static void spans_print_parm_multi_rsp(spans_parm_multi_rsp *objp) { - printf("%sspans_parm_multi_rsp\n", spans_indent); + kprintf("%sspans_parm_multi_rsp\n", spans_indent); inc_indent(); spans_print_atm_conn(&objp->mursp_conn); spans_print_result(&objp->mursp_result); @@ -557,7 +557,7 @@ spans_print_parm_multi_rsp(spans_parm_multi_rsp *objp) static void spans_print_parm_multi_cnf(spans_parm_multi_cnf *objp) { - printf("%sspans_parm_multi_cnf\n", spans_indent); + kprintf("%sspans_parm_multi_cnf\n", spans_indent); inc_indent(); spans_print_atm_conn(&objp->mucnf_conn); spans_print_result(&objp->mucnf_result); @@ -569,7 +569,7 @@ spans_print_parm_multi_cnf(spans_parm_multi_cnf *objp) static void spans_print_parm_add_req(spans_parm_add_req *objp) { - printf("%sspans_parm_add_req\n", spans_indent); + kprintf("%sspans_parm_add_req\n", spans_indent); inc_indent(); spans_print_atm_conn(&objp->adreq_desconn); spans_print_atm_conn(&objp->adreq_xstconn); @@ -579,7 +579,7 @@ spans_print_parm_add_req(spans_parm_add_req *objp) static void spans_print_parm_add_ind(spans_parm_add_ind *objp) { - printf("%sspans_parm_add_ind\n", spans_indent); + kprintf("%sspans_parm_add_ind\n", spans_indent); inc_indent(); spans_print_atm_conn(&objp->adind_desconn); spans_print_atm_conn(&objp->adind_xstconn); @@ -589,7 +589,7 @@ spans_print_parm_add_ind(spans_parm_add_ind *objp) static void spans_print_parm_add_rsp(spans_parm_add_rsp *objp) { - printf("%sspans_parm_add_rsp\n", spans_indent); + kprintf("%sspans_parm_add_rsp\n", spans_indent); inc_indent(); spans_print_atm_conn(&objp->adrsp_conn); spans_print_result(&objp->adrsp_result); @@ -600,7 +600,7 @@ spans_print_parm_add_rsp(spans_parm_add_rsp *objp) static void spans_print_parm_add_cnf(spans_parm_add_cnf *objp) { - printf("%sspans_parm_add_cnf\n", spans_indent); + kprintf("%sspans_parm_add_cnf\n", spans_indent); inc_indent(); spans_print_atm_conn(&objp->adcnf_conn); spans_print_result(&objp->adcnf_result); @@ -611,7 +611,7 @@ spans_print_parm_add_cnf(spans_parm_add_cnf *objp) static void spans_print_parm_join_req(spans_parm_join_req *objp) { - printf("%sspans_parm_join_req\n", spans_indent); + kprintf("%sspans_parm_join_req\n", spans_indent); inc_indent(); spans_print_addr(&objp->jnreq_addr); dec_indent(); @@ -620,7 +620,7 @@ spans_print_parm_join_req(spans_parm_join_req *objp) static void spans_print_parm_join_cnf(spans_parm_join_cnf *objp) { - printf("%sspans_print_parm_join_cnf\n", spans_indent); + kprintf("%sspans_print_parm_join_cnf\n", spans_indent); inc_indent(); spans_print_addr(&objp->jncnf_addr); spans_print_result(&objp->jncnf_result); @@ -630,7 +630,7 @@ spans_print_parm_join_cnf(spans_parm_join_cnf *objp) static void spans_print_parm_leave_req(spans_parm_leave_req *objp) { - printf("%sspans_print_parm_leave_req\n", spans_indent); + kprintf("%sspans_print_parm_leave_req\n", spans_indent); inc_indent(); spans_print_addr(&objp->lvreq_addr); dec_indent(); @@ -639,7 +639,7 @@ spans_print_parm_leave_req(spans_parm_leave_req *objp) static void spans_print_parm_leave_cnf(spans_parm_leave_cnf *objp) { - printf("%sspans_parm_leave_cnf\n", spans_indent); + kprintf("%sspans_parm_leave_cnf\n", spans_indent); inc_indent(); spans_print_addr(&objp->lvcnf_addr); spans_print_result(&objp->lvcnf_result); @@ -649,10 +649,10 @@ spans_print_parm_leave_cnf(spans_parm_leave_cnf *objp) static void spans_print_parm_vcir_ind(spans_parm_vcir_ind *objp) { - printf("%sspans_parm_vcir_ind\n", spans_indent); + kprintf("%sspans_parm_vcir_ind\n", spans_indent); inc_indent(); - printf("%svrind_min %d\n", spans_indent, objp->vrind_min); - printf("%svrind_max %d\n", spans_indent, objp->vrind_max); + kprintf("%svrind_min %d\n", spans_indent, objp->vrind_min); + kprintf("%svrind_max %d\n", spans_indent, objp->vrind_max); dec_indent(); } @@ -661,12 +661,12 @@ spans_print_parm_query_req(spans_parm_query_req *objp) { char query_type_str[80]; - printf("%sspans_parm_query_req\n", spans_indent); + kprintf("%sspans_parm_query_req\n", spans_indent); inc_indent(); spans_print_atm_conn(&objp->qyreq_conn); spans_query_type_str(&objp->qyreq_type, query_type_str, sizeof(query_type_str)); - printf("%sqyreq_type %s\n", spans_indent, query_type_str); + kprintf("%sqyreq_type %s\n", spans_indent, query_type_str); dec_indent(); } @@ -675,16 +675,16 @@ spans_print_parm_query_rsp(spans_parm_query_rsp *objp) { char query_type_str[80], state_type_str[80]; - printf("%sspans_parm_query_rsp\n", spans_indent); + kprintf("%sspans_parm_query_rsp\n", spans_indent); inc_indent(); spans_print_atm_conn(&objp->qyrsp_conn); spans_query_type_str(&objp->qyrsp_type, query_type_str, sizeof(query_type_str)); - printf("%sqyrsp_type %s\n", spans_indent, query_type_str); + kprintf("%sqyrsp_type %s\n", spans_indent, query_type_str); spans_state_str(&objp->qyrsp_state, state_type_str, sizeof(state_type_str)); - printf("%sqyrsp_state %s\n", spans_indent, state_type_str); - printf("%sqyrsp_data 0x%x\n", spans_indent, + kprintf("%sqyrsp_state %s\n", spans_indent, state_type_str); + kprintf("%sqyrsp_data 0x%x\n", spans_indent, objp->qyrsp_data); dec_indent(); } @@ -692,7 +692,7 @@ spans_print_parm_query_rsp(spans_parm_query_rsp *objp) static void spans_print_msgbody(spans_msgbody *objp) { - printf("%sspans_msgbody\n", spans_indent); + kprintf("%sspans_msgbody\n", spans_indent); inc_indent(); spans_print_msgtype(&objp->mb_type); switch (objp->mb_type) { @@ -794,7 +794,7 @@ void spans_print_msg(spans_msg *objp) { spans_indent = INIT_INDENT; - printf("%sspans_msg\n", spans_indent); + kprintf("%sspans_msg\n", spans_indent); inc_indent(); spans_print_version(&objp->sm_vers); spans_print_msgbody(&objp->sm_body); @@ -824,11 +824,11 @@ spans_print_msgbody(spans_msgbody *objp) spans_parm_rclose_cnf *rccnf_p; spans_msgtype_str(&objp->mb_type, msgtype_str, sizeof(msgtype_str)); - printf("%s: ", msgtype_str); + kprintf("%s: ", msgtype_str); switch (objp->mb_type) { case SPANS_STAT_REQ: streq_p = &objp->spans_msgbody_u.mb_stat_req; - printf("es_epoch=0x%lx", streq_p->streq_es_epoch); + kprintf("es_epoch=0x%lx", streq_p->streq_es_epoch); break; case SPANS_STAT_IND: stind_p = &objp->spans_msgbody_u.mb_stat_ind; @@ -836,7 +836,7 @@ spans_print_msgbody(spans_msgbody *objp) sizeof(daddr)); strncpy(saddr, spans_addr_print(&stind_p->stind_sw_addr), sizeof(saddr)); - printf("sw_epoch=0x%lx, es_addr=%s, sw_addr=0x%s", + kprintf("sw_epoch=0x%lx, es_addr=%s, sw_addr=0x%s", stind_p->stind_sw_epoch, daddr, saddr); break; @@ -844,7 +844,7 @@ spans_print_msgbody(spans_msgbody *objp) strsp_p = &objp->spans_msgbody_u.mb_stat_rsp; strncpy(daddr, spans_addr_print(&strsp_p->strsp_es_addr), sizeof(daddr)); - printf("es_epoch=0x%lx, es_addr=%s", + kprintf("es_epoch=0x%lx, es_addr=%s", strsp_p->strsp_es_epoch, daddr); break; case SPANS_OPEN_REQ: @@ -853,13 +853,13 @@ spans_print_msgbody(spans_msgbody *objp) sizeof(daddr)); strncpy(saddr, spans_addr_print(&opreq_p->opreq_conn.con_src), sizeof(saddr)); - printf("daddr=%s, saddr=%s, dsap=%d, ssap=%d, aal=%d", + kprintf("daddr=%s, saddr=%s, dsap=%d, ssap=%d, aal=%d", daddr, saddr, opreq_p->opreq_conn.con_dsap, opreq_p->opreq_conn.con_ssap, opreq_p->opreq_aal); if (opreq_p->opreq_vpvc.vpf_valid) - printf(", vp.vc=%d.%d", + kprintf(", vp.vc=%d.%d", SPANS_EXTRACT_VPI(opreq_p->opreq_vpvc.vpf_vpvc), SPANS_EXTRACT_VCI(opreq_p->opreq_vpvc.vpf_vpvc)); break; @@ -869,13 +869,13 @@ spans_print_msgbody(spans_msgbody *objp) sizeof(daddr)); strncpy(saddr, spans_addr_print(&opind_p->opind_conn.con_src), sizeof(saddr)); - printf("daddr=%s, saddr=%s, dsap=%d, ssap=%d, aal=%d", + kprintf("daddr=%s, saddr=%s, dsap=%d, ssap=%d, aal=%d", daddr, saddr, opind_p->opind_conn.con_dsap, opind_p->opind_conn.con_ssap, opind_p->opind_aal); if (opind_p->opind_vpvc.vpf_valid) - printf(", vp.vc=%d.%d", + kprintf(", vp.vc=%d.%d", SPANS_EXTRACT_VPI(opind_p->opind_vpvc.vpf_vpvc), SPANS_EXTRACT_VCI(opind_p->opind_vpvc.vpf_vpvc)); break; @@ -887,7 +887,7 @@ spans_print_msgbody(spans_msgbody *objp) sizeof(saddr)); spans_result_str(&oprsp_p->oprsp_result, result_str, sizeof(result_str)); - printf("result=%s, daddr=%s, saddr=%s, dsap=%d, ssap=%d, vp.vc=%d.%d", + kprintf("result=%s, daddr=%s, saddr=%s, dsap=%d, ssap=%d, vp.vc=%d.%d", result_str, daddr, saddr, oprsp_p->oprsp_conn.con_dsap, oprsp_p->oprsp_conn.con_ssap, @@ -902,7 +902,7 @@ spans_print_msgbody(spans_msgbody *objp) sizeof(saddr)); spans_result_str(&opcnf_p->opcnf_result, result_str, sizeof(result_str)); - printf("result=%s, daddr=%s, saddr=%s, dsap=%d, ssap=%d, vp.vc=%d.%d", + kprintf("result=%s, daddr=%s, saddr=%s, dsap=%d, ssap=%d, vp.vc=%d.%d", result_str, daddr, saddr, opcnf_p->opcnf_conn.con_dsap, opcnf_p->opcnf_conn.con_ssap, @@ -915,7 +915,7 @@ spans_print_msgbody(spans_msgbody *objp) sizeof(daddr)); strncpy(saddr, spans_addr_print(&clreq_p->clreq_conn.con_src), sizeof(saddr)); - printf("daddr=%s, saddr=%s, dsap=%d, ssap=%d", + kprintf("daddr=%s, saddr=%s, dsap=%d, ssap=%d", daddr, saddr, clreq_p->clreq_conn.con_dsap, clreq_p->clreq_conn.con_ssap); @@ -926,7 +926,7 @@ spans_print_msgbody(spans_msgbody *objp) sizeof(daddr)); strncpy(saddr, spans_addr_print(&clind_p->clind_conn.con_src), sizeof(saddr)); - printf("daddr=%s, saddr=%s, dsap=%d, ssap=%d", + kprintf("daddr=%s, saddr=%s, dsap=%d, ssap=%d", daddr, saddr, clind_p->clind_conn.con_dsap, clind_p->clind_conn.con_ssap); @@ -939,7 +939,7 @@ spans_print_msgbody(spans_msgbody *objp) sizeof(saddr)); spans_result_str(&clrsp_p->clrsp_result, result_str, sizeof(result_str)); - printf("result=%s, daddr=%s, saddr=%s, dsap=%d, ssap=%d", + kprintf("result=%s, daddr=%s, saddr=%s, dsap=%d, ssap=%d", result_str, daddr, saddr, clrsp_p->clrsp_conn.con_dsap, clrsp_p->clrsp_conn.con_ssap); @@ -952,7 +952,7 @@ spans_print_msgbody(spans_msgbody *objp) sizeof(saddr)); spans_result_str(&clcnf_p->clcnf_result, result_str, sizeof(result_str)); - printf("result=%s, daddr=%s, saddr=%s, dsap=%d, ssap=%d", + kprintf("result=%s, daddr=%s, saddr=%s, dsap=%d, ssap=%d", result_str, daddr, saddr, clcnf_p->clcnf_conn.con_dsap, clcnf_p->clcnf_conn.con_ssap); @@ -963,7 +963,7 @@ spans_print_msgbody(spans_msgbody *objp) sizeof(daddr)); strncpy(saddr, spans_addr_print(&rcreq_p->rcreq_conn.con_src), sizeof(saddr)); - printf("daddr=%s, saddr=%s, dsap=%d, ssap=%d", + kprintf("daddr=%s, saddr=%s, dsap=%d, ssap=%d", daddr, saddr, rcreq_p->rcreq_conn.con_dsap, rcreq_p->rcreq_conn.con_ssap); @@ -974,7 +974,7 @@ spans_print_msgbody(spans_msgbody *objp) sizeof(daddr)); strncpy(saddr, spans_addr_print(&rcind_p->rcind_conn.con_src), sizeof(saddr)); - printf("daddr=%s, saddr=%s, dsap=%d, ssap=%d", + kprintf("daddr=%s, saddr=%s, dsap=%d, ssap=%d", daddr, saddr, rcind_p->rcind_conn.con_dsap, rcind_p->rcind_conn.con_ssap); @@ -987,7 +987,7 @@ spans_print_msgbody(spans_msgbody *objp) sizeof(saddr)); spans_result_str(&rcrsp_p->rcrsp_result, result_str, sizeof(result_str)); - printf("result=%s, daddr=%s, saddr=%s, dsap=%d, ssap=%d", + kprintf("result=%s, daddr=%s, saddr=%s, dsap=%d, ssap=%d", result_str, daddr, saddr, rcrsp_p->rcrsp_conn.con_dsap, rcrsp_p->rcrsp_conn.con_ssap); @@ -1000,7 +1000,7 @@ spans_print_msgbody(spans_msgbody *objp) sizeof(saddr)); spans_result_str(&rccnf_p->rccnf_result, result_str, sizeof(result_str)); - printf("result=%s, daddr=%s, saddr=%s, dsap=%d, ssap=%d", + kprintf("result=%s, daddr=%s, saddr=%s, dsap=%d, ssap=%d", result_str, daddr, saddr, rccnf_p->rccnf_conn.con_dsap, rccnf_p->rccnf_conn.con_ssap); @@ -1008,7 +1008,7 @@ spans_print_msgbody(spans_msgbody *objp) default: break; } - printf("\n"); + kprintf("\n"); } void diff --git a/sys/netproto/atm/spans/spans_util.c b/sys/netproto/atm/spans/spans_util.c index 489c795c9b..2017185360 100644 --- a/sys/netproto/atm/spans/spans_util.c +++ b/sys/netproto/atm/spans/spans_util.c @@ -24,7 +24,7 @@ * notice must be reproduced on all copies. * * @(#) $FreeBSD: src/sys/netatm/spans/spans_util.c,v 1.5 1999/08/29 10:28:10 bde Exp $ - * @(#) $DragonFly: src/sys/netproto/atm/spans/spans_util.c,v 1.6 2006/12/20 18:14:43 dillon Exp $ + * @(#) $DragonFly: src/sys/netproto/atm/spans/spans_util.c,v 1.7 2006/12/22 23:57:54 swildner Exp $ */ /* @@ -437,15 +437,15 @@ spans_dump_buffer(KBuffer *m) int i; caddr_t cp; - printf("spans_dump_buffer:\n"); + kprintf("spans_dump_buffer:\n"); while (m) { KB_DATASTART(m, cp, caddr_t); for (i = 0; i < KB_LEN(m); i++) { if (i == 0) - printf(" bfr=%p: ", m); - printf("%x ", (u_char)*cp++); + kprintf(" bfr=%p: ", m); + kprintf("%x ", (u_char)*cp++); } - printf("\n"); + kprintf("\n"); m = KB_NEXT(m); } } diff --git a/sys/netproto/atm/uni/unisig_print.c b/sys/netproto/atm/uni/unisig_print.c index d2c56765e5..6bee38be7e 100644 --- a/sys/netproto/atm/uni/unisig_print.c +++ b/sys/netproto/atm/uni/unisig_print.c @@ -24,7 +24,7 @@ * notice must be reproduced on all copies. * * @(#) $FreeBSD: src/sys/netatm/uni/unisig_print.c,v 1.4 2000/01/17 20:49:57 mks Exp $ - * @(#) $DragonFly: src/sys/netproto/atm/uni/unisig_print.c,v 1.6 2006/01/14 13:36:39 swildner Exp $ + * @(#) $DragonFly: src/sys/netproto/atm/uni/unisig_print.c,v 1.7 2006/12/22 23:57:54 swildner Exp $ */ /* @@ -171,7 +171,7 @@ usp_print_atm_addr(Atm_addr *p) char *cp; cp = unisig_addr_print(p); - printf("%s", cp); + kprintf("%s", cp); } @@ -195,18 +195,18 @@ usp_print_msg(struct unisig_msg *msg, int dir) name = find_type(msg_types, msg->msg_type); switch (dir) { case UNISIG_MSG_IN: - printf("Received "); + kprintf("Received "); break; case UNISIG_MSG_OUT: - printf("Sent "); + kprintf("Sent "); break; } - printf("message: %s (%x)\n", name, msg->msg_type); - printf(" Call reference: 0x%x\n", msg->msg_call_ref); + kprintf("message: %s (%x)\n", name, msg->msg_type); + kprintf(" Call reference: 0x%x\n", msg->msg_call_ref); #ifdef LONG_PRINT - printf(" Message type flag: 0x%x\n", msg->msg_type_flag); - printf(" Message type action: 0x%x\n", msg->msg_type_action); - printf(" Message length: %d\n", msg->msg_length); + kprintf(" Message type flag: 0x%x\n", msg->msg_type_flag); + kprintf(" Message type action: 0x%x\n", msg->msg_type_action); + kprintf(" Message length: %d\n", msg->msg_length); for (i=0; imsg_ie_vec[i]; while (ie) { @@ -227,7 +227,7 @@ usp_print_msg(struct unisig_msg *msg, int dir) ie->ie_ident == UNI_IE_CLST) { usp_print_ie(ie); } else { - printf(" Information element: %s (0x%x)\n", + kprintf(" Information element: %s (0x%x)\n", name, ie->ie_ident); } ie = inxt; @@ -254,15 +254,15 @@ usp_print_ie(struct ie_generic *ie) while (ie) { name = find_type(ie_types, ie->ie_ident); - printf(" Information element: %s (0x%x)\n", + kprintf(" Information element: %s (0x%x)\n", name, ie->ie_ident); #ifdef LONG_PRINT - printf(" Coding: 0x%x\n", + kprintf(" Coding: 0x%x\n", ie->ie_coding); - printf(" Flag: 0x%x\n", ie->ie_flag); - printf(" Action: 0x%x\n", + kprintf(" Flag: 0x%x\n", ie->ie_flag); + kprintf(" Action: 0x%x\n", ie->ie_action); - printf(" Length: %d\n", ie->ie_length); + kprintf(" Length: %d\n", ie->ie_length); #endif switch (ie->ie_ident) { @@ -348,48 +348,48 @@ usp_print_ie(struct ie_generic *ie) static void usp_print_ie_aalp(struct ie_generic *ie) { - printf(" AAL type: %d\n", ie->ie_aalp_aal_type); + kprintf(" AAL type: %d\n", ie->ie_aalp_aal_type); switch(ie->ie_aalp_aal_type) { case UNI_IE_AALP_AT_AAL1: - printf(" Subtype: 0x%x\n", + kprintf(" Subtype: 0x%x\n", ie->ie_aalp_1_subtype); - printf(" CBR rate: 0x%x\n", + kprintf(" CBR rate: 0x%x\n", ie->ie_aalp_1_cbr_rate); - printf(" Multiplier: 0x%x\n", + kprintf(" Multiplier: 0x%x\n", ie->ie_aalp_1_multiplier); - printf(" Clock rcvry: 0x%x\n", + kprintf(" Clock rcvry: 0x%x\n", ie->ie_aalp_1_clock_recovery); - printf(" Err corr: 0x%x\n", + kprintf(" Err corr: 0x%x\n", ie->ie_aalp_1_error_correction); - printf(" Struct data: 0x%x\n", + kprintf(" Struct data: 0x%x\n", ie->ie_aalp_1_struct_data_tran); - printf(" Partial cells: 0x%x\n", + kprintf(" Partial cells: 0x%x\n", ie->ie_aalp_1_partial_cells); break; case UNI_IE_AALP_AT_AAL3: - printf(" Fwd max SDU: %d\n", + kprintf(" Fwd max SDU: %d\n", ie->ie_aalp_4_fwd_max_sdu); - printf(" Bkwd max SDU: %d\n", + kprintf(" Bkwd max SDU: %d\n", ie->ie_aalp_4_bkwd_max_sdu); - printf(" MID range: %d\n", + kprintf(" MID range: %d\n", ie->ie_aalp_4_mid_range); - printf(" Mode: 0x%x\n", + kprintf(" Mode: 0x%x\n", ie->ie_aalp_4_mode); - printf(" SSCS type: 0x%x\n", + kprintf(" SSCS type: 0x%x\n", ie->ie_aalp_4_sscs_type); break; case UNI_IE_AALP_AT_AAL5: - printf(" Fwd max SDU: %d\n", + kprintf(" Fwd max SDU: %d\n", ie->ie_aalp_5_fwd_max_sdu); - printf(" Bkwd max SDU: %d\n", + kprintf(" Bkwd max SDU: %d\n", ie->ie_aalp_5_bkwd_max_sdu); - printf(" Mode: 0x%x\n", + kprintf(" Mode: 0x%x\n", ie->ie_aalp_5_mode); - printf(" SSCS type: 0x%x\n", + kprintf(" SSCS type: 0x%x\n", ie->ie_aalp_5_sscs_type); break; case UNI_IE_AALP_AT_AALU: - printf(" User info: 0x%x %x %x %x\n", + kprintf(" User info: 0x%x %x %x %x\n", ie->ie_aalp_user_info[0], ie->ie_aalp_user_info[1], ie->ie_aalp_user_info[2], @@ -412,21 +412,21 @@ usp_print_ie_aalp(struct ie_generic *ie) static void usp_print_ie_clrt(struct ie_generic *ie) { - printf(" Forward peak: %d\n", ie->ie_clrt_fwd_peak); - printf(" Backward peak: %d\n", ie->ie_clrt_bkwd_peak); - printf(" Fwd peak 01: %d\n", ie->ie_clrt_fwd_peak_01); - printf(" Bkwd peak 01: %d\n", ie->ie_clrt_bkwd_peak_01); - printf(" Fwd sust: %d\n", ie->ie_clrt_fwd_sust); - printf(" Bkwd sust: %d\n", ie->ie_clrt_bkwd_sust); - printf(" Fwd sust 01: %d\n", ie->ie_clrt_fwd_sust_01); - printf(" Bkwd sust 01: %d\n", ie->ie_clrt_bkwd_sust_01); - printf(" Fwd burst: %d\n", ie->ie_clrt_fwd_burst); - printf(" Bkwd burst: %d\n", ie->ie_clrt_bkwd_burst); - printf(" Fwd burst 01: %d\n", ie->ie_clrt_fwd_burst_01); - printf(" Bkwd burst 01: %d\n", + kprintf(" Forward peak: %d\n", ie->ie_clrt_fwd_peak); + kprintf(" Backward peak: %d\n", ie->ie_clrt_bkwd_peak); + kprintf(" Fwd peak 01: %d\n", ie->ie_clrt_fwd_peak_01); + kprintf(" Bkwd peak 01: %d\n", ie->ie_clrt_bkwd_peak_01); + kprintf(" Fwd sust: %d\n", ie->ie_clrt_fwd_sust); + kprintf(" Bkwd sust: %d\n", ie->ie_clrt_bkwd_sust); + kprintf(" Fwd sust 01: %d\n", ie->ie_clrt_fwd_sust_01); + kprintf(" Bkwd sust 01: %d\n", ie->ie_clrt_bkwd_sust_01); + kprintf(" Fwd burst: %d\n", ie->ie_clrt_fwd_burst); + kprintf(" Bkwd burst: %d\n", ie->ie_clrt_bkwd_burst); + kprintf(" Fwd burst 01: %d\n", ie->ie_clrt_fwd_burst_01); + kprintf(" Bkwd burst 01: %d\n", ie->ie_clrt_bkwd_burst_01); - printf(" Best effort: %d\n", ie->ie_clrt_best_effort); - printf(" TM optons: 0x%x\n", + kprintf(" Best effort: %d\n", ie->ie_clrt_best_effort); + kprintf(" TM optons: 0x%x\n", ie->ie_clrt_tm_options); } @@ -444,14 +444,14 @@ usp_print_ie_clrt(struct ie_generic *ie) static void usp_print_ie_bbcp(struct ie_generic *ie) { - printf(" Bearer class: 0x%x\n", + kprintf(" Bearer class: 0x%x\n", ie->ie_bbcp_bearer_class); - printf(" Traffic type: 0x%x\n", + kprintf(" Traffic type: 0x%x\n", ie->ie_bbcp_traffic_type); - printf(" Timing req: 0x%x\n", + kprintf(" Timing req: 0x%x\n", ie->ie_bbcp_timing_req); - printf(" Clipping: 0x%x\n", ie->ie_bbcp_clipping); - printf(" Conn config: 0x%x\n", + kprintf(" Clipping: 0x%x\n", ie->ie_bbcp_clipping); + kprintf(" Conn config: 0x%x\n", ie->ie_bbcp_conn_config); } @@ -471,12 +471,12 @@ usp_print_ie_bhli(struct ie_generic *ie) { int i; - printf(" Type: 0x%x\n", ie->ie_bhli_type); - printf(" HL info: 0x"); + kprintf(" Type: 0x%x\n", ie->ie_bhli_type); + kprintf(" HL info: 0x"); for (i=0; iie_length-1; i++) { - printf("%x ", ie->ie_bhli_info[i]); + kprintf("%x ", ie->ie_bhli_info[i]); } - printf("\n"); + kprintf("\n"); } @@ -493,31 +493,31 @@ usp_print_ie_bhli(struct ie_generic *ie) static void usp_print_ie_blli(struct ie_generic *ie) { - printf(" Layer 1 ID: 0x%x\n", ie->ie_blli_l1_id); - printf(" Layer 2 ID: 0x%x\n", ie->ie_blli_l2_id); - printf(" Layer 2 mode: 0x%x\n", ie->ie_blli_l2_mode); - printf(" Layer 2 Q.933: 0x%x\n", + kprintf(" Layer 1 ID: 0x%x\n", ie->ie_blli_l1_id); + kprintf(" Layer 2 ID: 0x%x\n", ie->ie_blli_l2_id); + kprintf(" Layer 2 mode: 0x%x\n", ie->ie_blli_l2_mode); + kprintf(" Layer 2 Q.933: 0x%x\n", ie->ie_blli_l2_q933_use); - printf(" Layer 2 win: 0x%x\n", + kprintf(" Layer 2 win: 0x%x\n", ie->ie_blli_l2_window); - printf(" Layer 2 user: 0x%x\n", + kprintf(" Layer 2 user: 0x%x\n", ie->ie_blli_l2_user_proto); - printf(" Layer 3 ID: 0x%x\n", ie->ie_blli_l3_id); - printf(" Layer 3 mode: 0x%x\n", ie->ie_blli_l3_mode); - printf(" Layer 3 pkt: 0x%x\n", + kprintf(" Layer 3 ID: 0x%x\n", ie->ie_blli_l3_id); + kprintf(" Layer 3 mode: 0x%x\n", ie->ie_blli_l3_mode); + kprintf(" Layer 3 pkt: 0x%x\n", ie->ie_blli_l3_packet_size); - printf(" Layer 3 win: 0x%x\n", + kprintf(" Layer 3 win: 0x%x\n", ie->ie_blli_l3_window); - printf(" Layer 3 user: 0x%x\n", + kprintf(" Layer 3 user: 0x%x\n", ie->ie_blli_l3_user_proto); - printf(" Layer 3 IPI: 0x%x\n", ie->ie_blli_l3_ipi); - printf(" Layer 3 SNAP: 0x%x\n", + kprintf(" Layer 3 IPI: 0x%x\n", ie->ie_blli_l3_ipi); + kprintf(" Layer 3 SNAP: 0x%x\n", ie->ie_blli_l3_snap_id); - printf(" Layer 3 OUI: 0x%x %x %x\n", + kprintf(" Layer 3 OUI: 0x%x %x %x\n", ie->ie_blli_l3_oui[0], ie->ie_blli_l3_oui[1], ie->ie_blli_l3_oui[2]); - printf(" Layer 3 PID: 0x%x %x\n", + kprintf(" Layer 3 PID: 0x%x %x\n", ie->ie_blli_l3_pid[0], ie->ie_blli_l3_pid[1]); } @@ -536,7 +536,7 @@ usp_print_ie_blli(struct ie_generic *ie) static void usp_print_ie_clst(struct ie_generic *ie) { - printf(" Call state: %d\n", + kprintf(" Call state: %d\n", ie->ie_clst_state); } @@ -554,9 +554,9 @@ usp_print_ie_clst(struct ie_generic *ie) static void usp_print_ie_cdad(struct ie_generic *ie) { - printf(" ATM addr: "); + kprintf(" ATM addr: "); usp_print_atm_addr(&ie->ie_cdad_addr); - printf("\n"); + kprintf("\n"); } @@ -573,9 +573,9 @@ usp_print_ie_cdad(struct ie_generic *ie) static void usp_print_ie_cdsa(struct ie_generic *ie) { - printf(" ATM subaddr: "); + kprintf(" ATM subaddr: "); usp_print_atm_addr(&ie->ie_cdsa_addr); - printf("\n"); + kprintf("\n"); } @@ -592,9 +592,9 @@ usp_print_ie_cdsa(struct ie_generic *ie) static void usp_print_ie_cgad(struct ie_generic *ie) { - printf(" ATM addr: "); + kprintf(" ATM addr: "); usp_print_atm_addr(&ie->ie_cgad_addr); - printf("\n"); + kprintf("\n"); } @@ -611,9 +611,9 @@ usp_print_ie_cgad(struct ie_generic *ie) static void usp_print_ie_cgsa(struct ie_generic *ie) { - printf(" ATM subaddr: "); + kprintf(" ATM subaddr: "); usp_print_atm_addr(&ie->ie_cgsa_addr); - printf("\n"); + kprintf("\n"); } @@ -632,30 +632,30 @@ usp_print_ie_caus(struct ie_generic *ie) { int i; - printf(" Location: %d\n", ie->ie_caus_loc); - printf(" Cause: %d\n", ie->ie_caus_cause); + kprintf(" Location: %d\n", ie->ie_caus_loc); + kprintf(" Cause: %d\n", ie->ie_caus_cause); switch(ie->ie_caus_cause) { case UNI_IE_CAUS_IECONTENT: - printf(" Flagged IEs: "); + kprintf(" Flagged IEs: "); for (i=0; ie->ie_caus_diagnostic[i]; i++) { - printf("0x%x ", ie->ie_caus_diagnostic[i]); + kprintf("0x%x ", ie->ie_caus_diagnostic[i]); } - printf("\n"); + kprintf("\n"); break; case UNI_IE_CAUS_TIMER: - printf(" Timer ID: %c%c%c\n", + kprintf(" Timer ID: %c%c%c\n", ie->ie_caus_diagnostic[0], ie->ie_caus_diagnostic[1], ie->ie_caus_diagnostic[2]); break; default: - printf(" Diag length: %d\n", + kprintf(" Diag length: %d\n", ie->ie_caus_diag_len); - printf(" Diagnostic: "); + kprintf(" Diagnostic: "); for (i=0; iie_caus_diag_len; i++) { - printf("0x%x ", ie->ie_caus_diagnostic[i]); + kprintf("0x%x ", ie->ie_caus_diagnostic[i]); } - printf("\n"); + kprintf("\n"); } } @@ -673,11 +673,11 @@ usp_print_ie_caus(struct ie_generic *ie) static void usp_print_ie_cnid(struct ie_generic *ie) { - printf(" VP assoc sig: 0x%x\n", ie->ie_cnid_vp_sig); - printf(" Pref/excl: 0x%x\n", + kprintf(" VP assoc sig: 0x%x\n", ie->ie_cnid_vp_sig); + kprintf(" Pref/excl: 0x%x\n", ie->ie_cnid_pref_excl); - printf(" VPCI: %d\n", ie->ie_cnid_vpci); - printf(" VCI: %d\n", ie->ie_cnid_vci); + kprintf(" VPCI: %d\n", ie->ie_cnid_vpci); + kprintf(" VCI: %d\n", ie->ie_cnid_vci); } @@ -694,9 +694,9 @@ usp_print_ie_cnid(struct ie_generic *ie) static void usp_print_ie_qosp(struct ie_generic *ie) { - printf(" QoS fwd: 0x%x\n", + kprintf(" QoS fwd: 0x%x\n", ie->ie_qosp_fwd_class); - printf(" QoS bkwd: 0x%x\n", + kprintf(" QoS bkwd: 0x%x\n", ie->ie_qosp_bkwd_class); } @@ -714,7 +714,7 @@ usp_print_ie_qosp(struct ie_generic *ie) static void usp_print_ie_brpi(struct ie_generic *ie) { - printf(" Indicator: 0x%x\n", ie->ie_brpi_ind); + kprintf(" Indicator: 0x%x\n", ie->ie_brpi_ind); } @@ -731,7 +731,7 @@ usp_print_ie_brpi(struct ie_generic *ie) static void usp_print_ie_rsti(struct ie_generic *ie) { - printf(" Class: 0x%x\n", ie->ie_rsti_class); + kprintf(" Class: 0x%x\n", ie->ie_rsti_class); } @@ -780,7 +780,7 @@ usp_print_ie_bnsh(struct ie_generic *ie) static void usp_print_ie_bsdc(struct ie_generic *ie) { - printf(" Indication: 0x%x\n", ie->ie_bsdc_ind); + kprintf(" Indication: 0x%x\n", ie->ie_bsdc_ind); } @@ -819,9 +819,9 @@ usp_print_ie_trnt(struct ie_generic *ie) static void usp_print_ie_eprf(struct ie_generic *ie) { - printf(" Ref type: 0x%x\n", + kprintf(" Ref type: 0x%x\n", ie->ie_eprf_type); - printf(" Endpt ref: 0x%x\n", + kprintf(" Endpt ref: 0x%x\n", ie->ie_eprf_id); } @@ -839,6 +839,6 @@ usp_print_ie_eprf(struct ie_generic *ie) static void usp_print_ie_epst(struct ie_generic *ie) { - printf(" Endpt state: %d\n", + kprintf(" Endpt state: %d\n", ie->ie_epst_state); } diff --git a/sys/netproto/atm/uni/unisig_util.c b/sys/netproto/atm/uni/unisig_util.c index 88da10f6af..be64a44ab6 100644 --- a/sys/netproto/atm/uni/unisig_util.c +++ b/sys/netproto/atm/uni/unisig_util.c @@ -24,7 +24,7 @@ * notice must be reproduced on all copies. * * @(#) $FreeBSD: src/sys/netatm/uni/unisig_util.c,v 1.6 2000/01/17 20:49:58 mks Exp $ - * @(#) $DragonFly: src/sys/netproto/atm/uni/unisig_util.c,v 1.6 2006/12/20 18:14:43 dillon Exp $ + * @(#) $DragonFly: src/sys/netproto/atm/uni/unisig_util.c,v 1.7 2006/12/22 23:57:54 swildner Exp $ */ /* @@ -356,15 +356,15 @@ unisig_print_mbuf(KBuffer *m) int i; caddr_t cp; - printf("unisig_print_mbuf:\n"); + kprintf("unisig_print_mbuf:\n"); while (m) { KB_DATASTART(m, cp, caddr_t); for (i = 0; i < KB_LEN(m); i++) { if (i == 0) - printf(" bfr=%p: ", m); - printf("%x ", (u_char)*cp++); + kprintf(" bfr=%p: ", m); + kprintf("%x ", (u_char)*cp++); } - printf("\n"); + kprintf("\n"); m = KB_NEXT(m); } } diff --git a/sys/netproto/ipsec/ipsec.c b/sys/netproto/ipsec/ipsec.c index f9bb021262..f05863e7a9 100644 --- a/sys/netproto/ipsec/ipsec.c +++ b/sys/netproto/ipsec/ipsec.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netipsec/ipsec.c,v 1.2.2.1 2003/01/24 05:11:35 sam Exp $ */ -/* $DragonFly: src/sys/netproto/ipsec/ipsec.c,v 1.18 2006/12/20 18:14:44 dillon Exp $ */ +/* $DragonFly: src/sys/netproto/ipsec/ipsec.c,v 1.19 2006/12/22 23:57:54 swildner Exp $ */ /* $KAME: ipsec.c,v 1.103 2001/05/24 07:14:18 sakane Exp $ */ /* @@ -211,7 +211,7 @@ key_allocsp_default(const char* where, int tag) struct secpolicy *sp; KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP key_allocsp_default from %s:%u\n", where, tag)); + kprintf("DP key_allocsp_default from %s:%u\n", where, tag)); sp = &ip4_def_policy; if (sp->policy != IPSEC_POLICY_DISCARD && @@ -223,7 +223,7 @@ key_allocsp_default(const char* where, int tag) sp->refcnt++; KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP key_allocsp_default returns SP:%p (%u)\n", + kprintf("DP key_allocsp_default returns SP:%p (%u)\n", sp, sp->refcnt)); return sp; } @@ -373,7 +373,7 @@ ipsec_getpolicybysock(struct mbuf *m, u_int dir, struct inpcb *inp, ("ipsec_getpolicybysock: null SP (priv %u policy %u", pcbsp->priv, currsp->policy)); KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP ipsec_getpolicybysock (priv %u policy %u) allocates " + kprintf("DP ipsec_getpolicybysock (priv %u policy %u) allocates " "SP:%p (refcnt %u)\n", pcbsp->priv, currsp->policy, sp, sp->refcnt)); return sp; @@ -443,7 +443,7 @@ ipsec4_checkpolicy(struct mbuf *m, u_int dir, u_int flag, int *error, switch (sp->policy) { case IPSEC_POLICY_ENTRUST: default: - printf("ipsec4_checkpolicy: invalid policy %u\n", sp->policy); + kprintf("ipsec4_checkpolicy: invalid policy %u\n", sp->policy); /* fall thru... */ case IPSEC_POLICY_DISCARD: newipsecstat.ips_out_polvio++; @@ -553,7 +553,7 @@ ipsec_setspidx(struct mbuf *m, struct secpolicyindex *spidx, int needport) len += n->m_len; if (m->m_pkthdr.len != len) { KEYDEBUG(KEYDEBUG_IPSEC_DUMP, - printf("ipsec_setspidx: " + kprintf("ipsec_setspidx: " "total of m_len(%d) != pkthdr.len(%d), " "ignored.\n", len, m->m_pkthdr.len)); @@ -562,7 +562,7 @@ ipsec_setspidx(struct mbuf *m, struct secpolicyindex *spidx, int needport) if (m->m_pkthdr.len < sizeof(struct ip)) { KEYDEBUG(KEYDEBUG_IPSEC_DUMP, - printf("ipsec_setspidx: " + kprintf("ipsec_setspidx: " "pkthdr.len(%d) < sizeof(struct ip), ignored.\n", m->m_pkthdr.len)); return EINVAL; @@ -590,7 +590,7 @@ ipsec_setspidx(struct mbuf *m, struct secpolicyindex *spidx, int needport) case 6: if (m->m_pkthdr.len < sizeof(struct ip6_hdr)) { KEYDEBUG(KEYDEBUG_IPSEC_DUMP, - printf("ipsec_setspidx: " + kprintf("ipsec_setspidx: " "pkthdr.len(%d) < sizeof(struct ip6_hdr), " "ignored.\n", m->m_pkthdr.len)); return EINVAL; @@ -603,7 +603,7 @@ ipsec_setspidx(struct mbuf *m, struct secpolicyindex *spidx, int needport) #endif default: KEYDEBUG(KEYDEBUG_IPSEC_DUMP, - printf("ipsec_setspidx: " + kprintf("ipsec_setspidx: " "unknown IP version %u, ignored.\n", v)); return EINVAL; } @@ -738,7 +738,7 @@ ipsec6_get_ulp(struct mbuf *m, struct secpolicyindex *spidx, int needport) panic("ipsec6_get_ulp: NULL pointer was passed.\n"); KEYDEBUG(KEYDEBUG_IPSEC_DUMP, - printf("ipsec6_get_ulp:\n"); kdebug_mbuf(m)); + kprintf("ipsec6_get_ulp:\n"); kdebug_mbuf(m)); /* set default */ spidx->ul_proto = IPSEC_ULPROTO_ANY; @@ -968,7 +968,7 @@ ipsec_set_policy(struct secpolicy **pcb_sp, int optname, caddr_t request, xpl = (struct sadb_x_policy *)request; KEYDEBUG(KEYDEBUG_IPSEC_DUMP, - printf("ipsec_set_policy: passed policy\n"); + kprintf("ipsec_set_policy: passed policy\n"); kdebug_sadb_x_policy((struct sadb_ext *)xpl)); /* check policy type */ @@ -991,7 +991,7 @@ ipsec_set_policy(struct secpolicy **pcb_sp, int optname, caddr_t request, KEY_FREESP(pcb_sp); *pcb_sp = newsp; KEYDEBUG(KEYDEBUG_IPSEC_DUMP, - printf("ipsec_set_policy: new policy\n"); + kprintf("ipsec_set_policy: new policy\n"); kdebug_secpolicy(newsp)); return 0; @@ -1013,7 +1013,7 @@ ipsec_get_policy(struct secpolicy *pcb_sp, struct mbuf **mp) KKASSERT((*mp)->m_type == MT_DATA); KEYDEBUG(KEYDEBUG_IPSEC_DUMP, - printf("ipsec_get_policy:\n"); + kprintf("ipsec_get_policy:\n"); kdebug_mbuf(*mp)); return 0; @@ -1306,7 +1306,7 @@ ipsec_in_reject(struct secpolicy *sp, struct mbuf *m) int need_auth; KEYDEBUG(KEYDEBUG_IPSEC_DATA, - printf("ipsec_in_reject: using SP\n"); + kprintf("ipsec_in_reject: using SP\n"); kdebug_secpolicy(sp)); /* check policy */ @@ -1331,7 +1331,7 @@ ipsec_in_reject(struct secpolicy *sp, struct mbuf *m) case IPPROTO_ESP: if ((m->m_flags & M_DECRYPTED) == 0) { KEYDEBUG(KEYDEBUG_IPSEC_DUMP, - printf("ipsec_in_reject: ESP m_flags:%x\n", + kprintf("ipsec_in_reject: ESP m_flags:%x\n", m->m_flags)); return 1; } @@ -1341,7 +1341,7 @@ ipsec_in_reject(struct secpolicy *sp, struct mbuf *m) isr->sav->tdb_authalgxform != NULL && (m->m_flags & M_AUTHIPDGM) == 0) { KEYDEBUG(KEYDEBUG_IPSEC_DUMP, - printf("ipsec_in_reject: ESP/AH m_flags:%x\n", + kprintf("ipsec_in_reject: ESP/AH m_flags:%x\n", m->m_flags)); return 1; } @@ -1350,7 +1350,7 @@ ipsec_in_reject(struct secpolicy *sp, struct mbuf *m) need_auth = 1; if ((m->m_flags & M_AUTHIPHDR) == 0) { KEYDEBUG(KEYDEBUG_IPSEC_DUMP, - printf("ipsec_in_reject: AH m_flags:%x\n", + kprintf("ipsec_in_reject: AH m_flags:%x\n", m->m_flags)); return 1; } @@ -1453,7 +1453,7 @@ ipsec_hdrsiz(struct secpolicy *sp) size_t siz; KEYDEBUG(KEYDEBUG_IPSEC_DATA, - printf("ipsec_hdrsiz: using SP\n"); + kprintf("ipsec_hdrsiz: using SP\n"); kdebug_secpolicy(sp)); switch (sp->policy) { @@ -1529,7 +1529,7 @@ ipsec4_hdrsiz(struct mbuf *m, u_int dir, struct inpcb *inp) if (sp != NULL) { size = ipsec_hdrsiz(sp); KEYDEBUG(KEYDEBUG_IPSEC_DATA, - printf("ipsec4_hdrsiz: size:%lu.\n", + kprintf("ipsec4_hdrsiz: size:%lu.\n", (unsigned long)size)); KEY_FREESP(&sp); @@ -1565,7 +1565,7 @@ ipsec6_hdrsiz(struct mbuf *m, u_int dir, struct in6pcb *in6p) return 0; size = ipsec_hdrsiz(sp); KEYDEBUG(KEYDEBUG_IPSEC_DATA, - printf("ipsec6_hdrsiz: size:%lu.\n", (unsigned long)size)); + kprintf("ipsec6_hdrsiz: size:%lu.\n", (unsigned long)size)); KEY_FREESP(&sp); return size; @@ -1806,20 +1806,20 @@ ipsec_dumpmbuf(struct mbuf *m) u_char *p; totlen = 0; - printf("---\n"); + kprintf("---\n"); while (m) { p = mtod(m, u_char *); for (i = 0; i < m->m_len; i++) { - printf("%02x ", p[i]); + kprintf("%02x ", p[i]); totlen++; if (totlen % 16 == 0) - printf("\n"); + kprintf("\n"); } m = m->m_next; } if (totlen % 16 != 0) - printf("\n"); - printf("---\n"); + kprintf("\n"); + kprintf("---\n"); } /* XXX this stuff doesn't belong here... */ diff --git a/sys/netproto/ipsec/ipsec.h b/sys/netproto/ipsec/ipsec.h index 4388910a6f..6dcee77da0 100644 --- a/sys/netproto/ipsec/ipsec.h +++ b/sys/netproto/ipsec/ipsec.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netipsec/ipsec.h,v 1.2.4.1 2003/01/24 05:11:35 sam Exp $ */ -/* $DragonFly: src/sys/netproto/ipsec/ipsec.h,v 1.4 2003/08/23 10:06:23 rob Exp $ */ +/* $DragonFly: src/sys/netproto/ipsec/ipsec.h,v 1.5 2006/12/22 23:57:54 swildner Exp $ */ /* $KAME: ipsec.h,v 1.53 2001/11/20 08:32:38 itojun Exp $ */ /* @@ -321,7 +321,7 @@ extern int crypto_support; #define ipseclog(x) do { if (ipsec_debug) log x; } while (0) /* for openbsd compatibility */ -#define DPRINTF(x) do { if (ipsec_debug) printf x; } while (0) +#define DPRINTF(x) do { if (ipsec_debug) kprintf x; } while (0) struct tdb_ident; extern struct secpolicy *ipsec_getpolicy (struct tdb_ident*, u_int); diff --git a/sys/netproto/ipsec/ipsec_mbuf.c b/sys/netproto/ipsec/ipsec_mbuf.c index 72eb655394..addbd2e395 100644 --- a/sys/netproto/ipsec/ipsec_mbuf.c +++ b/sys/netproto/ipsec/ipsec_mbuf.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/netipsec/ipsec_mbuf.c,v 1.5.2.2 2003/03/28 20:32:53 sam Exp $ - * $DragonFly: src/sys/netproto/ipsec/ipsec_mbuf.c,v 1.6 2004/10/15 22:59:10 hsu Exp $ + * $DragonFly: src/sys/netproto/ipsec/ipsec_mbuf.c,v 1.7 2006/12/22 23:57:54 swildner Exp $ */ /* @@ -456,13 +456,13 @@ m_checkalignment(const char* where, struct mbuf *m0, int off, int len) if (m == NULL) return; - printf("%s (off %u len %u): ", where, off, len); + kprintf("%s (off %u len %u): ", where, off, len); addr = mtod(m, caddr_t) + roff; do { int mlen; if (((uintptr_t) addr) & 3) { - printf("addr misaligned %p,", addr); + kprintf("addr misaligned %p,", addr); break; } mlen = m->m_len; @@ -470,13 +470,13 @@ m_checkalignment(const char* where, struct mbuf *m0, int off, int len) mlen = len; len -= mlen; if (len && (mlen & 3)) { - printf("len mismatch %u,", mlen); + kprintf("len mismatch %u,", mlen); break; } m = m->m_next; addr = m ? mtod(m, caddr_t) : NULL; } while (m && len > 0); for (m = m0; m; m = m->m_next) - printf(" [%p:%u]", mtod(m, caddr_t), m->m_len); - printf("\n"); + kprintf(" [%p:%u]", mtod(m, caddr_t), m->m_len); + kprintf("\n"); } diff --git a/sys/netproto/ipsec/ipsec_output.c b/sys/netproto/ipsec/ipsec_output.c index f9529cbf30..c8e5be6339 100644 --- a/sys/netproto/ipsec/ipsec_output.c +++ b/sys/netproto/ipsec/ipsec_output.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/netipsec/ipsec_output.c,v 1.3.2.2 2003/03/28 20:32:53 sam Exp $ - * $DragonFly: src/sys/netproto/ipsec/ipsec_output.c,v 1.9 2005/06/17 19:12:23 dillon Exp $ + * $DragonFly: src/sys/netproto/ipsec/ipsec_output.c,v 1.10 2006/12/22 23:57:54 swildner Exp $ */ /* @@ -533,7 +533,7 @@ ipsec6_output_trans( KASSERT(tun != NULL, ("ipsec6_output: null tun")); KEYDEBUG(KEYDEBUG_IPSEC_DATA, - printf("ipsec6_output_trans: applyed SP\n"); + kprintf("ipsec6_output_trans: applyed SP\n"); kdebug_secpolicy(sp)); isr = sp->req; @@ -659,7 +659,7 @@ ipsec6_output_tunnel(struct ipsec_output_state *state, struct secpolicy *sp, int KASSERT(sp != NULL, ("ipsec6_output: null sp")); KEYDEBUG(KEYDEBUG_IPSEC_DATA, - printf("ipsec6_output_tunnel: applyed SP\n"); + kprintf("ipsec6_output_tunnel: applyed SP\n"); kdebug_secpolicy(sp)); m = state->m; diff --git a/sys/netproto/ipsec/key.c b/sys/netproto/ipsec/key.c index ce9c656a73..355d51af24 100644 --- a/sys/netproto/ipsec/key.c +++ b/sys/netproto/ipsec/key.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netipsec/key.c,v 1.3.2.1 2003/01/24 05:11:35 sam Exp $ */ -/* $DragonFly: src/sys/netproto/ipsec/key.c,v 1.23 2006/12/03 03:16:24 hsu Exp $ */ +/* $DragonFly: src/sys/netproto/ipsec/key.c,v 1.24 2006/12/22 23:57:54 swildner Exp $ */ /* $KAME: key.c,v 1.191 2001/06/27 10:46:49 sakane Exp $ */ /* @@ -297,13 +297,13 @@ MALLOC_DEFINE(M_SECA, "key mgmt", "security associations, key management"); #define KMALLOC(p, t, n) \ do { \ ((p) = (t)kmalloc((unsigned long)(n), M_SECA, M_INTWAIT | M_NULLOK)); \ - printf("%s %d: %p <- KMALLOC(%s, %d)\n", \ + kprintf("%s %d: %p <- KMALLOC(%s, %d)\n", \ __FILE__, __LINE__, (p), #t, n); \ } while (0) #define KFREE(p) \ do { \ - printf("%s %d: %p -> KFREE()\n", __FILE__, __LINE__, (p)); \ + kprintf("%s %d: %p -> KFREE()\n", __FILE__, __LINE__, (p)); \ kfree((caddr_t)(p), M_SECA); \ } while (0) #endif @@ -533,16 +533,16 @@ key_allocsp(struct secpolicyindex *spidx, u_int dir, const char* where, int tag) ("key_allocsp: invalid direction %u", dir)); KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP key_allocsp from %s:%u\n", where, tag)); + kprintf("DP key_allocsp from %s:%u\n", where, tag)); /* get a SP entry */ crit_enter(); KEYDEBUG(KEYDEBUG_IPSEC_DATA, - printf("*** objects\n"); kdebug_secpolicyindex(spidx)); + kprintf("*** objects\n"); kdebug_secpolicyindex(spidx)); LIST_FOREACH(sp, &sptree[dir], chain) { KEYDEBUG(KEYDEBUG_IPSEC_DATA, - printf("*** in SPD\n"); + kprintf("*** in SPD\n"); kdebug_secpolicyindex(&sp->spidx)); if (sp->state == IPSEC_SPSTATE_DEAD) @@ -563,7 +563,7 @@ found: crit_exit(); KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP key_allocsp return SP:%p (ID=%u) refcnt %u\n", + kprintf("DP key_allocsp return SP:%p (ID=%u) refcnt %u\n", sp, sp ? sp->id : 0, sp ? sp->refcnt : 0)); return sp; } @@ -589,18 +589,18 @@ key_allocsp2(u_int32_t spi, ("key_allocsp2: invalid direction %u", dir)); KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP key_allocsp2 from %s:%u\n", where, tag)); + kprintf("DP key_allocsp2 from %s:%u\n", where, tag)); /* get a SP entry */ crit_enter(); KEYDEBUG(KEYDEBUG_IPSEC_DATA, - printf("*** objects\n"); - printf("spi %u proto %u dir %u\n", spi, proto, dir); + kprintf("*** objects\n"); + kprintf("spi %u proto %u dir %u\n", spi, proto, dir); kdebug_sockaddr(&dst->sa)); LIST_FOREACH(sp, &sptree[dir], chain) { KEYDEBUG(KEYDEBUG_IPSEC_DATA, - printf("*** in SPD\n"); + kprintf("*** in SPD\n"); kdebug_secpolicyindex(&sp->spidx)); if (sp->state == IPSEC_SPSTATE_DEAD) @@ -627,7 +627,7 @@ found: crit_exit(); KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP key_allocsp2 return SP:%p (ID=%u) refcnt %u\n", + kprintf("DP key_allocsp2 return SP:%p (ID=%u) refcnt %u\n", sp, sp ? sp->id : 0, sp ? sp->refcnt : 0)); return sp; } @@ -650,7 +650,7 @@ key_gettunnel(const struct sockaddr *osrc, struct secpolicyindex spidx; KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP key_gettunnel from %s:%u\n", where, tag)); + kprintf("DP key_gettunnel from %s:%u\n", where, tag)); if (isrc->sa_family != idst->sa_family) { ipseclog((LOG_ERR, "protocol family mismatched %d != %d\n.", @@ -704,7 +704,7 @@ found: crit_exit(); done: KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP key_gettunnel return SP:%p (ID=%u) refcnt %u\n", + kprintf("DP key_gettunnel return SP:%p (ID=%u) refcnt %u\n", sp, sp ? sp->id : 0, sp ? sp->refcnt : 0)); return sp; } @@ -957,7 +957,7 @@ key_do_allocsa_policy(struct secashead *sah, u_int state) if (candidate) { SA_ADDREF(candidate); KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP allocsa_policy cause refcnt++:%d SA:%p\n", + kprintf("DP allocsa_policy cause refcnt++:%d SA:%p\n", candidate->refcnt, candidate)); } return candidate; @@ -993,7 +993,7 @@ key_allocsa( KASSERT(dst != NULL, ("key_allocsa: null dst address")); KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP key_allocsa from %s:%u\n", where, tag)); + kprintf("DP key_allocsa from %s:%u\n", where, tag)); /* * searching SAD. @@ -1037,7 +1037,7 @@ done: crit_exit(); KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP key_allocsa return SA:%p; refcnt %u\n", + kprintf("DP key_allocsa return SA:%p; refcnt %u\n", sav, sav ? sav->refcnt : 0)); return sav; } @@ -1056,7 +1056,7 @@ _key_freesp(struct secpolicy **spp, const char* where, int tag) SP_DELREF(sp); KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP key_freesp SP:%p (ID=%u) from %s:%u; refcnt now %u\n", + kprintf("DP key_freesp SP:%p (ID=%u) from %s:%u; refcnt now %u\n", sp, sp->id, where, tag, sp->refcnt)); if (sp->refcnt == 0) { @@ -1148,7 +1148,7 @@ key_freesav(struct secasvar **psav, const char* where, int tag) SA_DELREF(sav); KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP key_freesav SA:%p (SPI %u) from %s:%u; refcnt now %u\n", + kprintf("DP key_freesav SA:%p (SPI %u) from %s:%u; refcnt now %u\n", sav, ntohl(sav->spi), where, tag, sav->refcnt)); if (sav->refcnt == 0) { @@ -1267,7 +1267,7 @@ key_newsp(const char* where, int tag) } KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP key_newsp from %s:%u return SP:%p\n", + kprintf("DP key_newsp from %s:%u return SP:%p\n", where, tag, newsp)); return newsp; } @@ -2629,7 +2629,7 @@ key_newsav(struct mbuf *m, const struct sadb_msghdr *mhp, struct secashead *sah, secasvar, chain); done: KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP key_newsav from %s:%u return SP:%p\n", + kprintf("DP key_newsav from %s:%u return SP:%p\n", where, tag, newsav)); return newsav; @@ -4119,7 +4119,7 @@ key_randomfill(void *p, size_t l) n += sizeof(v); if (warn) { - printf("WARNING: pseudo-random number generator " + kprintf("WARNING: pseudo-random number generator " "used for IPsec processing\n"); warn = 0; } @@ -4603,7 +4603,7 @@ key_getsavbyseq(struct secashead *sah, u_int32_t seq) if (sav->seq == seq) { SA_ADDREF(sav); KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP key_getsavbyseq cause " + kprintf("DP key_getsavbyseq cause " "refcnt++:%d SA:%p\n", sav->refcnt, sav)); return sav; @@ -6758,7 +6758,7 @@ key_init(void) /* initialize key statistics */ keystat.getspi_count = 1; - printf("IPsec: Initialized Security Association Processing.\n"); + kprintf("IPsec: Initialized Security Association Processing.\n"); return; } diff --git a/sys/netproto/ipsec/key_debug.c b/sys/netproto/ipsec/key_debug.c index 20abe2af91..81995de933 100644 --- a/sys/netproto/ipsec/key_debug.c +++ b/sys/netproto/ipsec/key_debug.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netipsec/key_debug.c,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $ */ -/* $DragonFly: src/sys/netproto/ipsec/key_debug.c,v 1.8 2006/01/14 13:36:40 swildner Exp $ */ +/* $DragonFly: src/sys/netproto/ipsec/key_debug.c,v 1.9 2006/12/22 23:57:54 swildner Exp $ */ /* $KAME: key_debug.c,v 1.26 2001/06/27 10:46:50 sakane Exp $ */ /* @@ -74,7 +74,7 @@ static void kdebug_secreplay (struct secreplay *); #endif #ifndef _KERNEL -#define panic(param) { printf(param); exit(-1); } +#define panic(param) { kprintf(param); exit(-1); } #endif /* NOTE: host byte order */ @@ -90,10 +90,10 @@ kdebug_sadb(struct sadb_msg *base) if (base == NULL) panic("kdebug_sadb: NULL pointer was passed.\n"); - printf("sadb_msg{ version=%u type=%u errno=%u satype=%u\n", + kprintf("sadb_msg{ version=%u type=%u errno=%u satype=%u\n", base->sadb_msg_version, base->sadb_msg_type, base->sadb_msg_errno, base->sadb_msg_satype); - printf(" len=%u reserved=%u seq=%u pid=%u\n", + kprintf(" len=%u reserved=%u seq=%u pid=%u\n", base->sadb_msg_len, base->sadb_msg_reserved, base->sadb_msg_seq, base->sadb_msg_pid); @@ -101,15 +101,15 @@ kdebug_sadb(struct sadb_msg *base) ext = (struct sadb_ext *)((caddr_t)base + sizeof(struct sadb_msg)); while (tlen > 0) { - printf("sadb_ext{ len=%u type=%u }\n", + kprintf("sadb_ext{ len=%u type=%u }\n", ext->sadb_ext_len, ext->sadb_ext_type); if (ext->sadb_ext_len == 0) { - printf("kdebug_sadb: invalid ext_len=0 was passed.\n"); + kprintf("kdebug_sadb: invalid ext_len=0 was passed.\n"); return; } if (ext->sadb_ext_len > tlen) { - printf("kdebug_sadb: ext_len exceeds end of buffer.\n"); + kprintf("kdebug_sadb: ext_len exceeds end of buffer.\n"); return; } @@ -154,7 +154,7 @@ kdebug_sadb(struct sadb_msg *base) kdebug_sadb_x_sa2(ext); break; default: - printf("kdebug_sadb: invalid ext_type %u was passed.\n", + kprintf("kdebug_sadb: invalid ext_type %u was passed.\n", ext->sadb_ext_type); return; } @@ -181,29 +181,29 @@ kdebug_sadb_prop(struct sadb_ext *ext) len = (PFKEY_UNUNIT64(prop->sadb_prop_len) - sizeof(*prop)) / sizeof(*comb); comb = (struct sadb_comb *)(prop + 1); - printf("sadb_prop{ replay=%u\n", prop->sadb_prop_replay); + kprintf("sadb_prop{ replay=%u\n", prop->sadb_prop_replay); while (len--) { - printf("sadb_comb{ auth=%u encrypt=%u " + kprintf("sadb_comb{ auth=%u encrypt=%u " "flags=0x%04x reserved=0x%08x\n", comb->sadb_comb_auth, comb->sadb_comb_encrypt, comb->sadb_comb_flags, comb->sadb_comb_reserved); - printf(" auth_minbits=%u auth_maxbits=%u " + kprintf(" auth_minbits=%u auth_maxbits=%u " "encrypt_minbits=%u encrypt_maxbits=%u\n", comb->sadb_comb_auth_minbits, comb->sadb_comb_auth_maxbits, comb->sadb_comb_encrypt_minbits, comb->sadb_comb_encrypt_maxbits); - printf(" soft_alloc=%u hard_alloc=%u " + kprintf(" soft_alloc=%u hard_alloc=%u " "soft_bytes=%lu hard_bytes=%lu\n", comb->sadb_comb_soft_allocations, comb->sadb_comb_hard_allocations, (unsigned long)comb->sadb_comb_soft_bytes, (unsigned long)comb->sadb_comb_hard_bytes); - printf(" soft_alloc=%lu hard_alloc=%lu " + kprintf(" soft_alloc=%lu hard_alloc=%lu " "soft_bytes=%lu hard_bytes=%lu }\n", (unsigned long)comb->sadb_comb_soft_addtime, (unsigned long)comb->sadb_comb_hard_addtime, @@ -211,7 +211,7 @@ kdebug_sadb_prop(struct sadb_ext *ext) (unsigned long)comb->sadb_comb_hard_usetime); comb++; } - printf("}\n"); + kprintf("}\n"); return; } @@ -227,33 +227,33 @@ kdebug_sadb_identity(struct sadb_ext *ext) panic("kdebug_sadb_identity: NULL pointer was passed.\n"); len = PFKEY_UNUNIT64(id->sadb_ident_len) - sizeof(*id); - printf("sadb_ident_%s{", + kprintf("sadb_ident_%s{", id->sadb_ident_exttype == SADB_EXT_IDENTITY_SRC ? "src" : "dst"); switch (id->sadb_ident_type) { default: - printf(" type=%d id=%lu", + kprintf(" type=%d id=%lu", id->sadb_ident_type, (u_long)id->sadb_ident_id); if (len) { #ifdef _KERNEL ipsec_hexdump((caddr_t)(id + 1), len); /*XXX cast ?*/ #else char *p, *ep; - printf("\n str=\""); + kprintf("\n str=\""); p = (char *)(id + 1); ep = p + len; for (/*nothing*/; *p && p < ep; p++) { if (isprint(*p)) - printf("%c", *p & 0xff); + kprintf("%c", *p & 0xff); else - printf("\\%03o", *p & 0xff); + kprintf("\\%03o", *p & 0xff); } #endif - printf("\""); + kprintf("\""); } break; } - printf(" }\n"); + kprintf(" }\n"); return; } @@ -272,14 +272,14 @@ kdebug_sadb_supported(struct sadb_ext *ext) len = (PFKEY_UNUNIT64(sup->sadb_supported_len) - sizeof(*sup)) / sizeof(*alg); alg = (struct sadb_alg *)(sup + 1); - printf("sadb_sup{\n"); + kprintf("sadb_sup{\n"); while (len--) { - printf(" { id=%d ivlen=%d min=%d max=%d }\n", + kprintf(" { id=%d ivlen=%d min=%d max=%d }\n", alg->sadb_alg_id, alg->sadb_alg_ivlen, alg->sadb_alg_minbits, alg->sadb_alg_maxbits); alg++; } - printf("}\n"); + kprintf("}\n"); return; } @@ -291,12 +291,12 @@ kdebug_sadb_lifetime(struct sadb_ext *ext) /* sanity check */ if (ext == NULL) - printf("kdebug_sadb_lifetime: NULL pointer was passed.\n"); + kprintf("kdebug_sadb_lifetime: NULL pointer was passed.\n"); - printf("sadb_lifetime{ alloc=%u, bytes=%u\n", + kprintf("sadb_lifetime{ alloc=%u, bytes=%u\n", lft->sadb_lifetime_allocations, (u_int32_t)lft->sadb_lifetime_bytes); - printf(" addtime=%u, usetime=%u }\n", + kprintf(" addtime=%u, usetime=%u }\n", (u_int32_t)lft->sadb_lifetime_addtime, (u_int32_t)lft->sadb_lifetime_usetime); @@ -312,10 +312,10 @@ kdebug_sadb_sa(struct sadb_ext *ext) if (ext == NULL) panic("kdebug_sadb_sa: NULL pointer was passed.\n"); - printf("sadb_sa{ spi=%u replay=%u state=%u\n", + kprintf("sadb_sa{ spi=%u replay=%u state=%u\n", (u_int32_t)ntohl(sa->sadb_sa_spi), sa->sadb_sa_replay, sa->sadb_sa_state); - printf(" auth=%u encrypt=%u flags=0x%08x }\n", + kprintf(" auth=%u encrypt=%u flags=0x%08x }\n", sa->sadb_sa_auth, sa->sadb_sa_encrypt, sa->sadb_sa_flags); return; @@ -330,7 +330,7 @@ kdebug_sadb_address(struct sadb_ext *ext) if (ext == NULL) panic("kdebug_sadb_address: NULL pointer was passed.\n"); - printf("sadb_address{ proto=%u prefixlen=%u reserved=0x%02x%02x }\n", + kprintf("sadb_address{ proto=%u prefixlen=%u reserved=0x%02x%02x }\n", addr->sadb_address_proto, addr->sadb_address_prefixlen, ((u_char *)&addr->sadb_address_reserved)[0], ((u_char *)&addr->sadb_address_reserved)[1]); @@ -349,21 +349,21 @@ kdebug_sadb_key(struct sadb_ext *ext) if (ext == NULL) panic("kdebug_sadb_key: NULL pointer was passed.\n"); - printf("sadb_key{ bits=%u reserved=%u\n", + kprintf("sadb_key{ bits=%u reserved=%u\n", key->sadb_key_bits, key->sadb_key_reserved); - printf(" key="); + kprintf(" key="); /* sanity check 2 */ if ((key->sadb_key_bits >> 3) > (PFKEY_UNUNIT64(key->sadb_key_len) - sizeof(struct sadb_key))) { - printf("kdebug_sadb_key: key length mismatch, bit:%d len:%ld.\n", + kprintf("kdebug_sadb_key: key length mismatch, bit:%d len:%ld.\n", key->sadb_key_bits >> 3, (long)PFKEY_UNUNIT64(key->sadb_key_len) - sizeof(struct sadb_key)); } ipsec_hexdump((caddr_t)key + sizeof(struct sadb_key), key->sadb_key_bits >> 3); - printf(" }\n"); + kprintf(" }\n"); return; } @@ -376,9 +376,9 @@ kdebug_sadb_x_sa2(struct sadb_ext *ext) if (ext == NULL) panic("kdebug_sadb_x_sa2: NULL pointer was passed.\n"); - printf("sadb_x_sa2{ mode=%u reqid=%u\n", + kprintf("sadb_x_sa2{ mode=%u reqid=%u\n", sa2->sadb_x_sa2_mode, sa2->sadb_x_sa2_reqid); - printf(" reserved1=%u reserved2=%u sequence=%u }\n", + kprintf(" reserved1=%u reserved2=%u sequence=%u }\n", sa2->sadb_x_sa2_reserved1, sa2->sadb_x_sa2_reserved2, sa2->sadb_x_sa2_sequence); @@ -395,7 +395,7 @@ kdebug_sadb_x_policy(struct sadb_ext *ext) if (ext == NULL) panic("kdebug_sadb_x_policy: NULL pointer was passed.\n"); - printf("sadb_x_policy{ type=%u dir=%u id=%x }\n", + kprintf("sadb_x_policy{ type=%u dir=%u id=%x }\n", xpl->sadb_x_policy_type, xpl->sadb_x_policy_dir, xpl->sadb_x_policy_id); @@ -407,7 +407,7 @@ kdebug_sadb_x_policy(struct sadb_ext *ext) xisr = (struct sadb_x_ipsecrequest *)(xpl + 1); while (tlen > 0) { - printf(" { len=%u proto=%u mode=%u level=%u reqid=%u\n", + kprintf(" { len=%u proto=%u mode=%u level=%u reqid=%u\n", xisr->sadb_x_ipsecrequest_len, xisr->sadb_x_ipsecrequest_proto, xisr->sadb_x_ipsecrequest_mode, @@ -422,16 +422,16 @@ kdebug_sadb_x_policy(struct sadb_ext *ext) kdebug_sockaddr(addr); } - printf(" }\n"); + kprintf(" }\n"); /* prevent infinite loop */ if (xisr->sadb_x_ipsecrequest_len <= 0) { - printf("kdebug_sadb_x_policy: wrong policy struct.\n"); + kprintf("kdebug_sadb_x_policy: wrong policy struct.\n"); return; } /* prevent overflow */ if (xisr->sadb_x_ipsecrequest_len > tlen) { - printf("invalid ipsec policy length\n"); + kprintf("invalid ipsec policy length\n"); return; } @@ -457,40 +457,40 @@ kdebug_secpolicy(struct secpolicy *sp) if (sp == NULL) panic("kdebug_secpolicy: NULL pointer was passed.\n"); - printf("secpolicy{ refcnt=%u state=%u policy=%u\n", + kprintf("secpolicy{ refcnt=%u state=%u policy=%u\n", sp->refcnt, sp->state, sp->policy); kdebug_secpolicyindex(&sp->spidx); switch (sp->policy) { case IPSEC_POLICY_DISCARD: - printf(" type=discard }\n"); + kprintf(" type=discard }\n"); break; case IPSEC_POLICY_NONE: - printf(" type=none }\n"); + kprintf(" type=none }\n"); break; case IPSEC_POLICY_IPSEC: { struct ipsecrequest *isr; for (isr = sp->req; isr != NULL; isr = isr->next) { - printf(" level=%u\n", isr->level); + kprintf(" level=%u\n", isr->level); kdebug_secasindex(&isr->saidx); if (isr->sav != NULL) kdebug_secasv(isr->sav); } - printf(" }\n"); + kprintf(" }\n"); } break; case IPSEC_POLICY_BYPASS: - printf(" type=bypass }\n"); + kprintf(" type=bypass }\n"); break; case IPSEC_POLICY_ENTRUST: - printf(" type=entrust }\n"); + kprintf(" type=entrust }\n"); break; default: - printf("kdebug_secpolicy: Invalid policy found. %d\n", + kprintf("kdebug_secpolicy: Invalid policy found. %d\n", sp->policy); break; } @@ -505,15 +505,15 @@ kdebug_secpolicyindex(struct secpolicyindex *spidx) if (spidx == NULL) panic("kdebug_secpolicyindex: NULL pointer was passed.\n"); - printf("secpolicyindex{ dir=%u prefs=%u prefd=%u ul_proto=%u\n", + kprintf("secpolicyindex{ dir=%u prefs=%u prefd=%u ul_proto=%u\n", spidx->dir, spidx->prefs, spidx->prefd, spidx->ul_proto); ipsec_hexdump((caddr_t)&spidx->src, ((struct sockaddr *)&spidx->src)->sa_len); - printf("\n"); + kprintf("\n"); ipsec_hexdump((caddr_t)&spidx->dst, ((struct sockaddr *)&spidx->dst)->sa_len); - printf("}\n"); + kprintf("}\n"); return; } @@ -525,15 +525,15 @@ kdebug_secasindex(struct secasindex *saidx) if (saidx == NULL) panic("kdebug_secpolicyindex: NULL pointer was passed.\n"); - printf("secasindex{ mode=%u proto=%u\n", + kprintf("secasindex{ mode=%u proto=%u\n", saidx->mode, saidx->proto); ipsec_hexdump((caddr_t)&saidx->src, ((struct sockaddr *)&saidx->src)->sa_len); - printf("\n"); + kprintf("\n"); ipsec_hexdump((caddr_t)&saidx->dst, ((struct sockaddr *)&saidx->dst)->sa_len); - printf("\n"); + kprintf("\n"); return; } @@ -545,12 +545,12 @@ kdebug_secasv(struct secasvar *sav) if (sav == NULL) panic("kdebug_secasv: NULL pointer was passed.\n"); - printf("secas{"); + kprintf("secas{"); kdebug_secasindex(&sav->sah->saidx); - printf(" refcnt=%u state=%u auth=%u enc=%u\n", + kprintf(" refcnt=%u state=%u auth=%u enc=%u\n", sav->refcnt, sav->state, sav->alg_auth, sav->alg_enc); - printf(" spi=%u flags=%u\n", + kprintf(" spi=%u flags=%u\n", (u_int32_t)ntohl(sav->spi), sav->flags); if (sav->key_auth != NULL) @@ -558,9 +558,9 @@ kdebug_secasv(struct secasvar *sav) if (sav->key_enc != NULL) kdebug_sadb_key((struct sadb_ext *)sav->key_enc); if (sav->iv != NULL) { - printf(" iv="); + kprintf(" iv="); ipsec_hexdump(sav->iv, sav->ivlen ? sav->ivlen : 8); - printf("\n"); + kprintf("\n"); } if (sav->replay != NULL) @@ -588,21 +588,21 @@ kdebug_secreplay(struct secreplay *rpl) if (rpl == NULL) panic("kdebug_secreplay: NULL pointer was passed.\n"); - printf(" secreplay{ count=%u wsize=%u seq=%u lastseq=%u", + kprintf(" secreplay{ count=%u wsize=%u seq=%u lastseq=%u", rpl->count, rpl->wsize, rpl->seq, rpl->lastseq); if (rpl->bitmap == NULL) { - printf(" }\n"); + kprintf(" }\n"); return; } - printf("\n bitmap { "); + kprintf("\n bitmap { "); for (len = 0; len < rpl->wsize; len++) { for (l = 7; l >= 0; l--) - printf("%u", (((rpl->bitmap)[len] >> l) & 1) ? 1 : 0); + kprintf("%u", (((rpl->bitmap)[len] >> l) & 1) ? 1 : 0); } - printf(" }\n"); + kprintf(" }\n"); return; } @@ -614,18 +614,18 @@ kdebug_mbufhdr(struct mbuf *m) if (m == NULL) return; - printf("mbuf(%p){ m_next:%p m_nextpkt:%p m_data:%p " + kprintf("mbuf(%p){ m_next:%p m_nextpkt:%p m_data:%p " "m_len:%d m_type:0x%02x m_flags:0x%02x }\n", m, m->m_next, m->m_nextpkt, m->m_data, m->m_len, m->m_type, m->m_flags); if (m->m_flags & M_PKTHDR) { - printf(" m_pkthdr{ len:%d rcvif:%p }\n", + kprintf(" m_pkthdr{ len:%d rcvif:%p }\n", m->m_pkthdr.len, m->m_pkthdr.rcvif); } if (m->m_flags & M_EXT) { - printf(" m_ext{ ext_buf:%p ext_free:%p " + kprintf(" m_ext{ ext_buf:%p ext_free:%p " "ext_size:%u ext_ref:%p }\n", m->m_ext.ext_buf, m->m_ext.ext_free, m->m_ext.ext_size, m->m_ext.ext_ref); @@ -642,16 +642,16 @@ kdebug_mbuf(struct mbuf *m0) for (j = 0; m; m = m->m_next) { kdebug_mbufhdr(m); - printf(" m_data:\n"); + kprintf(" m_data:\n"); for (i = 0; i < m->m_len; i++) { if (i && i % 32 == 0) - printf("\n"); + kprintf("\n"); if (i % 4 == 0) - printf(" "); - printf("%02x", mtod(m, u_char *)[i]); + kprintf(" "); + kprintf("%02x", mtod(m, u_char *)[i]); j++; } - printf("\n"); + kprintf("\n"); } return; @@ -671,19 +671,19 @@ kdebug_sockaddr(struct sockaddr *addr) panic("kdebug_sockaddr: NULL pointer was passed.\n"); /* NOTE: We deal with port number as host byte order. */ - printf("sockaddr{ len=%u family=%u", addr->sa_len, addr->sa_family); + kprintf("sockaddr{ len=%u family=%u", addr->sa_len, addr->sa_family); switch (addr->sa_family) { case AF_INET: sin4 = (struct sockaddr_in *)addr; - printf(" port=%u\n", ntohs(sin4->sin_port)); + kprintf(" port=%u\n", ntohs(sin4->sin_port)); ipsec_hexdump((caddr_t)&sin4->sin_addr, sizeof(sin4->sin_addr)); break; #ifdef INET6 case AF_INET6: sin6 = (struct sockaddr_in6 *)addr; - printf(" port=%u\n", ntohs(sin6->sin6_port)); - printf(" flowinfo=0x%08x, scope_id=0x%08x\n", + kprintf(" port=%u\n", ntohs(sin6->sin6_port)); + kprintf(" flowinfo=0x%08x, scope_id=0x%08x\n", sin6->sin6_flowinfo, sin6->sin6_scope_id); ipsec_hexdump((caddr_t)&sin6->sin6_addr, sizeof(sin6->sin6_addr)); @@ -691,7 +691,7 @@ kdebug_sockaddr(struct sockaddr *addr) #endif } - printf(" }\n"); + kprintf(" }\n"); return; } @@ -702,7 +702,7 @@ ipsec_bindump(caddr_t buf, int len) int i; for (i = 0; i < len; i++) - printf("%c", (unsigned char)buf[i]); + kprintf("%c", (unsigned char)buf[i]); return; } @@ -714,12 +714,12 @@ ipsec_hexdump(caddr_t buf, int len) int i; for (i = 0; i < len; i++) { - if (i != 0 && i % 32 == 0) printf("\n"); - if (i % 4 == 0) printf(" "); - printf("%02x", (unsigned char)buf[i]); + if (i != 0 && i % 32 == 0) kprintf("\n"); + if (i % 4 == 0) kprintf(" "); + kprintf("%02x", (unsigned char)buf[i]); } #if 0 - if (i % 32 != 0) printf("\n"); + if (i % 32 != 0) kprintf("\n"); #endif return; diff --git a/sys/netproto/ipsec/keysock.c b/sys/netproto/ipsec/keysock.c index ab295db8b5..acd7e73548 100644 --- a/sys/netproto/ipsec/keysock.c +++ b/sys/netproto/ipsec/keysock.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netipsec/keysock.c,v 1.3.2.1 2003/01/24 05:11:36 sam Exp $ */ -/* $DragonFly: src/sys/netproto/ipsec/keysock.c,v 1.14 2006/10/19 07:12:14 hsu Exp $ */ +/* $DragonFly: src/sys/netproto/ipsec/keysock.c,v 1.15 2006/12/22 23:57:54 swildner Exp $ */ /* $KAME: keysock.c,v 1.25 2001/08/13 20:07:41 itojun Exp $ */ /* @@ -189,7 +189,7 @@ key_sendup(struct socket *so, struct sadb_msg *msg, u_int len, int target) panic("key_sendup: NULL pointer was passed.\n"); KEYDEBUG(KEYDEBUG_KEY_DUMP, - printf("key_sendup: \n"); + kprintf("key_sendup: \n"); kdebug_sadb(msg)); /* diff --git a/sys/netproto/ipsec/xform_ipip.c b/sys/netproto/ipsec/xform_ipip.c index e9a7ef548e..0b191f479b 100644 --- a/sys/netproto/ipsec/xform_ipip.c +++ b/sys/netproto/ipsec/xform_ipip.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netipsec/xform_ipip.c,v 1.3.2.1 2003/01/24 05:11:36 sam Exp $ */ -/* $DragonFly: src/sys/netproto/ipsec/xform_ipip.c,v 1.13 2006/01/14 13:36:40 swildner Exp $ */ +/* $DragonFly: src/sys/netproto/ipsec/xform_ipip.c,v 1.14 2006/12/22 23:57:54 swildner Exp $ */ /* $OpenBSD: ip_ipip.c,v 1.25 2002/06/10 18:04:55 itojun Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), @@ -626,7 +626,7 @@ static int ipe4_input(struct mbuf *m, struct secasvar *sav, int skip, int protoff) { /* This is a rather serious mistake, so no conditional printing. */ - printf("ipe4_input: should never be called\n"); + kprintf("ipe4_input: should never be called\n"); if (m) m_freem(m); return EOPNOTSUPP; diff --git a/sys/netproto/ipx/ipx.c b/sys/netproto/ipx/ipx.c index 28e4ac23aa..1225010796 100644 --- a/sys/netproto/ipx/ipx.c +++ b/sys/netproto/ipx/ipx.c @@ -34,7 +34,7 @@ * @(#)ipx.c * * $FreeBSD: src/sys/netipx/ipx.c,v 1.17.2.3 2003/04/04 09:35:43 tjr Exp $ - * $DragonFly: src/sys/netproto/ipx/ipx.c,v 1.12 2006/12/20 18:14:44 dillon Exp $ + * $DragonFly: src/sys/netproto/ipx/ipx.c,v 1.13 2006/12/22 23:57:54 swildner Exp $ */ #include @@ -193,7 +193,7 @@ ipx_control(struct socket *so, u_long cmd, caddr_t data, if (ia->ia_next) ia->ia_next = oia->ia_next; else - printf("Didn't unlink ipxifadr from list\n"); + kprintf("Didn't unlink ipxifadr from list\n"); } IFAFREE((&oia->ia_ifa)); return (0); @@ -345,9 +345,9 @@ ipx_printhost(struct ipx_addr *addr) if (ipx_nullnet(work) && ipx_nullhost(work)) { if (port) - printf("*.%x", port); + kprintf("*.%x", port); else - printf("*.*"); + kprintf("*.*"); return; } @@ -387,5 +387,5 @@ ipx_printhost(struct ipx_addr *addr) } else *cport = 0; - printf("%s.%s%s", net, host, cport); + kprintf("%s.%s%s", net, host, cport); } diff --git a/sys/netproto/ipx/ipx_input.c b/sys/netproto/ipx/ipx_input.c index e90648f663..68e1850e01 100644 --- a/sys/netproto/ipx/ipx_input.c +++ b/sys/netproto/ipx/ipx_input.c @@ -34,7 +34,7 @@ * @(#)ipx_input.c * * $FreeBSD: src/sys/netipx/ipx_input.c,v 1.22.2.2 2001/02/22 09:44:18 bp Exp $ - * $DragonFly: src/sys/netproto/ipx/ipx_input.c,v 1.14 2006/05/20 06:32:41 dillon Exp $ + * $DragonFly: src/sys/netproto/ipx/ipx_input.c,v 1.15 2006/12/22 23:57:54 swildner Exp $ */ #include @@ -299,7 +299,7 @@ ipx_ctlinput(int cmd, struct sockaddr *arg_as_sa, void *dummy) default: if (ipxprintfs) - printf("ipx_ctlinput: cmd %d.\n", cmd); + kprintf("ipx_ctlinput: cmd %d.\n", cmd); break; } } @@ -388,11 +388,11 @@ ipx_forward(struct mbuf *m) ipxstat.ipxs_forward++; if (ipxprintfs) { - printf("forward: "); + kprintf("forward: "); ipx_printhost(&ipx->ipx_sna); - printf(" to "); + kprintf(" to "); ipx_printhost(&ipx->ipx_dna); - printf(" hops %d\n", ipx->ipx_tc); + kprintf(" hops %d\n", ipx->ipx_tc); } } else if (mcopy != NULL) { ipx = mtod(mcopy, struct ipx *); diff --git a/sys/netproto/ipx/spx_debug.c b/sys/netproto/ipx/spx_debug.c index e4842caa26..bebc177153 100644 --- a/sys/netproto/ipx/spx_debug.c +++ b/sys/netproto/ipx/spx_debug.c @@ -34,7 +34,7 @@ * @(#)spx_debug.c * * $FreeBSD: src/sys/netipx/spx_debug.c,v 1.14 1999/08/28 00:49:43 peter Exp $ - * $DragonFly: src/sys/netproto/ipx/spx_debug.c,v 1.4 2006/01/14 13:36:40 swildner Exp $ + * $DragonFly: src/sys/netproto/ipx/spx_debug.c,v 1.5 2006/12/22 23:57:54 swildner Exp $ */ #include "opt_inet.h" @@ -95,10 +95,10 @@ spx_trace(int act, int ostate, struct spxpcb *sp, struct spx *si, int req) if (act >= SA_DROP) act = SA_DROP; if (sp != NULL) - printf("%p %s:", (void *)sp, tcpstates[ostate]); + kprintf("%p %s:", (void *)sp, tcpstates[ostate]); else - printf("???????? "); - printf("%s ", spxnames[act]); + kprintf("???????? "); + kprintf("%s ", spxnames[act]); switch (act) { case SA_RESPOND: @@ -118,48 +118,48 @@ spx_trace(int act, int ostate, struct spxpcb *sp, struct spx *si, int req) len = ntohs(len); } #ifndef lint -#define p1(f) { printf("%s = %x, ", "f", f); } +#define p1(f) { kprintf("%s = %x, ", "f", f); } p1(seq); p1(ack); p1(alo); p1(len); #endif flags = si->si_cc; if (flags) { char *cp = "<"; #ifndef lint -#define pf(f) { if (flags & SPX_ ## f) { printf("%s%s", cp, "f"); cp = ","; } } +#define pf(f) { if (flags & SPX_ ## f) { kprintf("%s%s", cp, "f"); cp = ","; } } pf(SP); pf(SA); pf(OB); pf(EM); #else cp = cp; #endif - printf(">"); + kprintf(">"); } #ifndef lint -#define p2(f) { printf("%s = %x, ", "f", si->si_ ## f); } +#define p2(f) { kprintf("%s = %x, ", "f", si->si_ ## f); } p2(sid);p2(did);p2(dt);p2(pt); #endif ipx_printhost(&si->si_sna); ipx_printhost(&si->si_dna); if (act == SA_RESPOND) { - printf("ipx_len = %x, ", + kprintf("ipx_len = %x, ", ((struct ipx *)si)->ipx_len); } break; case SA_USER: - printf("%s", prurequests[req&0xff]); + kprintf("%s", prurequests[req&0xff]); if ((req & 0xff) == PRU_SLOWTIMO) - printf("<%s>", spxtimers[req>>8]); + kprintf("<%s>", spxtimers[req>>8]); break; } if (sp) - printf(" -> %s", tcpstates[sp->s_state]); + kprintf(" -> %s", tcpstates[sp->s_state]); /* print out internal state of sp !?! */ - printf("\n"); + kprintf("\n"); if (sp == 0) return; #ifndef lint -#define p3(f) { printf("%s = %x, ", "f", sp->s_ ## f); } - printf("\t"); p3(rack);p3(ralo);p3(smax);p3(flags); printf("\n"); +#define p3(f) { kprintf("%s = %x, ", "f", sp->s_ ## f); } + kprintf("\t"); p3(rack);p3(ralo);p3(smax);p3(flags); kprintf("\n"); #endif #endif #endif diff --git a/sys/netproto/ipx/spx_usrreq.c b/sys/netproto/ipx/spx_usrreq.c index 50bb4c592c..c30610188f 100644 --- a/sys/netproto/ipx/spx_usrreq.c +++ b/sys/netproto/ipx/spx_usrreq.c @@ -34,7 +34,7 @@ * @(#)spx_usrreq.h * * $FreeBSD: src/sys/netipx/spx_usrreq.c,v 1.27.2.1 2001/02/22 09:44:18 bp Exp $ - * $DragonFly: src/sys/netproto/ipx/spx_usrreq.c,v 1.17 2006/09/05 00:55:49 dillon Exp $ + * $DragonFly: src/sys/netproto/ipx/spx_usrreq.c,v 1.18 2006/12/22 23:57:54 swildner Exp $ */ #include @@ -1776,7 +1776,7 @@ spx_timers(struct spxpcb *cb, int timer) * control block. */ case SPXT_2MSL: - printf("spx: SPXT_2MSL went off for no reason\n"); + kprintf("spx: SPXT_2MSL went off for no reason\n"); cb->s_timer[timer] = 0; break; diff --git a/sys/netproto/key/key.c b/sys/netproto/key/key.c index ba62f14469..e394795265 100644 --- a/sys/netproto/key/key.c +++ b/sys/netproto/key/key.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netkey/key.c,v 1.16.2.13 2002/07/24 18:17:40 ume Exp $ */ -/* $DragonFly: src/sys/netproto/key/key.c,v 1.18 2006/09/05 00:55:49 dillon Exp $ */ +/* $DragonFly: src/sys/netproto/key/key.c,v 1.19 2006/12/22 23:57:54 swildner Exp $ */ /* $KAME: key.c,v 1.191 2001/06/27 10:46:49 sakane Exp $ */ /* @@ -316,13 +316,13 @@ do { \ #define KMALLOC(p, t, n) \ do { \ ((p) = (t)kmalloc((unsigned long)(n), M_SECA, M_INTWAIT | M_NULLOK)); \ - printf("%s %d: %p <- KMALLOC(%s, %d)\n", \ + kprintf("%s %d: %p <- KMALLOC(%s, %d)\n", \ __FILE__, __LINE__, (p), #t, n); \ } while (0) #define KFREE(p) \ do { \ - printf("%s %d: %p -> KFREE()\n", __FILE__, __LINE__, (p)); \ + kprintf("%s %d: %p -> KFREE()\n", __FILE__, __LINE__, (p)); \ kfree((caddr_t)(p), M_SECA); \ } while (0) #endif @@ -528,12 +528,12 @@ key_allocsp(struct secpolicyindex *spidx, u_int dir) /* get a SP entry */ crit_enter(); KEYDEBUG(KEYDEBUG_IPSEC_DATA, - printf("*** objects\n"); + kprintf("*** objects\n"); kdebug_secpolicyindex(spidx)); LIST_FOREACH(sp, &sptree[dir], chain) { KEYDEBUG(KEYDEBUG_IPSEC_DATA, - printf("*** in SPD\n"); + kprintf("*** in SPD\n"); kdebug_secpolicyindex(&sp->spidx)); if (sp->state == IPSEC_SPSTATE_DEAD) @@ -555,7 +555,7 @@ found: sp->refcnt++; crit_exit(); KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP key_allocsp cause refcnt++:%d SP:%p\n", + kprintf("DP key_allocsp cause refcnt++:%d SP:%p\n", sp->refcnt, sp)); return sp; @@ -673,7 +673,7 @@ key_checkrequest(struct ipsecrequest *isr, struct secasindex *saidx) if (isr->sav == (struct secasvar *)LIST_FIRST( &isr->sav->sah->savtree[SADB_SASTATE_DEAD])) { KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP checkrequest calls free SA:%p\n", + kprintf("DP checkrequest calls free SA:%p\n", isr->sav)); key_freesav(isr->sav); isr->sav = NULL; @@ -889,7 +889,7 @@ key_do_allocsa_policy(struct secashead *sah, u_int state) if (candidate) { candidate->refcnt++; KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP allocsa_policy cause " + kprintf("DP allocsa_policy cause " "refcnt++:%d SA:%p\n", candidate->refcnt, candidate)); } @@ -1051,7 +1051,7 @@ found: sav->refcnt++; crit_exit(); KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP allocsa cause refcnt++:%d SA:%p\n", + kprintf("DP allocsa cause refcnt++:%d SA:%p\n", sav->refcnt, sav)); return sav; } @@ -1069,7 +1069,7 @@ key_freesp(struct secpolicy *sp) sp->refcnt--; KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP freesp cause refcnt--:%d SP:%p\n", + kprintf("DP freesp cause refcnt--:%d SP:%p\n", sp->refcnt, sp)); if (sp->refcnt == 0) @@ -1145,7 +1145,7 @@ key_freesp_so(struct secpolicy **sp) switch ((*sp)->policy) { case IPSEC_POLICY_IPSEC: KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP freeso calls free SP:%p\n", *sp)); + kprintf("DP freeso calls free SP:%p\n", *sp)); key_freesp(*sp); *sp = NULL; break; @@ -1173,7 +1173,7 @@ key_freesav(struct secasvar *sav) sav->refcnt--; KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP freesav cause refcnt--:%d SA:%p SPI %u\n", + kprintf("DP freesav cause refcnt--:%d SA:%p SPI %u\n", sav->refcnt, sav, (u_int32_t)ntohl(sav->spi))); if (sav->refcnt == 0) @@ -1209,7 +1209,7 @@ key_delsp(struct secpolicy *sp) while (isr != NULL) { if (isr->sav != NULL) { KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP delsp calls free SA:%p\n", + kprintf("DP delsp calls free SA:%p\n", isr->sav)); key_freesav(isr->sav); isr->sav = NULL; @@ -4380,7 +4380,7 @@ key_randomfill(void *p, size_t l) n += sizeof(v); if (warn) { - printf("WARNING: pseudo-random number generator " + kprintf("WARNING: pseudo-random number generator " "used for IPsec processing\n"); warn = 0; } @@ -4886,7 +4886,7 @@ key_getsavbyseq(struct secashead *sah, u_int32_t seq) if (sav->seq == seq) { sav->refcnt++; KEYDEBUG(KEYDEBUG_IPSEC_STAMP, - printf("DP key_getsavbyseq cause " + kprintf("DP key_getsavbyseq cause " "refcnt++:%d SA:%p\n", sav->refcnt, sav)); return sav; @@ -7111,7 +7111,7 @@ key_init(void) /* initialize key statistics */ keystat.getspi_count = 1; - printf("IPsec: Initialized Security Association Processing.\n"); + kprintf("IPsec: Initialized Security Association Processing.\n"); return; } diff --git a/sys/netproto/key/key_debug.c b/sys/netproto/key/key_debug.c index 0f22280c2f..df1613bc82 100644 --- a/sys/netproto/key/key_debug.c +++ b/sys/netproto/key/key_debug.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netkey/key_debug.c,v 1.10.2.5 2002/04/28 05:40:28 suz Exp $ */ -/* $DragonFly: src/sys/netproto/key/key_debug.c,v 1.7 2006/01/14 13:36:40 swildner Exp $ */ +/* $DragonFly: src/sys/netproto/key/key_debug.c,v 1.8 2006/12/22 23:57:54 swildner Exp $ */ /* $KAME: key_debug.c,v 1.26 2001/06/27 10:46:50 sakane Exp $ */ /* @@ -74,6 +74,7 @@ static void kdebug_secreplay (struct secreplay *); #endif #ifndef _KERNEL +#define kprintf printf #define panic(param) { printf(param); exit(-1); } #endif @@ -90,10 +91,10 @@ kdebug_sadb(struct sadb_msg *base) if (base == NULL) panic("kdebug_sadb: NULL pointer was passed.\n"); - printf("sadb_msg{ version=%u type=%u errno=%u satype=%u\n", + kprintf("sadb_msg{ version=%u type=%u errno=%u satype=%u\n", base->sadb_msg_version, base->sadb_msg_type, base->sadb_msg_errno, base->sadb_msg_satype); - printf(" len=%u reserved=%u seq=%u pid=%u\n", + kprintf(" len=%u reserved=%u seq=%u pid=%u\n", base->sadb_msg_len, base->sadb_msg_reserved, base->sadb_msg_seq, base->sadb_msg_pid); @@ -101,15 +102,15 @@ kdebug_sadb(struct sadb_msg *base) ext = (struct sadb_ext *)((caddr_t)base + sizeof(struct sadb_msg)); while (tlen > 0) { - printf("sadb_ext{ len=%u type=%u }\n", + kprintf("sadb_ext{ len=%u type=%u }\n", ext->sadb_ext_len, ext->sadb_ext_type); if (ext->sadb_ext_len == 0) { - printf("kdebug_sadb: invalid ext_len=0 was passed.\n"); + kprintf("kdebug_sadb: invalid ext_len=0 was passed.\n"); return; } if (ext->sadb_ext_len > tlen) { - printf("kdebug_sadb: ext_len exceeds end of buffer.\n"); + kprintf("kdebug_sadb: ext_len exceeds end of buffer.\n"); return; } @@ -154,7 +155,7 @@ kdebug_sadb(struct sadb_msg *base) kdebug_sadb_x_sa2(ext); break; default: - printf("kdebug_sadb: invalid ext_type %u was passed.\n", + kprintf("kdebug_sadb: invalid ext_type %u was passed.\n", ext->sadb_ext_type); return; } @@ -181,29 +182,29 @@ kdebug_sadb_prop(struct sadb_ext *ext) len = (PFKEY_UNUNIT64(prop->sadb_prop_len) - sizeof(*prop)) / sizeof(*comb); comb = (struct sadb_comb *)(prop + 1); - printf("sadb_prop{ replay=%u\n", prop->sadb_prop_replay); + kprintf("sadb_prop{ replay=%u\n", prop->sadb_prop_replay); while (len--) { - printf("sadb_comb{ auth=%u encrypt=%u " + kprintf("sadb_comb{ auth=%u encrypt=%u " "flags=0x%04x reserved=0x%08x\n", comb->sadb_comb_auth, comb->sadb_comb_encrypt, comb->sadb_comb_flags, comb->sadb_comb_reserved); - printf(" auth_minbits=%u auth_maxbits=%u " + kprintf(" auth_minbits=%u auth_maxbits=%u " "encrypt_minbits=%u encrypt_maxbits=%u\n", comb->sadb_comb_auth_minbits, comb->sadb_comb_auth_maxbits, comb->sadb_comb_encrypt_minbits, comb->sadb_comb_encrypt_maxbits); - printf(" soft_alloc=%u hard_alloc=%u " + kprintf(" soft_alloc=%u hard_alloc=%u " "soft_bytes=%lu hard_bytes=%lu\n", comb->sadb_comb_soft_allocations, comb->sadb_comb_hard_allocations, (unsigned long)comb->sadb_comb_soft_bytes, (unsigned long)comb->sadb_comb_hard_bytes); - printf(" soft_alloc=%lu hard_alloc=%lu " + kprintf(" soft_alloc=%lu hard_alloc=%lu " "soft_bytes=%lu hard_bytes=%lu }\n", (unsigned long)comb->sadb_comb_soft_addtime, (unsigned long)comb->sadb_comb_hard_addtime, @@ -211,7 +212,7 @@ kdebug_sadb_prop(struct sadb_ext *ext) (unsigned long)comb->sadb_comb_hard_usetime); comb++; } - printf("}\n"); + kprintf("}\n"); return; } @@ -227,33 +228,33 @@ kdebug_sadb_identity(struct sadb_ext *ext) panic("kdebug_sadb_identity: NULL pointer was passed.\n"); len = PFKEY_UNUNIT64(id->sadb_ident_len) - sizeof(*id); - printf("sadb_ident_%s{", + kprintf("sadb_ident_%s{", id->sadb_ident_exttype == SADB_EXT_IDENTITY_SRC ? "src" : "dst"); switch (id->sadb_ident_type) { default: - printf(" type=%d id=%lu", + kprintf(" type=%d id=%lu", id->sadb_ident_type, (u_long)id->sadb_ident_id); if (len) { #ifdef _KERNEL ipsec_hexdump((caddr_t)(id + 1), len); /*XXX cast ?*/ #else char *p, *ep; - printf("\n str=\""); + kprintf("\n str=\""); p = (char *)(id + 1); ep = p + len; for (/*nothing*/; *p && p < ep; p++) { if (isprint(*p)) - printf("%c", *p & 0xff); + kprintf("%c", *p & 0xff); else - printf("\\%03o", *p & 0xff); + kprintf("\\%03o", *p & 0xff); } #endif - printf("\""); + kprintf("\""); } break; } - printf(" }\n"); + kprintf(" }\n"); return; } @@ -272,14 +273,14 @@ kdebug_sadb_supported(struct sadb_ext *ext) len = (PFKEY_UNUNIT64(sup->sadb_supported_len) - sizeof(*sup)) / sizeof(*alg); alg = (struct sadb_alg *)(sup + 1); - printf("sadb_sup{\n"); + kprintf("sadb_sup{\n"); while (len--) { - printf(" { id=%d ivlen=%d min=%d max=%d }\n", + kprintf(" { id=%d ivlen=%d min=%d max=%d }\n", alg->sadb_alg_id, alg->sadb_alg_ivlen, alg->sadb_alg_minbits, alg->sadb_alg_maxbits); alg++; } - printf("}\n"); + kprintf("}\n"); return; } @@ -291,12 +292,12 @@ kdebug_sadb_lifetime(struct sadb_ext *ext) /* sanity check */ if (ext == NULL) - printf("kdebug_sadb_lifetime: NULL pointer was passed.\n"); + kprintf("kdebug_sadb_lifetime: NULL pointer was passed.\n"); - printf("sadb_lifetime{ alloc=%u, bytes=%u\n", + kprintf("sadb_lifetime{ alloc=%u, bytes=%u\n", lft->sadb_lifetime_allocations, (u_int32_t)lft->sadb_lifetime_bytes); - printf(" addtime=%u, usetime=%u }\n", + kprintf(" addtime=%u, usetime=%u }\n", (u_int32_t)lft->sadb_lifetime_addtime, (u_int32_t)lft->sadb_lifetime_usetime); @@ -312,10 +313,10 @@ kdebug_sadb_sa(struct sadb_ext *ext) if (ext == NULL) panic("kdebug_sadb_sa: NULL pointer was passed.\n"); - printf("sadb_sa{ spi=%u replay=%u state=%u\n", + kprintf("sadb_sa{ spi=%u replay=%u state=%u\n", (u_int32_t)ntohl(sa->sadb_sa_spi), sa->sadb_sa_replay, sa->sadb_sa_state); - printf(" auth=%u encrypt=%u flags=0x%08x }\n", + kprintf(" auth=%u encrypt=%u flags=0x%08x }\n", sa->sadb_sa_auth, sa->sadb_sa_encrypt, sa->sadb_sa_flags); return; @@ -330,7 +331,7 @@ kdebug_sadb_address(struct sadb_ext *ext) if (ext == NULL) panic("kdebug_sadb_address: NULL pointer was passed.\n"); - printf("sadb_address{ proto=%u prefixlen=%u reserved=0x%02x%02x }\n", + kprintf("sadb_address{ proto=%u prefixlen=%u reserved=0x%02x%02x }\n", addr->sadb_address_proto, addr->sadb_address_prefixlen, ((u_char *)&addr->sadb_address_reserved)[0], ((u_char *)&addr->sadb_address_reserved)[1]); @@ -349,21 +350,21 @@ kdebug_sadb_key(struct sadb_ext *ext) if (ext == NULL) panic("kdebug_sadb_key: NULL pointer was passed.\n"); - printf("sadb_key{ bits=%u reserved=%u\n", + kprintf("sadb_key{ bits=%u reserved=%u\n", key->sadb_key_bits, key->sadb_key_reserved); - printf(" key="); + kprintf(" key="); /* sanity check 2 */ if ((key->sadb_key_bits >> 3) > (PFKEY_UNUNIT64(key->sadb_key_len) - sizeof(struct sadb_key))) { - printf("kdebug_sadb_key: key length mismatch, bit:%d len:%ld.\n", + kprintf("kdebug_sadb_key: key length mismatch, bit:%d len:%ld.\n", key->sadb_key_bits >> 3, (long)PFKEY_UNUNIT64(key->sadb_key_len) - sizeof(struct sadb_key)); } ipsec_hexdump((caddr_t)key + sizeof(struct sadb_key), key->sadb_key_bits >> 3); - printf(" }\n"); + kprintf(" }\n"); return; } @@ -376,9 +377,9 @@ kdebug_sadb_x_sa2(struct sadb_ext *ext) if (ext == NULL) panic("kdebug_sadb_x_sa2: NULL pointer was passed.\n"); - printf("sadb_x_sa2{ mode=%u reqid=%u\n", + kprintf("sadb_x_sa2{ mode=%u reqid=%u\n", sa2->sadb_x_sa2_mode, sa2->sadb_x_sa2_reqid); - printf(" reserved1=%u reserved2=%u sequence=%u }\n", + kprintf(" reserved1=%u reserved2=%u sequence=%u }\n", sa2->sadb_x_sa2_reserved1, sa2->sadb_x_sa2_reserved2, sa2->sadb_x_sa2_sequence); @@ -395,7 +396,7 @@ kdebug_sadb_x_policy(struct sadb_ext *ext) if (ext == NULL) panic("kdebug_sadb_x_policy: NULL pointer was passed.\n"); - printf("sadb_x_policy{ type=%u dir=%u id=%x }\n", + kprintf("sadb_x_policy{ type=%u dir=%u id=%x }\n", xpl->sadb_x_policy_type, xpl->sadb_x_policy_dir, xpl->sadb_x_policy_id); @@ -407,7 +408,7 @@ kdebug_sadb_x_policy(struct sadb_ext *ext) xisr = (struct sadb_x_ipsecrequest *)(xpl + 1); while (tlen > 0) { - printf(" { len=%u proto=%u mode=%u level=%u reqid=%u\n", + kprintf(" { len=%u proto=%u mode=%u level=%u reqid=%u\n", xisr->sadb_x_ipsecrequest_len, xisr->sadb_x_ipsecrequest_proto, xisr->sadb_x_ipsecrequest_mode, @@ -422,16 +423,16 @@ kdebug_sadb_x_policy(struct sadb_ext *ext) kdebug_sockaddr(addr); } - printf(" }\n"); + kprintf(" }\n"); /* prevent infinite loop */ if (xisr->sadb_x_ipsecrequest_len <= 0) { - printf("kdebug_sadb_x_policy: wrong policy struct.\n"); + kprintf("kdebug_sadb_x_policy: wrong policy struct.\n"); return; } /* prevent overflow */ if (xisr->sadb_x_ipsecrequest_len > tlen) { - printf("invalid ipsec policy length\n"); + kprintf("invalid ipsec policy length\n"); return; } @@ -457,40 +458,40 @@ kdebug_secpolicy(struct secpolicy *sp) if (sp == NULL) panic("kdebug_secpolicy: NULL pointer was passed.\n"); - printf("secpolicy{ refcnt=%u state=%u policy=%u\n", + kprintf("secpolicy{ refcnt=%u state=%u policy=%u\n", sp->refcnt, sp->state, sp->policy); kdebug_secpolicyindex(&sp->spidx); switch (sp->policy) { case IPSEC_POLICY_DISCARD: - printf(" type=discard }\n"); + kprintf(" type=discard }\n"); break; case IPSEC_POLICY_NONE: - printf(" type=none }\n"); + kprintf(" type=none }\n"); break; case IPSEC_POLICY_IPSEC: { struct ipsecrequest *isr; for (isr = sp->req; isr != NULL; isr = isr->next) { - printf(" level=%u\n", isr->level); + kprintf(" level=%u\n", isr->level); kdebug_secasindex(&isr->saidx); if (isr->sav != NULL) kdebug_secasv(isr->sav); } - printf(" }\n"); + kprintf(" }\n"); } break; case IPSEC_POLICY_BYPASS: - printf(" type=bypass }\n"); + kprintf(" type=bypass }\n"); break; case IPSEC_POLICY_ENTRUST: - printf(" type=entrust }\n"); + kprintf(" type=entrust }\n"); break; default: - printf("kdebug_secpolicy: Invalid policy found. %d\n", + kprintf("kdebug_secpolicy: Invalid policy found. %d\n", sp->policy); break; } @@ -505,15 +506,15 @@ kdebug_secpolicyindex(struct secpolicyindex *spidx) if (spidx == NULL) panic("kdebug_secpolicyindex: NULL pointer was passed.\n"); - printf("secpolicyindex{ dir=%u prefs=%u prefd=%u ul_proto=%u\n", + kprintf("secpolicyindex{ dir=%u prefs=%u prefd=%u ul_proto=%u\n", spidx->dir, spidx->prefs, spidx->prefd, spidx->ul_proto); ipsec_hexdump((caddr_t)&spidx->src, ((struct sockaddr *)&spidx->src)->sa_len); - printf("\n"); + kprintf("\n"); ipsec_hexdump((caddr_t)&spidx->dst, ((struct sockaddr *)&spidx->dst)->sa_len); - printf("}\n"); + kprintf("}\n"); return; } @@ -525,15 +526,15 @@ kdebug_secasindex(struct secasindex *saidx) if (saidx == NULL) panic("kdebug_secpolicyindex: NULL pointer was passed.\n"); - printf("secasindex{ mode=%u proto=%u\n", + kprintf("secasindex{ mode=%u proto=%u\n", saidx->mode, saidx->proto); ipsec_hexdump((caddr_t)&saidx->src, ((struct sockaddr *)&saidx->src)->sa_len); - printf("\n"); + kprintf("\n"); ipsec_hexdump((caddr_t)&saidx->dst, ((struct sockaddr *)&saidx->dst)->sa_len); - printf("\n"); + kprintf("\n"); return; } @@ -545,12 +546,12 @@ kdebug_secasv(struct secasvar *sav) if (sav == NULL) panic("kdebug_secasv: NULL pointer was passed.\n"); - printf("secas{"); + kprintf("secas{"); kdebug_secasindex(&sav->sah->saidx); - printf(" refcnt=%u state=%u auth=%u enc=%u\n", + kprintf(" refcnt=%u state=%u auth=%u enc=%u\n", sav->refcnt, sav->state, sav->alg_auth, sav->alg_enc); - printf(" spi=%u flags=%u\n", + kprintf(" spi=%u flags=%u\n", (u_int32_t)ntohl(sav->spi), sav->flags); if (sav->key_auth != NULL) @@ -558,9 +559,9 @@ kdebug_secasv(struct secasvar *sav) if (sav->key_enc != NULL) kdebug_sadb_key((struct sadb_ext *)sav->key_enc); if (sav->iv != NULL) { - printf(" iv="); + kprintf(" iv="); ipsec_hexdump(sav->iv, sav->ivlen ? sav->ivlen : 8); - printf("\n"); + kprintf("\n"); } if (sav->replay != NULL) @@ -588,21 +589,21 @@ kdebug_secreplay(struct secreplay *rpl) if (rpl == NULL) panic("kdebug_secreplay: NULL pointer was passed.\n"); - printf(" secreplay{ count=%u wsize=%u seq=%u lastseq=%u", + kprintf(" secreplay{ count=%u wsize=%u seq=%u lastseq=%u", rpl->count, rpl->wsize, rpl->seq, rpl->lastseq); if (rpl->bitmap == NULL) { - printf(" }\n"); + kprintf(" }\n"); return; } - printf("\n bitmap { "); + kprintf("\n bitmap { "); for (len = 0; len < rpl->wsize; len++) { for (l = 7; l >= 0; l--) - printf("%u", (((rpl->bitmap)[len] >> l) & 1) ? 1 : 0); + kprintf("%u", (((rpl->bitmap)[len] >> l) & 1) ? 1 : 0); } - printf(" }\n"); + kprintf(" }\n"); return; } @@ -614,18 +615,18 @@ kdebug_mbufhdr(struct mbuf *m) if (m == NULL) return; - printf("mbuf(%p){ m_next:%p m_nextpkt:%p m_data:%p " + kprintf("mbuf(%p){ m_next:%p m_nextpkt:%p m_data:%p " "m_len:%d m_type:0x%02x m_flags:0x%02x }\n", m, m->m_next, m->m_nextpkt, m->m_data, m->m_len, m->m_type, m->m_flags); if (m->m_flags & M_PKTHDR) { - printf(" m_pkthdr{ len:%d rcvif:%p }\n", + kprintf(" m_pkthdr{ len:%d rcvif:%p }\n", m->m_pkthdr.len, m->m_pkthdr.rcvif); } if (m->m_flags & M_EXT) { - printf(" m_ext{ ext_buf:%p ext_free:%p " + kprintf(" m_ext{ ext_buf:%p ext_free:%p " "ext_size:%u ext_ref:%p }\n", m->m_ext.ext_buf, m->m_ext.ext_free, m->m_ext.ext_size, m->m_ext.ext_ref); @@ -642,16 +643,16 @@ kdebug_mbuf(struct mbuf *m0) for (j = 0; m; m = m->m_next) { kdebug_mbufhdr(m); - printf(" m_data:\n"); + kprintf(" m_data:\n"); for (i = 0; i < m->m_len; i++) { if (i && i % 32 == 0) - printf("\n"); + kprintf("\n"); if (i % 4 == 0) - printf(" "); - printf("%02x", mtod(m, u_char *)[i]); + kprintf(" "); + kprintf("%02x", mtod(m, u_char *)[i]); j++; } - printf("\n"); + kprintf("\n"); } return; @@ -671,19 +672,19 @@ kdebug_sockaddr(struct sockaddr *addr) panic("kdebug_sockaddr: NULL pointer was passed.\n"); /* NOTE: We deal with port number as host byte order. */ - printf("sockaddr{ len=%u family=%u", addr->sa_len, addr->sa_family); + kprintf("sockaddr{ len=%u family=%u", addr->sa_len, addr->sa_family); switch (addr->sa_family) { case AF_INET: sin4 = (struct sockaddr_in *)addr; - printf(" port=%u\n", ntohs(sin4->sin_port)); + kprintf(" port=%u\n", ntohs(sin4->sin_port)); ipsec_hexdump((caddr_t)&sin4->sin_addr, sizeof(sin4->sin_addr)); break; #ifdef INET6 case AF_INET6: sin6 = (struct sockaddr_in6 *)addr; - printf(" port=%u\n", ntohs(sin6->sin6_port)); - printf(" flowinfo=0x%08x, scope_id=0x%08x\n", + kprintf(" port=%u\n", ntohs(sin6->sin6_port)); + kprintf(" flowinfo=0x%08x, scope_id=0x%08x\n", sin6->sin6_flowinfo, sin6->sin6_scope_id); ipsec_hexdump((caddr_t)&sin6->sin6_addr, sizeof(sin6->sin6_addr)); @@ -691,7 +692,7 @@ kdebug_sockaddr(struct sockaddr *addr) #endif } - printf(" }\n"); + kprintf(" }\n"); return; } @@ -702,7 +703,7 @@ ipsec_bindump(caddr_t buf, int len) int i; for (i = 0; i < len; i++) - printf("%c", (unsigned char)buf[i]); + kprintf("%c", (unsigned char)buf[i]); return; } @@ -714,12 +715,12 @@ ipsec_hexdump(caddr_t buf, int len) int i; for (i = 0; i < len; i++) { - if (i != 0 && i % 32 == 0) printf("\n"); - if (i % 4 == 0) printf(" "); - printf("%02x", (unsigned char)buf[i]); + if (i != 0 && i % 32 == 0) kprintf("\n"); + if (i % 4 == 0) kprintf(" "); + kprintf("%02x", (unsigned char)buf[i]); } #if 0 - if (i % 32 != 0) printf("\n"); + if (i % 32 != 0) kprintf("\n"); #endif return; diff --git a/sys/netproto/key/keysock.c b/sys/netproto/key/keysock.c index 9d03474dd1..3fb368bbdc 100644 --- a/sys/netproto/key/keysock.c +++ b/sys/netproto/key/keysock.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netkey/keysock.c,v 1.1.2.4 2003/01/11 19:10:59 ume Exp $ */ -/* $DragonFly: src/sys/netproto/key/keysock.c,v 1.16 2006/11/07 18:50:07 dillon Exp $ */ +/* $DragonFly: src/sys/netproto/key/keysock.c,v 1.17 2006/12/22 23:57:54 swildner Exp $ */ /* $KAME: keysock.c,v 1.25 2001/08/13 20:07:41 itojun Exp $ */ /* @@ -182,7 +182,7 @@ key_sendup(struct socket *so, struct sadb_msg *msg, u_int len, panic("key_sendup: NULL pointer was passed.\n"); KEYDEBUG(KEYDEBUG_KEY_DUMP, - printf("key_sendup: \n"); + kprintf("key_sendup: \n"); kdebug_sadb(msg)); /* diff --git a/sys/netproto/natm/natm.c b/sys/netproto/natm/natm.c index 708eb2b9ef..56a419a038 100644 --- a/sys/netproto/natm/natm.c +++ b/sys/netproto/natm/natm.c @@ -1,6 +1,6 @@ /* $NetBSD: natm.c,v 1.5 1996/11/09 03:26:26 chuck Exp $ */ /* $FreeBSD: src/sys/netnatm/natm.c,v 1.12 2000/02/13 03:32:03 peter Exp $ */ -/* $DragonFly: src/sys/netproto/natm/natm.c,v 1.22 2006/12/20 18:14:44 dillon Exp $ */ +/* $DragonFly: src/sys/netproto/natm/natm.c,v 1.23 2006/12/22 23:57:54 swildner Exp $ */ /* * @@ -247,7 +247,7 @@ natm_usr_disconnect(struct socket *so) } if ((npcb->npcb_flags & NPCB_CONNECTED) == 0) { - printf("natm: disconnected check\n"); + kprintf("natm: disconnected check\n"); error = EIO; goto out; } @@ -566,7 +566,7 @@ natm_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam, case PRU_DISCONNECT: /* disconnect from peer */ if ((npcb->npcb_flags & NPCB_CONNECTED) == 0) { - printf("natm: disconnected check\n"); + kprintf("natm: disconnected check\n"); error = EIO; break; } @@ -683,7 +683,7 @@ natm_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam, case PRU_PROTOSEND: /* send to below */ case PRU_SOCKADDR: /* fetch socket's address */ #ifdef DIAGNOSTIC - printf("natm: PRU #%d unsupported\n", req); + kprintf("natm: PRU #%d unsupported\n", req); #endif error = EOPNOTSUPP; break; diff --git a/sys/netproto/natm/natm_pcb.c b/sys/netproto/natm/natm_pcb.c index a4aa32b827..3a29c7f3b9 100644 --- a/sys/netproto/natm/natm_pcb.c +++ b/sys/netproto/natm/natm_pcb.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/netnatm/natm_pcb.c,v 1.6.6.1 2000/08/03 18:56:28 peter Exp $ */ -/* $DragonFly: src/sys/netproto/natm/natm_pcb.c,v 1.7 2006/10/19 18:44:01 swildner Exp $ */ +/* $DragonFly: src/sys/netproto/natm/natm_pcb.c,v 1.8 2006/12/22 23:57:54 swildner Exp $ */ /* $NetBSD: natm_pcb.c,v 1.4 1996/11/09 03:26:27 chuck Exp $ */ /* @@ -168,15 +168,15 @@ npcb_dump(void) { struct natmpcb *cpcb; - printf("npcb dump:\n"); + kprintf("npcb dump:\n"); for (cpcb = natm_pcbs.lh_first ; cpcb != NULL ; cpcb = cpcb->pcblist.le_next) { - printf("if=%s, vci=%d, vpi=%d, IP=0x%x, sock=%p, flags=0x%x, inq=%d\n", + kprintf("if=%s, vci=%d, vpi=%d, IP=0x%x, sock=%p, flags=0x%x, inq=%d\n", cpcb->npcb_ifp->if_xname, cpcb->npcb_vci, cpcb->npcb_vpi, cpcb->ipaddr.s_addr, cpcb->npcb_socket, cpcb->npcb_flags, cpcb->npcb_inq); } - printf("done\n"); + kprintf("done\n"); return(0); } diff --git a/sys/netproto/ncp/ncp_conn.c b/sys/netproto/ncp/ncp_conn.c index 962a58d43e..c99cbc4e9c 100644 --- a/sys/netproto/ncp/ncp_conn.c +++ b/sys/netproto/ncp/ncp_conn.c @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * $FreeBSD: src/sys/netncp/ncp_conn.c,v 1.3.2.5 2001/02/22 08:54:11 bp Exp $ - * $DragonFly: src/sys/netproto/ncp/ncp_conn.c,v 1.13 2006/09/05 00:55:49 dillon Exp $ + * $DragonFly: src/sys/netproto/ncp/ncp_conn.c,v 1.14 2006/12/22 23:57:54 swildner Exp $ * * Connection tables */ @@ -187,7 +187,7 @@ ncp_conn_assert_locked(struct ncp_conn *conn, const char *checker, { if (conn->nc_lock.lk_flags & LK_HAVE_EXCL) return 0; - printf("%s: connection isn't locked!\n", checker); + kprintf("%s: connection isn't locked!\n", checker); return EIO; } @@ -231,7 +231,7 @@ ncp_conn_free(struct ncp_conn *ncp) return(EIO); } if (ncp->nc_id == 0) { - printf("already!!!!\n"); + kprintf("already!!!!\n"); return EACCES; } error = ncp_conn_assert_locked(ncp, __func__, ncp->td); @@ -249,7 +249,7 @@ ncp_conn_free(struct ncp_conn *ncp) ncp->nc_id = 0; while (ncp->nc_lwant) { ncp_conn_unlock(ncp, ncp->td); - printf("lwant = %d\n", ncp->nc_lwant); + kprintf("lwant = %d\n", ncp->nc_lwant); tsleep(&ncp->nc_lwant, 0, "ncpdr", 2*hz); lockmgr(&ncp->nc_lock, LK_EXCLUSIVE); } diff --git a/sys/netproto/ncp/ncp_login.c b/sys/netproto/ncp/ncp_login.c index 399ed85837..ea142ce699 100644 --- a/sys/netproto/ncp/ncp_login.c +++ b/sys/netproto/ncp/ncp_login.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/netncp/ncp_login.c,v 1.2 1999/10/12 10:36:59 bp Exp $ - * $DragonFly: src/sys/netproto/ncp/ncp_login.c,v 1.7 2006/09/05 00:55:49 dillon Exp $ + * $DragonFly: src/sys/netproto/ncp/ncp_login.c,v 1.8 2006/12/22 23:57:54 swildner Exp $ */ #include #include @@ -110,7 +110,7 @@ ncp_login_object(struct ncp_conn *conn, unsigned char *username, struct ncp_bindery_object user; if ((error = ncp_get_encryption_key(conn, ncp_key)) != 0) { - printf("%s: Warning: use unencrypted login\n", __func__); + kprintf("%s: Warning: use unencrypted login\n", __func__); return ncp_login_unencrypted(conn, login_type, username, password,td,cred); } if ((error = ncp_get_bindery_object_id(conn, login_type, username, &user,td,cred)) != 0) { diff --git a/sys/netproto/ncp/ncp_mod.c b/sys/netproto/ncp/ncp_mod.c index d8dae6aeee..22bd5ba89f 100644 --- a/sys/netproto/ncp/ncp_mod.c +++ b/sys/netproto/ncp/ncp_mod.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/netncp/ncp_mod.c,v 1.2 1999/10/12 10:36:59 bp Exp $ - * $DragonFly: src/sys/netproto/ncp/ncp_mod.c,v 1.10 2006/09/05 00:55:49 dillon Exp $ + * $DragonFly: src/sys/netproto/ncp/ncp_mod.c,v 1.11 2006/12/22 23:57:54 swildner Exp $ */ #include #include @@ -474,7 +474,7 @@ ncp_load(void) { bcopy(&sysent[ff], &oldent, sizeof(struct sysent)*SC_SIZE); bcopy(&newent, &sysent[ff], sizeof(struct sysent)*SC_SIZE); ncp_sysent = ff; /* slot in sysent[]*/ - printf("ncp_load: [%d-%d]\n",ff,i); + kprintf("ncp_load: [%d-%d]\n",ff,i); break; } @@ -485,7 +485,7 @@ static int ncp_unload(void) { ncp_done(); bcopy(&oldent, &sysent[ncp_sysent], sizeof(struct sysent) * SC_SIZE); - printf( "ncp_unload: unloaded\n"); + kprintf( "ncp_unload: unloaded\n"); return 0; } diff --git a/sys/netproto/ncp/ncp_ncp.c b/sys/netproto/ncp/ncp_ncp.c index f324bc26b4..7853ec374c 100644 --- a/sys/netproto/ncp/ncp_ncp.c +++ b/sys/netproto/ncp/ncp_ncp.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/netncp/ncp_ncp.c,v 1.3 1999/10/29 10:21:07 bp Exp $ - * $DragonFly: src/sys/netproto/ncp/ncp_ncp.c,v 1.9 2006/01/14 13:36:40 swildner Exp $ + * $DragonFly: src/sys/netproto/ncp/ncp_ncp.c,v 1.10 2006/12/22 23:57:54 swildner Exp $ * * Core of NCP protocol */ @@ -71,17 +71,17 @@ m_dumpm(struct mbuf *m) { char *p; int len; - printf("d="); + kprintf("d="); while(m) { p=mtod(m,char *); len=m->m_len; - printf("(%d)",len); + kprintf("(%d)",len); while(len--){ - printf("%02x ",((int)*(p++)) & 0xff); + kprintf("%02x ",((int)*(p++)) & 0xff); } m=m->m_next; }; - printf("\n"); + kprintf("\n"); } #endif /* NCP_DATA_DEBUG */ @@ -126,7 +126,7 @@ ncp_ncp_connect(struct ncp_conn *conn) { error = ncp_renegotiate_connparam(conn, NCP_DEFAULT_BUFSIZE, 0); if (error == NWE_SIGNATURE_LEVEL_CONFLICT) { - printf("Unable to negotiate requested security level\n"); + kprintf("Unable to negotiate requested security level\n"); error = EOPNOTSUPP; } if (error) { @@ -195,12 +195,12 @@ ncp_do_request(struct ncp_conn *conn, struct ncp_rq *rqp) { if (td == NULL) td = curthread; /* XXX maybe procpage ? */ if (!ncp_conn_valid(conn)) { - printf("%s: conn not valid\n",__func__); + kprintf("%s: conn not valid\n",__func__); return (error); } so = conn->ncp_so; if (!so) { - printf("%s: ncp_so is NULL !\n",__func__); + kprintf("%s: ncp_so is NULL !\n",__func__); ncp_conn_invalidate(conn); /* wow ! how we do that ? */ return EBADF; } @@ -279,7 +279,7 @@ ncp_do_request(struct ncp_conn *conn, struct ncp_rq *rqp) { if (m->m_len < sizeof(*rp)) { m = m_pullup(m, sizeof(*rp)); if (m == NULL) { - printf("%s: reply too short\n",__func__); + kprintf("%s: reply too short\n",__func__); continue; } } @@ -363,11 +363,11 @@ ncp_restore_login(struct ncp_conn *conn) { int error, oldflags; if (conn->flags & NCPFL_RESTORING) { - printf("Hey, ncp_restore_login called twise !!!\n"); + kprintf("Hey, ncp_restore_login called twise !!!\n"); return 0; } oldflags = conn->flags; - printf("Restoring connection, flags = %d\n",oldflags); + kprintf("Restoring connection, flags = %d\n",oldflags); if ((oldflags & NCPFL_LOGGED) == 0) { return ECONNRESET; /* no need to restore empty conn */ } @@ -468,7 +468,7 @@ ncp_renegotiate_connparam(struct ncp_conn *conn, int buffsize, int in_options) #ifdef IPX if ((options ^ in_options) & NCP_IPX_CHECKSUM) { if (ipxcksum == 2) { - printf("Server refuses to support IPX checksums\n"); + kprintf("Server refuses to support IPX checksums\n"); return NWE_REQUESTER_FAILURE; } in_options |= NCP_IPX_CHECKSUM; diff --git a/sys/netproto/ncp/ncp_nls.c b/sys/netproto/ncp/ncp_nls.c index e1ebbb4b8d..8e3c1c0822 100644 --- a/sys/netproto/ncp/ncp_nls.c +++ b/sys/netproto/ncp/ncp_nls.c @@ -32,7 +32,7 @@ * Character conversion routines * * $FreeBSD: src/sys/netncp/ncp_nls.c,v 1.4 2000/01/29 02:10:37 bp Exp $ - * $DragonFly: src/sys/netproto/ncp/ncp_nls.c,v 1.4 2006/01/14 13:36:40 swildner Exp $ + * $DragonFly: src/sys/netproto/ncp/ncp_nls.c,v 1.5 2006/12/22 23:57:54 swildner Exp $ */ #include #include @@ -271,7 +271,7 @@ ncp_pathcopy(char *src, char *dst, int len, struct ncp_nlstables *nt) src++; } } -/* printf("fromux: %s:%s\n", s, d);*/ +/* kprintf("fromux: %s:%s\n", s, d);*/ } /* @@ -284,7 +284,7 @@ ncp_path2unix(char *src, char *dst, int len, struct ncp_nlstables *nt) u_char c, *tbl; /* char *d = dst, *s = src;*/ -/* printf("toux(%02x): %s:",nt->opt, s);*/ +/* kprintf("toux(%02x): %s:",nt->opt, s);*/ donls = (nt && (nt->opt & NWHP_NLS)); if ((nt->opt & (NWHP_UPPER | NWHP_LOWER)) == 0) { while (len--) { @@ -302,5 +302,5 @@ ncp_path2unix(char *src, char *dst, int len, struct ncp_nlstables *nt) dst++; src++; } -/* printf("%s\n", d);*/ +/* kprintf("%s\n", d);*/ } diff --git a/sys/netproto/ncp/ncp_rq.c b/sys/netproto/ncp/ncp_rq.c index 48ebfac355..6a14674d5c 100644 --- a/sys/netproto/ncp/ncp_rq.c +++ b/sys/netproto/ncp/ncp_rq.c @@ -32,7 +32,7 @@ * Routines to prepare request and fetch reply * * $FreeBSD: src/sys/netncp/ncp_rq.c,v 1.1.2.1 2001/05/21 16:27:20 ru Exp $ - * $DragonFly: src/sys/netproto/ncp/ncp_rq.c,v 1.9 2006/01/14 13:36:40 swildner Exp $ + * $DragonFly: src/sys/netproto/ncp/ncp_rq.c,v 1.10 2006/12/22 23:57:54 swildner Exp $ */ #include #include @@ -359,7 +359,7 @@ ncp_rp_mem(struct ncp_rq *rqp,caddr_t target, int size) { while (size > 0) { if (m==0) { /* should be panic */ - printf("ncp_rp_mem: incomplete copy\n"); + kprintf("ncp_rp_mem: incomplete copy\n"); return; } count = mtod(m,caddr_t)+m->m_len-rqp->bpos; @@ -386,7 +386,7 @@ ncp_rp_usermem(struct ncp_rq *rqp,caddr_t target, int size) { while (size>0) { if (m==0) { /* should be panic */ - printf("ncp_rp_mem: incomplete copy\n"); + kprintf("ncp_rp_mem: incomplete copy\n"); return EFAULT; } count = mtod(m,caddr_t)+m->m_len-rqp->bpos; @@ -414,7 +414,7 @@ ncp_rp_mbuf(struct ncp_rq *rqp, int size) { rm = m_copym(m, rqp->bpos - mtod(m,caddr_t), size, MB_WAIT); while (size > 0) { if (m == 0) { - printf("ncp_rp_mbuf: can't advance\n"); + kprintf("ncp_rp_mbuf: can't advance\n"); return rm; } count = mtod(m,caddr_t)+ m->m_len - rqp->bpos; diff --git a/sys/netproto/ncp/ncp_sock.c b/sys/netproto/ncp/ncp_sock.c index 342630a460..dec3ca4bf3 100644 --- a/sys/netproto/ncp/ncp_sock.c +++ b/sys/netproto/ncp/ncp_sock.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/netncp/ncp_sock.c,v 1.2 1999/10/12 10:36:59 bp Exp $ - * $DragonFly: src/sys/netproto/ncp/ncp_sock.c,v 1.14 2006/06/13 08:12:04 dillon Exp $ + * $DragonFly: src/sys/netproto/ncp/ncp_sock.c,v 1.15 2006/12/22 23:57:54 swildner Exp $ * * Low level socket routines */ @@ -158,7 +158,7 @@ ncp_sock_recv(struct socket *so, struct mbuf **mp, int *rlen) *rlen=0;*/ #ifdef NCP_SOCKET_DEBUG if (error) - printf("ncp_recv: err=%d\n", error); + kprintf("ncp_recv: err=%d\n", error); #endif return (error); } @@ -243,7 +243,7 @@ retry: done: p->p_flag &= ~P_SELECT; if (error == ERESTART) { -/* printf("Signal: %x", CURSIG(p));*/ +/* kprintf("Signal: %x", CURSIG(p));*/ error = 0; } return (error); diff --git a/sys/netproto/ncp/ncp_subr.c b/sys/netproto/ncp/ncp_subr.c index 0749bc7463..081b996643 100644 --- a/sys/netproto/ncp/ncp_subr.c +++ b/sys/netproto/ncp/ncp_subr.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/netncp/ncp_subr.c,v 1.2.2.1 2001/02/22 08:54:11 bp Exp $ - * $DragonFly: src/sys/netproto/ncp/ncp_subr.c,v 1.9 2006/09/05 00:55:49 dillon Exp $ + * $DragonFly: src/sys/netproto/ncp/ncp_subr.c,v 1.10 2006/12/22 23:57:54 swildner Exp $ */ #include #include @@ -170,7 +170,7 @@ ncp_get_bindery_object_id(struct ncp_conn *conn, ncp_rq_pstring(rqp, object_name); checkbad(ncp_request(conn,rqp)); if (rqp->rpsize < 54) { - printf("ncp_rp_size %d < 54\n", rqp->rpsize); + kprintf("ncp_rp_size %d < 54\n", rqp->rpsize); error = EINVAL; goto bad; } @@ -228,7 +228,7 @@ ncp_write(struct ncp_conn *conn, ncp_fh *file, struct uio *uiop, struct ucred *c DECLARE_RQ; if (uiop->uio_iovcnt != 1) { - printf("%s: can't handle iovcnt>1 !!!\n", __func__); + kprintf("%s: can't handle iovcnt>1 !!!\n", __func__); return EIO; } tsiz = uiop->uio_resid; @@ -236,7 +236,7 @@ ncp_write(struct ncp_conn *conn, ncp_fh *file, struct uio *uiop, struct ucred *c len = min(4096 - (uiop->uio_offset % 4096), tsiz); len = min(len, conn->buffer_size); if (len == 0) { - printf("gotcha!\n"); + kprintf("gotcha!\n"); } /* rq head */ NCP_RQ_HEAD(73,uiop->uio_td,cred); diff --git a/sys/netproto/ncp/ncp_subr.h b/sys/netproto/ncp/ncp_subr.h index 5a78ff4111..5aff3fe6d8 100644 --- a/sys/netproto/ncp/ncp_subr.h +++ b/sys/netproto/ncp/ncp_subr.h @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/netncp/ncp_subr.h,v 1.3 2000/01/14 19:54:39 bde Exp $ - * $DragonFly: src/sys/netproto/ncp/ncp_subr.h,v 1.6 2005/02/28 16:23:00 joerg Exp $ + * $DragonFly: src/sys/netproto/ncp/ncp_subr.h,v 1.7 2006/12/22 23:57:54 swildner Exp $ */ #ifndef _NETNCP_NCP_SUBR_H_ #define _NETNCP_NCP_SUBR_H_ @@ -42,21 +42,21 @@ SIGISMEMBER(set, SIGQUIT)) -#define NCP_PRINT(format, args...) printf("FATAL: %s: "format, __func__ ,## args) +#define NCP_PRINT(format, args...) kprintf("FATAL: %s: "format, __func__ ,## args) #define nwfs_printf NCP_PRINT /* Maybe this should panic, but I dont like that */ #define NCPFATAL NCP_PRINT /* socket debugging */ #ifdef NCP_SOCKET_DEBUG -#define NCPSDEBUG(format, args...) printf("%s: "format, __func__ ,## args) +#define NCPSDEBUG(format, args...) kprintf("%s: "format, __func__ ,## args) #else #define NCPSDEBUG(format, args...) #endif /* NCP calls debug */ #ifdef NCP_NCP_DEBUG -#define NCPNDEBUG(format, args...) printf("%s: "format, __func__ ,## args) +#define NCPNDEBUG(format, args...) kprintf("%s: "format, __func__ ,## args) #else #define NCPNDEBUG(format, args...) #endif @@ -70,14 +70,14 @@ /* FS VOPS debug */ #ifdef NWFS_VOPS_DEBUG -#define NCPVODEBUG(format, args...) printf("%s: "format, __func__ ,## args) +#define NCPVODEBUG(format, args...) kprintf("%s: "format, __func__ ,## args) #else #define NCPVODEBUG(format, args...) #endif /* FS VNOPS debug */ #ifdef NWFS_VNOPS_DEBUG -#define NCPVNDEBUG(format, args...) printf("%s: "format, __func__ ,## args) +#define NCPVNDEBUG(format, args...) kprintf("%s: "format, __func__ ,## args) #else #define NCPVNDEBUG(format, args...) #endif diff --git a/sys/netproto/ns/ns.c b/sys/netproto/ns/ns.c index c096d41b72..30958d3e60 100644 --- a/sys/netproto/ns/ns.c +++ b/sys/netproto/ns/ns.c @@ -32,7 +32,7 @@ * * @(#)ns.c 8.2 (Berkeley) 11/15/93 * $FreeBSD: src/sys/netns/ns.c,v 1.9 1999/08/28 00:49:47 peter Exp $ - * $DragonFly: src/sys/netproto/ns/ns.c,v 1.13 2006/09/05 00:55:49 dillon Exp $ + * $DragonFly: src/sys/netproto/ns/ns.c,v 1.14 2006/12/22 23:57:54 swildner Exp $ */ #include @@ -203,7 +203,7 @@ ns_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp, if (ia->ia_next) ia->ia_next = oia->ia_next; else - printf("Didn't unlink nsifadr from list\n"); + kprintf("Didn't unlink nsifadr from list\n"); } IFAFREE((&oia->ia_ifa)); if (0 == --ns_interfaces) { diff --git a/sys/netproto/ns/ns_error.c b/sys/netproto/ns/ns_error.c index 9e66bd8fe9..a190d6615e 100644 --- a/sys/netproto/ns/ns_error.c +++ b/sys/netproto/ns/ns_error.c @@ -32,7 +32,7 @@ * * @(#)ns_error.c 8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/netns/ns_error.c,v 1.9 1999/08/28 00:49:49 peter Exp $ - * $DragonFly: src/sys/netproto/ns/ns_error.c,v 1.10 2006/01/14 13:36:40 swildner Exp $ + * $DragonFly: src/sys/netproto/ns/ns_error.c,v 1.11 2006/12/22 23:57:54 swildner Exp $ */ #include @@ -115,7 +115,7 @@ ns_error(struct mbuf *om, int type, int param) #ifdef NS_ERRPRINTFS if (ns_errprintfs) - printf("ns_err_error(%x, %d, %d)\n", oip, type, param); + kprintf("ns_err_error(%x, %d, %d)\n", oip, type, param); #endif /* * Don't Generate error packets in response to multicasts. @@ -175,7 +175,7 @@ void ns_printhost(struct ns_addr *p) { - printf("", + kprintf("", p->x_net.s_net[0], p->x_net.s_net[1], p->x_host.s_host[0], @@ -204,9 +204,9 @@ ns_err_input(struct mbuf *m) */ #ifdef NS_ERRPRINTFS if (ns_errprintfs) { - printf("ns_err_input from "); + kprintf("ns_err_input from "); ns_printhost(&epidp->ns_ep_idp.idp_sna); - printf("len %d\n", ntohs(epidp->ns_ep_idp.idp_len)); + kprintf("len %d\n", ntohs(epidp->ns_ep_idp.idp_len)); } #endif i = sizeof (struct ns_epidp); @@ -225,7 +225,7 @@ ns_err_input(struct mbuf *m) * Message type specific processing. */ if (ns_errprintfs) - printf("ns_err_input, type %d param %d\n", type, param); + kprintf("ns_err_input, type %d param %d\n", type, param); #endif if (type >= NS_ERR_TOO_BIG) { goto badcode; @@ -266,7 +266,7 @@ ns_err_input(struct mbuf *m) */ #ifdef NS_ERRPRINTFS if (ns_errprintfs) - printf("deliver to protocol %d\n", + kprintf("deliver to protocol %d\n", ep->ns_err_idp.idp_pt); #endif switch(ep->ns_err_idp.idp_pt) { diff --git a/sys/netproto/ns/ns_input.c b/sys/netproto/ns/ns_input.c index db5f1794f1..306ea13571 100644 --- a/sys/netproto/ns/ns_input.c +++ b/sys/netproto/ns/ns_input.c @@ -32,7 +32,7 @@ * * @(#)ns_input.c 8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/netns/ns_input.c,v 1.13 2000/02/13 03:32:04 peter Exp $ - * $DragonFly: src/sys/netproto/ns/ns_input.c,v 1.18 2006/05/20 06:32:41 dillon Exp $ + * $DragonFly: src/sys/netproto/ns/ns_input.c,v 1.19 2006/12/22 23:57:54 swildner Exp $ */ #include @@ -314,11 +314,11 @@ idp_forward(struct mbuf *m) int ok_back = 0; if (idpprintfs) { - printf("forward: src "); + kprintf("forward: src "); ns_printhost(&idp->idp_sna); - printf(", dst "); + kprintf(", dst "); ns_printhost(&idp->idp_dna); - printf("hop count %d\n", idp->idp_tc); + kprintf("hop count %d\n", idp->idp_tc); } if (idpforwarding == 0) { /* can't tell difference between net and host */ diff --git a/sys/netproto/ns/spp_debug.c b/sys/netproto/ns/spp_debug.c index e3a92f0e92..c36b49613a 100644 --- a/sys/netproto/ns/spp_debug.c +++ b/sys/netproto/ns/spp_debug.c @@ -32,7 +32,7 @@ * * @(#)spp_debug.c 8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/netns/spp_debug.c,v 1.10 1999/08/28 00:49:52 peter Exp $ - * $DragonFly: src/sys/netproto/ns/spp_debug.c,v 1.6 2006/01/14 13:36:40 swildner Exp $ + * $DragonFly: src/sys/netproto/ns/spp_debug.c,v 1.7 2006/12/22 23:57:54 swildner Exp $ */ #include "opt_inet.h" @@ -102,10 +102,10 @@ spp_trace(short act, u_char ostate, struct sppcb *sp, struct spidp *si, int req) if (ostate >= TCP_NSTATES) ostate = 0; if (act >= SA_DROP) act = SA_DROP; if (sp) - printf("%x %s:", sp, tcpstates[ostate]); + kprintf("%x %s:", sp, tcpstates[ostate]); else - printf("???????? "); - printf("%s ", sanames[act]); + kprintf("???????? "); + kprintf("%s ", sanames[act]); switch (act) { case SA_RESPOND: @@ -125,48 +125,48 @@ spp_trace(short act, u_char ostate, struct sppcb *sp, struct spidp *si, int req) len = ntohs(len); } #ifndef lint -#define p1(f) { printf("%s = %x, ", "f", f); } +#define p1(f) { kprintf("%s = %x, ", "f", f); } p1(seq); p1(ack); p1(alo); p1(len); #endif flags = si->si_cc; if (flags) { char *cp = "<"; #ifndef lint -#define pf(f) { if (flags&SP_/**/f) { printf("%s%s", cp, "f"); cp = ","; } } +#define pf(f) { if (flags&SP_/**/f) { kprintf("%s%s", cp, "f"); cp = ","; } } pf(SP); pf(SA); pf(OB); pf(EM); #else cp = cp; #endif - printf(">"); + kprintf(">"); } #ifndef lint -#define p2(f) { printf("%s = %x, ", "f", si->si_/**/f); } +#define p2(f) { kprintf("%s = %x, ", "f", si->si_/**/f); } p2(sid);p2(did);p2(dt);p2(pt); #endif ns_printhost(&si->si_sna); ns_printhost(&si->si_dna); if (act==SA_RESPOND) { - printf("idp_len = %x, ", + kprintf("idp_len = %x, ", ((struct idp *)si)->idp_len); } break; case SA_USER: - printf("%s", prurequests[req&0xff]); + kprintf("%s", prurequests[req&0xff]); if ((req & 0xff) == PRU_SLOWTIMO) - printf("<%s>", spptimers[req>>8]); + kprintf("<%s>", spptimers[req>>8]); break; } if (sp) - printf(" -> %s", tcpstates[sp->s_state]); + kprintf(" -> %s", tcpstates[sp->s_state]); /* print out internal state of sp !?! */ - printf("\n"); + kprintf("\n"); if (sp == 0) return; #ifndef lint -#define p3(f) { printf("%s = %x, ", "f", sp->s_/**/f); } - printf("\t"); p3(rack);p3(ralo);p3(smax);p3(flags); printf("\n"); +#define p3(f) { kprintf("%s = %x, ", "f", sp->s_/**/f); } + kprintf("\t"); p3(rack);p3(ralo);p3(smax);p3(flags); kprintf("\n"); #endif #endif #endif diff --git a/sys/netproto/ns/spp_usrreq.c b/sys/netproto/ns/spp_usrreq.c index 5ce83f4a69..4de828ebe0 100644 --- a/sys/netproto/ns/spp_usrreq.c +++ b/sys/netproto/ns/spp_usrreq.c @@ -32,7 +32,7 @@ * * @(#)spp_usrreq.c 8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/netns/spp_usrreq.c,v 1.11 1999/08/28 00:49:53 peter Exp $ - * $DragonFly: src/sys/netproto/ns/spp_usrreq.c,v 1.19 2006/12/05 23:31:57 dillon Exp $ + * $DragonFly: src/sys/netproto/ns/spp_usrreq.c,v 1.20 2006/12/22 23:57:54 swildner Exp $ */ #include @@ -1828,7 +1828,7 @@ spp_timers(struct sppcb *cb, int timer) * control block. */ case SPPT_2MSL: - printf("spp: SPPT_2MSL went off for no reason\n"); + kprintf("spp: SPPT_2MSL went off for no reason\n"); cb->s_timer[timer] = 0; break; diff --git a/sys/netproto/smb/smb_dev.c b/sys/netproto/smb/smb_dev.c index 761507e0bf..2dcee62ff6 100644 --- a/sys/netproto/smb/smb_dev.c +++ b/sys/netproto/smb/smb_dev.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/netsmb/smb_dev.c,v 1.2.2.1 2001/05/22 08:32:33 bp Exp $ - * $DragonFly: src/sys/netproto/smb/smb_dev.c,v 1.16 2006/09/10 01:26:40 dillon Exp $ + * $DragonFly: src/sys/netproto/smb/smb_dev.c,v 1.17 2006/12/22 23:57:54 swildner Exp $ */ #include #include @@ -347,14 +347,14 @@ nsmb_dev_load(module_t mod, int cmd, void *arg) break; } dev_ops_add(&nsmb_ops, 0, 0); - printf("netsmb_dev: loaded\n"); + kprintf("netsmb_dev: loaded\n"); break; case MOD_UNLOAD: smb_iod_done(); error = smb_sm_done(); error = 0; dev_ops_remove(&nsmb_ops, 0, 0); - printf("netsmb_dev: unloaded\n"); + kprintf("netsmb_dev: unloaded\n"); break; default: error = EINVAL; diff --git a/sys/netproto/smb/smb_subr.c b/sys/netproto/smb/smb_subr.c index 488fb028f6..42792425bd 100644 --- a/sys/netproto/smb/smb_subr.c +++ b/sys/netproto/smb/smb_subr.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/netsmb/smb_subr.c,v 1.1.2.2 2001/09/03 08:55:11 bp Exp $ - * $DragonFly: src/sys/netproto/smb/smb_subr.c,v 1.23 2006/12/18 20:41:02 dillon Exp $ + * $DragonFly: src/sys/netproto/smb/smb_subr.c,v 1.24 2006/12/22 23:57:54 swildner Exp $ */ #include #include @@ -194,17 +194,17 @@ void m_dumpm(struct mbuf *m) { char *p; int len; - printf("d="); + kprintf("d="); while(m) { p=mtod(m,char *); len=m->m_len; - printf("(%d)",len); + kprintf("(%d)",len); while(len--){ - printf("%02x ",((int)*(p++)) & 0xff); + kprintf("%02x ",((int)*(p++)) & 0xff); } m=m->m_next; }; - printf("\n"); + kprintf("\n"); } #endif diff --git a/sys/netproto/smb/smb_subr.h b/sys/netproto/smb/smb_subr.h index b47570fcbd..c64e21310f 100644 --- a/sys/netproto/smb/smb_subr.h +++ b/sys/netproto/smb/smb_subr.h @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/netsmb/smb_subr.h,v 1.1.2.1 2001/05/22 08:32:34 bp Exp $ - * $DragonFly: src/sys/netproto/smb/smb_subr.h,v 1.14 2006/06/04 21:09:50 dillon Exp $ + * $DragonFly: src/sys/netproto/smb/smb_subr.h,v 1.15 2006/12/22 23:57:54 swildner Exp $ */ #ifndef _NETSMB_SMB_SUBR_H_ #define _NETSMB_SMB_SUBR_H_ @@ -48,17 +48,17 @@ MALLOC_DECLARE(M_SMBTEMP); */ #define PDROP PUSRFLAG1 /* OR'd with pri to stop re-entry of interlock mutex */ -#define SMBERROR(format, args...) printf("%s: "format, __func__ ,## args) -#define SMBPANIC(format, args...) printf("%s: "format, __func__ ,## args) +#define SMBERROR(format, args...) kprintf("%s: "format, __func__ ,## args) +#define SMBPANIC(format, args...) kprintf("%s: "format, __func__ ,## args) #ifdef SMB_SOCKET_DEBUG -#define SMBSDEBUG(format, args...) printf("%s: "format, __func__ ,## args) +#define SMBSDEBUG(format, args...) kprintf("%s: "format, __func__ ,## args) #else #define SMBSDEBUG(format, args...) #endif #ifdef SMB_IOD_DEBUG -#define SMBIODEBUG(format, args...) printf("%s: "format, __func__ ,## args) +#define SMBIODEBUG(format, args...) kprintf("%s: "format, __func__ ,## args) #else #define SMBIODEBUG(format, args...) #endif diff --git a/sys/netproto/smb/smb_trantcp.h b/sys/netproto/smb/smb_trantcp.h index 0e8b9b7f49..3825279284 100644 --- a/sys/netproto/smb/smb_trantcp.h +++ b/sys/netproto/smb/smb_trantcp.h @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/netsmb/smb_trantcp.h,v 1.1.2.1 2001/05/22 08:32:34 bp Exp $ - * $DragonFly: src/sys/netproto/smb/smb_trantcp.h,v 1.3 2005/02/17 14:00:09 joerg Exp $ + * $DragonFly: src/sys/netproto/smb/smb_trantcp.h,v 1.4 2006/12/22 23:57:54 swildner Exp $ */ #ifndef _NETSMB_SMB_TRANTCP_H_ #define _NETSMB_SMB_TRANTCP_H_ @@ -38,7 +38,7 @@ #ifdef _KERNEL #ifdef NB_DEBUG -#define NBDEBUG(format, args...) printf("%s(%d): "format, \ +#define NBDEBUG(format, args...) kprintf("%s(%d): "format, \ __func__ , __LINE__ ,## args) #else #define NBDEBUG(format, args...) -- 2.41.0