summaryrefslogtreecommitdiffstats
path: root/sys/netatm/spans
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1998-09-17 09:35:02 +0000
committerphk <phk@FreeBSD.org>1998-09-17 09:35:02 +0000
commit231bd37d3c3215f2bf6cccc1a4f6d79ac7e1b167 (patch)
tree28f16d9c354c723093e7fcf66c873381205685c1 /sys/netatm/spans
parent399a16928fecfe7a1b87962aa2146351791bb090 (diff)
downloadFreeBSD-src-231bd37d3c3215f2bf6cccc1a4f6d79ac7e1b167.zip
FreeBSD-src-231bd37d3c3215f2bf6cccc1a4f6d79ac7e1b167.tar.gz
Two patches from the HARP people:
Various Makefile related fixes. -Wformat fixes. Submitted by: Mike Spengler <mks@networkcs.com>
Diffstat (limited to 'sys/netatm/spans')
-rw-r--r--sys/netatm/spans/spans_if.c22
-rw-r--r--sys/netatm/spans/spans_msg.c22
-rw-r--r--sys/netatm/spans/spans_print.c10
-rw-r--r--sys/netatm/spans/spans_proto.c31
-rw-r--r--sys/netatm/spans/spans_subr.c14
-rw-r--r--sys/netatm/spans/spans_util.c8
6 files changed, 53 insertions, 54 deletions
diff --git a/sys/netatm/spans/spans_if.c b/sys/netatm/spans/spans_if.c
index 4facf73..6546ae2 100644
--- a/sys/netatm/spans/spans_if.c
+++ b/sys/netatm/spans/spans_if.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: spans_if.c,v 1.12 1998/08/26 23:29:09 mks Exp $
+ * @(#) $Id: spans_if.c,v 1.1 1998/09/15 08:23:03 phk Exp $
*
*/
@@ -37,7 +37,7 @@
*/
#ifndef lint
-static char *RCSid = "@(#) $Id: spans_if.c,v 1.12 1998/08/26 23:29:09 mks Exp $";
+static char *RCSid = "@(#) $Id: spans_if.c,v 1.1 1998/09/15 08:23:03 phk Exp $";
#endif
#ifndef ATM_SPANS_MODULE
@@ -256,7 +256,7 @@ spans_attach(smp, pip)
struct spans *spp = NULL;
struct atm_nif *np;
- ATM_DEBUG2("spans_attach: smp=%x, pip=%x\n", smp, pip);
+ ATM_DEBUG2("spans_attach: smp=%p, pip=%p\n", smp, pip);
/*
* Count network interfaces attached to the physical interface.
@@ -377,7 +377,7 @@ spans_detach(pip)
Atm_connection *cop;
int err;
- ATM_DEBUG1("spans_detach: pip=0x%x\n", pip);
+ ATM_DEBUG1("spans_detach: pip=%p\n", pip);
/*
* Get SPANS protocol instance
@@ -420,7 +420,7 @@ spans_detach(pip)
*/
err = spans_clear_vcc(spp, (struct spans_vccb *)vcp);
if (err) {
- log(LOG_ERR, "spans: error %d clearing VCCB 0x%x\n",
+ log(LOG_ERR, "spans: error %d clearing VCCB %p\n",
err, vcp);
}
}
@@ -432,7 +432,7 @@ spans_detach(pip)
err = atm_cm_release(cop, &spans_cause);
if (err)
ATM_DEBUG2(
- "spans_detach: close failed for SPANS signalling channel; cop=0x%x, err=%d\n",
+ "spans_detach: close failed for SPANS signalling channel; cop=%p, err=%d\n",
cop, err);
}
@@ -494,7 +494,7 @@ spans_setup(cvp, errp)
struct spans *spp = (struct spans *)pip->pif_siginst;
int rc = 0;
- ATM_DEBUG1("spans_setup: cvp=0x%x\n", cvp);
+ ATM_DEBUG1("spans_setup: cvp=%p\n", cvp);
/*
* Intialize the returned error code
@@ -560,7 +560,7 @@ spans_release(vcp, errp)
struct atm_pif *pip = vcp->vc_pif;
struct spans *spp = (struct spans *)pip->pif_siginst;
- ATM_DEBUG1("spans_release: vcp=0x%x\n", vcp);
+ ATM_DEBUG1("spans_release: vcp=%p\n", vcp);
/*
* Initialize returned error code
@@ -632,7 +632,7 @@ spans_accept(vcp, errp)
struct spans *spp = (struct spans *)pip->pif_siginst;
struct spans_vccb *svp = (struct spans_vccb *)vcp;
- ATM_DEBUG1("spans_accept: vcp=0x%x\n", vcp);
+ ATM_DEBUG1("spans_accept: vcp=%p\n", vcp);
/*
* Initialize the returned error code
@@ -704,7 +704,7 @@ spans_reject(vcp, errp)
struct spans *spp = (struct spans *)pip->pif_siginst;
struct spans_vccb *svp = (struct spans_vccb *)vcp;
- ATM_DEBUG1("spans_reject: vcp=0x%x\n", vcp);
+ ATM_DEBUG1("spans_reject: vcp=%p\n", vcp);
/*
* Initialize the returned error code
@@ -818,7 +818,7 @@ spans_free(vcp)
struct atm_pif *pip = vcp->vc_pif;
struct spans *spp = (struct spans *)pip->pif_siginst;
- ATM_DEBUG1("spans_free: vcp = 0x%x\n", vcp);
+ ATM_DEBUG1("spans_free: vcp = %p\n", vcp);
/*
* Make sure VCC has been closed
diff --git a/sys/netatm/spans/spans_msg.c b/sys/netatm/spans/spans_msg.c
index 0dc5df9..1ce9a50 100644
--- a/sys/netatm/spans/spans_msg.c
+++ b/sys/netatm/spans/spans_msg.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: spans_msg.c,v 1.8 1998/08/26 23:29:09 mks Exp $
+ * @(#) $Id: spans_msg.c,v 1.1 1998/09/15 08:23:03 phk Exp $
*
*/
@@ -36,7 +36,7 @@
*/
#ifndef lint
-static char *RCSid = "@(#) $Id: spans_msg.c,v 1.8 1998/08/26 23:29:09 mks Exp $";
+static char *RCSid = "@(#) $Id: spans_msg.c,v 1.1 1998/09/15 08:23:03 phk Exp $";
#endif
#include <netatm/kern_include.h>
@@ -136,7 +136,7 @@ spans_send_msg(spp, msg)
XDR xdrs;
#ifdef NOTDEF
- ATM_DEBUG2("spans_send_msg: msg=0x%x, type=%d\n", msg,
+ ATM_DEBUG2("spans_send_msg: msg=%p, type=%d\n", msg,
msg->sm_type);
if (msg->sm_type != SPANS_STAT_REQ &&
msg->sm_type != SPANS_STAT_IND &&
@@ -207,7 +207,7 @@ spans_send_open_req(spp, svp)
spans_msg *req;
int err = 0;
- ATM_DEBUG1("spans_send_open_req: svp=0x%x\n", svp);
+ ATM_DEBUG1("spans_send_open_req: svp=%p\n", svp);
/*
* Get memory for a request message
@@ -265,7 +265,7 @@ spans_send_open_rsp(spp, svp, result)
spans_msg *rsp;
int rc;
- ATM_DEBUG2("spans_send_open_rsp: svp=0x%x, result=%d\n", svp,
+ ATM_DEBUG2("spans_send_open_rsp: svp=%p, result=%d\n", svp,
result);
/*
@@ -317,7 +317,7 @@ spans_send_close_req(spp, svp)
spans_msg *req;
int err = 0;
- ATM_DEBUG1("spans_send_close_req: svp=0x%x\n", svp);
+ ATM_DEBUG1("spans_send_close_req: svp=%p\n", svp);
/*
* Get memory for a close request
@@ -540,7 +540,7 @@ spans_open_req(spp, msg)
Aal_t aal;
Atm_attributes call_attrs;
- ATM_DEBUG2("spans_open_req: spp=0x%x, msg=0x%x\n", spp, msg);
+ ATM_DEBUG2("spans_open_req: spp=%p, msg=%p\n", spp, msg);
/*
* See if the connection is new
@@ -833,7 +833,7 @@ spans_open_rsp(spp, msg)
{
struct spans_vccb *svp;
- ATM_DEBUG2("spans_open_rsp: spp=0x%x, msg=0x%x\n", spp, msg);
+ ATM_DEBUG2("spans_open_rsp: spp=%p, msg=%p\n", spp, msg);
/*
* Locate the VCCB for the connection
@@ -935,7 +935,7 @@ spans_close_req(spp, msg)
u_char outstate;
Atm_connvc *cvp;
- ATM_DEBUG2("spans_close_req: spp=0x%x, msg=0x%x\n", spp, msg);
+ ATM_DEBUG2("spans_close_req: spp=%p, msg=%p\n", spp, msg);
/*
* Locate the VCCB for the connection
@@ -1055,7 +1055,7 @@ spans_close_rsp(spp, msg)
{
struct spans_vccb *svp;
- ATM_DEBUG2("spans_close_rsp: spp=0x%x, msg=0x%x\n", spp, msg);
+ ATM_DEBUG2("spans_close_rsp: spp=%p, msg=%p\n", spp, msg);
/*
* Locate the VCCB for the connection
@@ -1371,7 +1371,7 @@ spans_query_req(spp, msg)
struct spans_vccb *svp = NULL;
spans_msg *rsp_msg;
- ATM_DEBUG1("spans_query_req: msg=0x%x\n", msg);
+ ATM_DEBUG1("spans_query_req: msg=%p\n", msg);
/*
* Ignore an end-to-end query
diff --git a/sys/netatm/spans/spans_print.c b/sys/netatm/spans/spans_print.c
index 60dc670..117324c 100644
--- a/sys/netatm/spans/spans_print.c
+++ b/sys/netatm/spans/spans_print.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: spans_print.c,v 1.4 1997/05/06 22:17:11 mks Exp $
+ * @(#) $Id: spans_print.c,v 1.1 1998/09/15 08:23:03 phk Exp $
*
*/
@@ -36,7 +36,7 @@
*/
#ifndef lint
-static char *RCSid = "@(#) $Id: spans_print.c,v 1.4 1997/05/06 22:17:11 mks Exp $";
+static char *RCSid = "@(#) $Id: spans_print.c,v 1.1 1998/09/15 08:23:03 phk Exp $";
#endif
#include <netatm/kern_include.h>
@@ -876,7 +876,7 @@ spans_print_msgbody(objp)
switch (objp->mb_type) {
case SPANS_STAT_REQ:
streq_p = &objp->spans_msgbody_u.mb_stat_req;
- printf("es_epoch=0x%x", streq_p->streq_es_epoch);
+ printf("es_epoch=0x%lx", streq_p->streq_es_epoch);
break;
case SPANS_STAT_IND:
stind_p = &objp->spans_msgbody_u.mb_stat_ind;
@@ -884,7 +884,7 @@ spans_print_msgbody(objp)
sizeof(daddr));
strncpy(saddr, spans_addr_print(&stind_p->stind_sw_addr),
sizeof(daddr));
- printf("sw_epoch=0x%x, es_addr=%s, sw_addr=0x%s",
+ printf("sw_epoch=0x%lx, es_addr=%s, sw_addr=0x%s",
stind_p->stind_sw_epoch,
daddr, saddr);
break;
@@ -892,7 +892,7 @@ spans_print_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%x, es_addr=%s",
+ printf("es_epoch=0x%lx, es_addr=%s",
strsp_p->strsp_es_epoch, daddr);
break;
case SPANS_OPEN_REQ:
diff --git a/sys/netatm/spans/spans_proto.c b/sys/netatm/spans/spans_proto.c
index e298ed8..b0e0f1e 100644
--- a/sys/netatm/spans/spans_proto.c
+++ b/sys/netatm/spans/spans_proto.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: spans_proto.c,v 1.7 1998/08/26 23:29:10 mks Exp $
+ * @(#) $Id: spans_proto.c,v 1.1 1998/09/15 08:23:03 phk Exp $
*
*/
@@ -36,7 +36,7 @@
*/
#ifndef lint
-static char *RCSid = "@(#) $Id: spans_proto.c,v 1.7 1998/08/26 23:29:10 mks Exp $";
+static char *RCSid = "@(#) $Id: spans_proto.c,v 1.1 1998/09/15 08:23:03 phk Exp $";
#endif
#include <netatm/kern_include.h>
@@ -200,8 +200,8 @@ spans_timer(tip)
spp = (struct spans *)
((caddr_t)tip - (int)(&((struct spans *)0)->sp_time));
- ATM_DEBUG2("spans_timer: spp=0x%x,state=%d\n",
- (int)spp, spp->sp_state);
+ ATM_DEBUG2("spans_timer: spp=%p,state=%d\n",
+ spp, spp->sp_state);
/*
* Process timeout based on protocol state
@@ -314,8 +314,8 @@ spans_timer(tip)
break;
default:
- log(LOG_ERR, "spans: timer state: spp=0x%x, state=%d\n",
- (int)spp, spp->sp_state);
+ log(LOG_ERR, "spans: timer state: spp=%p, state=%d\n",
+ spp, spp->sp_state);
}
}
@@ -350,8 +350,8 @@ spans_vctimer(tip)
(int)(&((struct vccb *)0)->vc_time));
spp = (struct spans *)svp->sv_pif->pif_siginst;
- ATM_DEBUG3("spans_vctimer: svp=0x%x, sstate=%d, ustate=%d\n",
- (int)svp, svp->sv_sstate, svp->sv_ustate);
+ ATM_DEBUG3("spans_vctimer: svp=%p, sstate=%d, ustate=%d\n",
+ svp, svp->sv_sstate, svp->sv_ustate);
/*
* Process timeout based on protocol state
@@ -444,8 +444,8 @@ spans_vctimer(tip)
break;
default:
- log(LOG_ERR, "spans: vctimer state: svp=0x%x, sstate=%d\n",
- (int)svp, svp->sv_sstate);
+ log(LOG_ERR, "spans: vctimer state: svp=%p, sstate=%d\n",
+ svp, svp->sv_sstate);
}
}
@@ -486,14 +486,13 @@ spans_connected(tok)
{
struct spans *spp = (struct spans *)tok;
- ATM_DEBUG2("spans_connected: spp=0x%x,state=%d\n",
- (int)spp, spp->sp_state);
+ ATM_DEBUG2("spans_connected: spp=%p,state=%d\n",
+ spp, spp->sp_state);
/*
* Connected routine shouldn't ever get called for a PVC
*/
- log(LOG_ERR, "spans: connected function called, tok=0x%x\n",
- (int)spp);
+ log(LOG_ERR, "spans: connected function called, tok=%p\n", spp);
}
@@ -548,8 +547,8 @@ spans_cpcs_data(tok, m)
{
struct spans *spp = tok;
- ATM_DEBUG3("spans_cpcs_data: spp=0x%x,state=%d,m=0x%x,\n",
- (int)spp, spp->sp_state, m);
+ ATM_DEBUG3("spans_cpcs_data: spp=%p,state=%d,m=%p,\n",
+ spp, spp->sp_state, m);
/*
* Process data
diff --git a/sys/netatm/spans/spans_subr.c b/sys/netatm/spans/spans_subr.c
index 48b9705..a6e720f 100644
--- a/sys/netatm/spans/spans_subr.c
+++ b/sys/netatm/spans/spans_subr.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: spans_subr.c,v 1.9 1998/08/26 23:29:10 mks Exp $
+ * @(#) $Id: spans_subr.c,v 1.1 1998/09/15 08:23:04 phk Exp $
*
*/
@@ -36,7 +36,7 @@
*/
#ifndef lint
-static char *RCSid = "@(#) $Id: spans_subr.c,v 1.9 1998/08/26 23:29:10 mks Exp $";
+static char *RCSid = "@(#) $Id: spans_subr.c,v 1.1 1998/09/15 08:23:04 phk Exp $";
#endif
#include <netatm/kern_include.h>
@@ -77,7 +77,7 @@ spans_open_vcc(spp, cvp)
spans_aal aal;
int err, pvc, vpi, vci;
- ATM_DEBUG2("spans_open_vcc: spp=0x%x, cvp=0x%x\n", spp, cvp);
+ ATM_DEBUG2("spans_open_vcc: spp=%p, cvp=%p\n", spp, cvp);
/*
* Validate user parameters. AAL and encapsulation are
@@ -269,7 +269,7 @@ spans_close_vcc(spp, svp, force)
{
int err = 0;
- ATM_DEBUG2("spans_close_vcc: svp=0x%x, state=%d\n", svp,
+ ATM_DEBUG2("spans_close_vcc: svp=%p, state=%d\n", svp,
svp->sv_sstate);
/*
@@ -361,7 +361,7 @@ spans_clear_vcc(spp, svp)
{
u_char outstate;
- ATM_DEBUG2("spans_clear_vcc: svp=0x%x, state=%d\n", svp,
+ ATM_DEBUG2("spans_clear_vcc: svp=%p, state=%d\n", svp,
svp->sv_sstate);
/*
@@ -438,7 +438,7 @@ spans_switch_reset(spp, cause)
int s;
struct vccb *vcp, *vnext;
- ATM_DEBUG2("spans_switch_reset: spp=0x%x, cause=%d\n",
+ ATM_DEBUG2("spans_switch_reset: spp=%p, cause=%d\n",
spp, cause);
/*
@@ -486,7 +486,7 @@ spans_switch_reset(spp, cause)
break;
}
} else {
- log(LOG_ERR, "spans: invalid VCC type: vccb=0x%x, type=%d\n",
+ log(LOG_ERR, "spans: invalid VCC type: vccb=%p, type=%d\n",
vcp, vcp->vc_type);
}
}
diff --git a/sys/netatm/spans/spans_util.c b/sys/netatm/spans/spans_util.c
index 6d470e1..f3f0235 100644
--- a/sys/netatm/spans/spans_util.c
+++ b/sys/netatm/spans/spans_util.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: spans_util.c,v 1.6 1998/08/26 23:29:10 mks Exp $
+ * @(#) $Id: spans_util.c,v 1.1 1998/09/15 08:23:04 phk Exp $
*
*/
@@ -36,7 +36,7 @@
*/
#ifndef lint
-static char *RCSid = "@(#) $Id: spans_util.c,v 1.6 1998/08/26 23:29:10 mks Exp $";
+static char *RCSid = "@(#) $Id: spans_util.c,v 1.1 1998/09/15 08:23:04 phk Exp $";
#endif
#include <netatm/kern_include.h>
@@ -441,7 +441,7 @@ spans_addr_print(p)
/*
* Print and return the string
*/
- sprintf(strbuff, "%x.%x", ntohl(u1.w), ntohl(u2.w));
+ sprintf(strbuff, "%lx.%lx", ntohl(u1.w), ntohl(u2.w));
return(strbuff);
}
@@ -468,7 +468,7 @@ spans_dump_buffer(m)
KB_DATASTART(m, cp, caddr_t);
for (i = 0; i < KB_LEN(m); i++) {
if (i == 0)
- printf(" bfr=0x%x: ", (int)m);
+ printf(" bfr=%p: ", m);
printf("%x ", (u_char)*cp++);
}
printf("<end_bfr>\n");
OpenPOWER on IntegriCloud