summaryrefslogtreecommitdiff
path: root/sys/netatm
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netatm')
-rw-r--r--sys/netatm/atm_aal5.c33
-rw-r--r--sys/netatm/atm_cm.c8
-rw-r--r--sys/netatm/atm_device.c10
-rw-r--r--sys/netatm/atm_if.c27
-rw-r--r--sys/netatm/atm_proto.c8
-rw-r--r--sys/netatm/atm_signal.c8
-rw-r--r--sys/netatm/atm_socket.c12
-rw-r--r--sys/netatm/atm_subr.c8
-rw-r--r--sys/netatm/atm_usrreq.c26
-rw-r--r--sys/netatm/ipatm/ipatm_event.c10
-rw-r--r--sys/netatm/ipatm/ipatm_if.c10
-rw-r--r--sys/netatm/ipatm/ipatm_input.c15
-rw-r--r--sys/netatm/ipatm/ipatm_load.c10
-rw-r--r--sys/netatm/ipatm/ipatm_output.c10
-rw-r--r--sys/netatm/ipatm/ipatm_usrreq.c13
-rw-r--r--sys/netatm/ipatm/ipatm_vcm.c10
-rw-r--r--sys/netatm/sigpvc/sigpvc_if.c16
-rw-r--r--sys/netatm/sigpvc/sigpvc_subr.c10
-rw-r--r--sys/netatm/spans/spans_arp.c20
-rw-r--r--sys/netatm/spans/spans_cls.c12
-rw-r--r--sys/netatm/spans/spans_if.c13
-rw-r--r--sys/netatm/spans/spans_kxdr.c8
-rw-r--r--sys/netatm/spans/spans_msg.c10
-rw-r--r--sys/netatm/spans/spans_print.c108
-rw-r--r--sys/netatm/spans/spans_proto.c10
-rw-r--r--sys/netatm/spans/spans_subr.c10
-rw-r--r--sys/netatm/spans/spans_util.c10
-rw-r--r--sys/netatm/uni/Makefile93
-rw-r--r--sys/netatm/uni/q2110_sigaa.c10
-rw-r--r--sys/netatm/uni/q2110_sigcpcs.c10
-rw-r--r--sys/netatm/uni/q2110_subr.c10
-rw-r--r--sys/netatm/uni/qsaal1_sigaa.c10
-rw-r--r--sys/netatm/uni/qsaal1_sigcpcs.c10
-rw-r--r--sys/netatm/uni/qsaal1_subr.c10
-rw-r--r--sys/netatm/uni/sscf_uni.c12
-rw-r--r--sys/netatm/uni/sscf_uni_lower.c10
-rw-r--r--sys/netatm/uni/sscf_uni_upper.c10
-rw-r--r--sys/netatm/uni/sscop.c11
-rw-r--r--sys/netatm/uni/sscop_lower.c10
-rw-r--r--sys/netatm/uni/sscop_pdu.c13
-rw-r--r--sys/netatm/uni/sscop_sigaa.c10
-rw-r--r--sys/netatm/uni/sscop_sigcpcs.c10
-rw-r--r--sys/netatm/uni/sscop_subr.c10
-rw-r--r--sys/netatm/uni/sscop_timer.c10
-rw-r--r--sys/netatm/uni/sscop_upper.c10
-rw-r--r--sys/netatm/uni/uni_load.c10
-rw-r--r--sys/netatm/uni/uniarp.c25
-rw-r--r--sys/netatm/uni/uniarp_cache.c14
-rw-r--r--sys/netatm/uni/uniarp_input.c14
-rw-r--r--sys/netatm/uni/uniarp_output.c10
-rw-r--r--sys/netatm/uni/uniarp_timer.c10
-rw-r--r--sys/netatm/uni/uniarp_vcm.c10
-rw-r--r--sys/netatm/uni/uniip.c10
-rw-r--r--sys/netatm/uni/unisig_decode.c10
-rw-r--r--sys/netatm/uni/unisig_encode.c10
-rw-r--r--sys/netatm/uni/unisig_if.c15
-rw-r--r--sys/netatm/uni/unisig_mbuf.c10
-rw-r--r--sys/netatm/uni/unisig_msg.c13
-rw-r--r--sys/netatm/uni/unisig_print.c10
-rw-r--r--sys/netatm/uni/unisig_proto.c10
-rw-r--r--sys/netatm/uni/unisig_sigmgr_state.c27
-rw-r--r--sys/netatm/uni/unisig_subr.c50
-rw-r--r--sys/netatm/uni/unisig_util.c18
-rw-r--r--sys/netatm/uni/unisig_var.h6
-rw-r--r--sys/netatm/uni/unisig_vc_state.c83
65 files changed, 535 insertions, 544 deletions
diff --git a/sys/netatm/atm_aal5.c b/sys/netatm/atm_aal5.c
index 7d6a22bd792bc..4d365dd63b401 100644
--- a/sys/netatm/atm_aal5.c
+++ b/sys/netatm/atm_aal5.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: atm_aal5.c,v 1.3 1998/10/31 20:06:54 phk Exp $
+ * @(#) $Id: atm_aal5.c,v 1.1 1998/09/15 08:22:57 phk Exp $
*
*/
@@ -35,13 +35,13 @@
*
*/
-#include <netatm/kern_include.h>
-#include <sys/stat.h>
-
#ifndef lint
-__RCSID("@(#) $Id: atm_aal5.c,v 1.3 1998/10/31 20:06:54 phk Exp $");
+static char *RCSid = "@(#) $Id: atm_aal5.c,v 1.1 1998/09/15 08:22:57 phk Exp $";
#endif
+#include <netatm/kern_include.h>
+#include <sys/stat.h>
+
/*
* Global variables
@@ -193,14 +193,15 @@ static Atm_attributes atm_aal5_defattr = {
if (atm_stackq_head != NULL) \
panic("atm_aal5: stack queue not empty"); \
;
-#else /* !DIAGNOSTIC */
+#else
#define ATM_INTRO(f) \
int s, err = 0; \
s = splnet(); \
;
-#endif /* DIAGNOSTIC */
+#endif
#define ATM_OUTRO() \
+out: \
/* \
* Drain any deferred calls \
*/ \
@@ -243,7 +244,7 @@ atm_aal5_attach(so, proto, p)
*/
err = atm_sock_attach(so, atm_aal5_sendspace, atm_aal5_recvspace);
if (err)
- ATM_RETERR(err);
+ goto out;
/*
* Finish up any protocol specific stuff
@@ -257,7 +258,6 @@ atm_aal5_attach(so, proto, p)
atp->atp_attr = atm_aal5_defattr;
strncpy(atp->atp_name, "(AAL5)", T_ATM_APP_NAME_LEN);
-out:
ATM_OUTRO();
}
@@ -521,7 +521,6 @@ atm_aal5_send(so, flags, m, addr, control, p)
KB_FREEALL(m);
}
-out:
ATM_OUTRO();
}
@@ -693,7 +692,7 @@ atm_aal5_incoming(tok, cop, ap, tokp)
Atm_attributes *ap;
void **tokp;
{
- Atm_pcb *atp0 = tok, *atp;
+ Atm_pcb *atp = tok;
struct socket *so;
int err = 0;
@@ -703,11 +702,11 @@ atm_aal5_incoming(tok, cop, ap, tokp)
* Note that our attach function will be called via sonewconn
* and it will allocate and setup most of the pcb.
*/
- atm_sock_stat.as_inconn[atp0->atp_type]++;
+ atm_sock_stat.as_inconn[atp->atp_type]++;
#if (defined(BSD) && (BSD >= 199103))
- so = sonewconn(atp0->atp_socket, 0);
+ so = sonewconn(atp->atp_socket, 0);
#else
- so = sonewconn(atp0->atp_socket);
+ so = sonewconn(atp->atp_socket);
#endif
if (so) {
@@ -716,12 +715,10 @@ atm_aal5_incoming(tok, cop, ap, tokp)
*/
atp = sotoatmpcb(so);
atp->atp_conn = cop;
- atp->atp_attr = *atp0->atp_conn->co_lattr;
- strncpy(atp->atp_name, atp0->atp_name, T_ATM_APP_NAME_LEN);
*tokp = atp;
} else {
err = ECONNABORTED;
- atm_sock_stat.as_connfail[atp0->atp_type]++;
+ atm_sock_stat.as_connfail[atp->atp_type]++;
}
return (err);
@@ -826,7 +823,6 @@ atm_aal5_ctloutput(so, sopt)
break;
case T_ATM_CAUSE:
- case T_ATM_APP_NAME:
break;
default:
@@ -856,7 +852,6 @@ atm_aal5_ctloutput(so, sopt)
break;
}
-out:
ATM_OUTRO();
}
diff --git a/sys/netatm/atm_cm.c b/sys/netatm/atm_cm.c
index 6ae42e8396bdf..4304b56dc7503 100644
--- a/sys/netatm/atm_cm.c
+++ b/sys/netatm/atm_cm.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: atm_cm.c,v 1.2 1998/09/17 09:34:59 phk Exp $
+ * @(#) $Id: atm_cm.c,v 1.1 1998/09/15 08:22:57 phk Exp $
*
*/
@@ -35,12 +35,12 @@
*
*/
-#include <netatm/kern_include.h>
-
#ifndef lint
-__RCSID("@(#) $Id: atm_cm.c,v 1.2 1998/09/17 09:34:59 phk Exp $");
+static char *RCSid = "@(#) $Id: atm_cm.c,v 1.1 1998/09/15 08:22:57 phk Exp $";
#endif
+#include <netatm/kern_include.h>
+
/*
* Global variables
diff --git a/sys/netatm/atm_device.c b/sys/netatm/atm_device.c
index d68134fc03fe8..3a65880e15745 100644
--- a/sys/netatm/atm_device.c
+++ b/sys/netatm/atm_device.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: atm_device.c,v 1.3 1998/10/31 20:06:54 phk Exp $
+ * @(#) $Id: atm_device.c,v 1.1 1998/09/15 08:22:57 phk Exp $
*
*/
@@ -35,12 +35,12 @@
*
*/
-#include <netatm/kern_include.h>
-
#ifndef lint
-__RCSID("@(#) $Id: atm_device.c,v 1.3 1998/10/31 20:06:54 phk Exp $");
+static char *RCSid = "@(#) $Id: atm_device.c,v 1.1 1998/09/15 08:22:57 phk Exp $";
#endif
+#include <netatm/kern_include.h>
+
/*
* Private structures for managing allocated kernel memory resources
@@ -874,7 +874,7 @@ atm_dev_pdu_print(cup, cvp, m, msg)
{
char buf[128];
- snprintf(buf, sizeof(buf), "%s vcc=(%d,%d)", msg,
+ sprintf(buf, "%s vcc=(%d,%d)", msg,
cvp->cv_connvc->cvc_vcc->vc_vpi,
cvp->cv_connvc->cvc_vcc->vc_vci);
diff --git a/sys/netatm/atm_if.c b/sys/netatm/atm_if.c
index a3609551b484f..a07ccc2251d66 100644
--- a/sys/netatm/atm_if.c
+++ b/sys/netatm/atm_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: atm_if.c,v 1.2 1998/10/31 20:06:54 phk Exp $
+ * @(#) $Id: atm_if.c,v 1.13 1998/07/23 21:43:55 root Exp $
*
*/
@@ -35,12 +35,12 @@
*
*/
-#include <netatm/kern_include.h>
-
#ifndef lint
-__RCSID("@(#) $Id: atm_if.c,v 1.2 1998/10/31 20:06:54 phk Exp $");
+static char *RCSid = "@(#) $Id: atm_if.c,v 1.13 1998/07/23 21:43:55 root Exp $";
#endif
+#include <netatm/kern_include.h>
+
#if (defined(BSD) && (BSD < 199506))
extern int ifqmaxlen;
@@ -326,8 +326,8 @@ atm_physif_ioctl(code, data, arg)
KM_ZERO((caddr_t)&apr, sizeof(apr));
smp = pip->pif_sigmgr;
sip = pip->pif_siginst;
- (void) snprintf(apr.anp_intf, sizeof(apr.anp_intf),
- "%s%d", pip->pif_name, pip->pif_unit );
+ (void) sprintf(apr.anp_intf, "%s%d", pip->pif_name,
+ pip->pif_unit );
if ( pip->pif_nif )
{
strcpy(apr.anp_nif_pref, pip->pif_nif->nif_if.if_name);
@@ -380,14 +380,14 @@ atm_physif_ioctl(code, data, arg)
* Fill in info to be returned
*/
KM_ZERO((caddr_t)&anr, sizeof(anr));
- (void) snprintf(anr.anp_intf, sizeof(anr.anp_intf),
- "%s%d", ifp->if_name, ifp->if_unit);
+ (void) sprintf(anr.anp_intf, "%s%d", ifp->if_name,
+ ifp->if_unit);
IFP_TO_IA(ifp, ia);
if (ia) {
anr.anp_proto_addr = *ia->ia_ifa.ifa_addr;
}
- (void) snprintf(anr.anp_phy_intf, sizeof(anr.anp_phy_intf),
- "%s%d", pip->pif_name, pip->pif_unit);
+ (void) sprintf(anr.anp_phy_intf, "%s%d", pip->pif_name,
+ pip->pif_unit);
/*
* Copy data to user buffer
@@ -410,8 +410,7 @@ atm_physif_ioctl(code, data, arg)
pip = (struct atm_pif *)arg;
if ( pip == NULL )
return ( ENXIO );
- snprintf ( ifname, sizeof(ifname),
- "%s%d", pip->pif_name, pip->pif_unit );
+ sprintf ( ifname, "%s%d", pip->pif_name, pip->pif_unit );
/*
* Cast response into users buffer
@@ -573,8 +572,8 @@ atm_physif_ioctl(code, data, arg)
* Fill in info to be returned
*/
KM_ZERO((caddr_t)&acr, sizeof(acr));
- (void) snprintf(acr.acp_intf, sizeof(acr.acp_intf),
- "%s%d", pip->pif_name, pip->pif_unit);
+ (void) sprintf(acr.acp_intf, "%s%d", pip->pif_name,
+ pip->pif_unit);
KM_COPY((caddr_t)acp, (caddr_t)&acr.acp_cfg,
sizeof(Atm_config));
diff --git a/sys/netatm/atm_proto.c b/sys/netatm/atm_proto.c
index 5327e4ed923ac..ddd1a88bb2012 100644
--- a/sys/netatm/atm_proto.c
+++ b/sys/netatm/atm_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: atm_proto.c,v 1.1 1998/09/15 08:22:58 phk Exp $
+ * @(#) $Id: atm_proto.c,v 1.6 1998/02/19 19:52:06 mks Exp $
*
*/
@@ -35,12 +35,12 @@
*
*/
-#include <netatm/kern_include.h>
-
#ifndef lint
-__RCSID("@(#) $Id: atm_proto.c,v 1.1 1998/09/15 08:22:58 phk Exp $");
+static char *RCSid = "@(#) $Id: atm_proto.c,v 1.6 1998/02/19 19:52:06 mks Exp $";
#endif
+#include <netatm/kern_include.h>
+
struct protosw atmsw[] = {
{ SOCK_DGRAM, /* ioctl()-only */
diff --git a/sys/netatm/atm_signal.c b/sys/netatm/atm_signal.c
index da46c98771a56..8acbf7a117576 100644
--- a/sys/netatm/atm_signal.c
+++ b/sys/netatm/atm_signal.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: atm_signal.c,v 1.1 1998/09/15 08:22:58 phk Exp $
+ * @(#) $Id: atm_signal.c,v 1.8 1998/03/24 20:45:37 mks Exp $
*
*/
@@ -35,12 +35,12 @@
*
*/
-#include <netatm/kern_include.h>
-
#ifndef lint
-__RCSID("@(#) $Id: atm_signal.c,v 1.1 1998/09/15 08:22:58 phk Exp $");
+static char *RCSid = "@(#) $Id: atm_signal.c,v 1.8 1998/03/24 20:45:37 mks Exp $";
#endif
+#include <netatm/kern_include.h>
+
/*
* Local variables
diff --git a/sys/netatm/atm_socket.c b/sys/netatm/atm_socket.c
index 004fba4949d0e..2370a15fd070e 100644
--- a/sys/netatm/atm_socket.c
+++ b/sys/netatm/atm_socket.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: atm_socket.c,v 1.2 1998/10/31 20:06:54 phk Exp $
+ * @(#) $Id: atm_socket.c,v 1.3 1998/07/30 22:30:53 mks Exp $
*
*/
@@ -35,12 +35,12 @@
*
*/
-#include <netatm/kern_include.h>
-
#ifndef lint
-__RCSID("@(#) $Id: atm_socket.c,v 1.2 1998/10/31 20:06:54 phk Exp $");
+static char *RCSid = "@(#) $Id: atm_socket.c,v 1.3 1998/07/30 22:30:53 mks Exp $";
#endif
+#include <netatm/kern_include.h>
+
/*
* Local functions
@@ -1207,8 +1207,8 @@ atm_sock_getopt(so, sopt, atp)
struct ifnet *ifp;
ifp = &ap->nif->nif_if;
- (void) snprintf(netif.net_intf, sizeof(netif.net_intf),
- "%s%d", ifp->if_name, ifp->if_unit);
+ (void) sprintf(netif.net_intf, "%s%d",
+ ifp->if_name, ifp->if_unit);
return (sooptcopyout(sopt, &netif,
sizeof netif));
} else {
diff --git a/sys/netatm/atm_subr.c b/sys/netatm/atm_subr.c
index 328b6be5a57f3..3fcf36e16a799 100644
--- a/sys/netatm/atm_subr.c
+++ b/sys/netatm/atm_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: atm_subr.c,v 1.2 1998/09/17 09:34:59 phk Exp $
+ * @(#) $Id: atm_subr.c,v 1.1 1998/09/15 08:22:59 phk Exp $
*
*/
@@ -35,12 +35,12 @@
*
*/
-#include <netatm/kern_include.h>
-
#ifndef lint
-__RCSID("@(#) $Id: atm_subr.c,v 1.2 1998/09/17 09:34:59 phk Exp $");
+static char *RCSid = "@(#) $Id: atm_subr.c,v 1.1 1998/09/15 08:22:59 phk Exp $";
#endif
+#include <netatm/kern_include.h>
+
/*
* Global variables
diff --git a/sys/netatm/atm_usrreq.c b/sys/netatm/atm_usrreq.c
index 278d9f8f85747..4231d1c010d15 100644
--- a/sys/netatm/atm_usrreq.c
+++ b/sys/netatm/atm_usrreq.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: atm_usrreq.c,v 1.2 1998/10/31 20:06:54 phk Exp $
+ * @(#) $Id: atm_usrreq.c,v 1.7 1998/06/29 21:51:29 mks Exp $
*
*/
@@ -35,12 +35,12 @@
*
*/
-#include <netatm/kern_include.h>
-
#ifndef lint
-__RCSID("@(#) $Id: atm_usrreq.c,v 1.2 1998/10/31 20:06:54 phk Exp $");
+static char *RCSid = "@(#) $Id: atm_usrreq.c,v 1.7 1998/06/29 21:51:29 mks Exp $";
#endif
+#include <netatm/kern_include.h>
+
/*
* Local functions
@@ -98,6 +98,7 @@ struct pr_usrreqs atm_dgram_usrreqs = {
#endif
#define ATM_OUTRO() \
+done: \
/* \
* Drain any deferred calls \
*/ \
@@ -108,7 +109,7 @@ struct pr_usrreqs atm_dgram_usrreqs = {
#define ATM_RETERR(errno) { \
err = errno; \
- goto out; \
+ goto done; \
}
@@ -437,7 +438,6 @@ atm_dgram_control(so, cmd, data, ifp, p)
err = EOPNOTSUPP;
}
-out:
ATM_OUTRO();
}
@@ -547,17 +547,11 @@ atm_dgram_info(data)
for (pip = atm_interface_head; pip;
pip = pip->pif_next) {
if (smp = pip->pif_sigmgr) {
- for (nip = pip->pif_nif; nip;
- nip = nip->nif_pnext) {
- err = (*smp->sm_ioctl)
- (AIOCS_INF_ASV, data,
- (caddr_t)nip);
- if (err)
- break;
- }
- if (err)
- break;
+ err = (*smp->sm_ioctl)(AIOCS_INF_ASV,
+ data, NULL);
}
+ if (err)
+ break;
}
}
break;
diff --git a/sys/netatm/ipatm/ipatm_event.c b/sys/netatm/ipatm/ipatm_event.c
index 66f736e6bbd00..842ee64feaaa5 100644
--- a/sys/netatm/ipatm/ipatm_event.c
+++ b/sys/netatm/ipatm/ipatm_event.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: ipatm_event.c,v 1.2 1998/09/17 09:35:00 phk Exp $
+ * @(#) $Id: ipatm_event.c,v 1.1 1998/09/15 08:23:00 phk Exp $
*
*/
@@ -35,16 +35,16 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: ipatm_event.c,v 1.1 1998/09/15 08:23:00 phk Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/ipatm/ipatm.h>
#include <netatm/ipatm/ipatm_var.h>
#include <netatm/ipatm/ipatm_serv.h>
-#ifndef lint
-__RCSID("@(#) $Id: ipatm_event.c,v 1.2 1998/09/17 09:35:00 phk Exp $");
-#endif
-
/*
* Process an IP VCC timeout
diff --git a/sys/netatm/ipatm/ipatm_if.c b/sys/netatm/ipatm/ipatm_if.c
index 7cac3da4e319c..ede2450ff8be1 100644
--- a/sys/netatm/ipatm/ipatm_if.c
+++ b/sys/netatm/ipatm/ipatm_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: ipatm_if.c,v 1.1 1998/09/15 08:23:00 phk Exp $
+ * @(#) $Id: ipatm_if.c,v 1.6 1998/03/24 20:51:47 mks Exp $
*
*/
@@ -35,16 +35,16 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: ipatm_if.c,v 1.6 1998/03/24 20:51:47 mks Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/ipatm/ipatm.h>
#include <netatm/ipatm/ipatm_var.h>
#include <netatm/ipatm/ipatm_serv.h>
-#ifndef lint
-__RCSID("@(#) $Id: ipatm_if.c,v 1.1 1998/09/15 08:23:00 phk Exp $");
-#endif
-
/*
* Local functions
diff --git a/sys/netatm/ipatm/ipatm_input.c b/sys/netatm/ipatm/ipatm_input.c
index 5d292fe2c9061..ca3e3e75a34af 100644
--- a/sys/netatm/ipatm/ipatm_input.c
+++ b/sys/netatm/ipatm/ipatm_input.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: ipatm_input.c,v 1.1 1998/09/15 08:23:00 phk Exp $
+ * @(#) $Id: ipatm_input.c,v 1.9 1998/04/07 23:03:52 mks Exp $
*
*/
@@ -35,16 +35,16 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: ipatm_input.c,v 1.9 1998/04/07 23:03:52 mks Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/ipatm/ipatm.h>
#include <netatm/ipatm/ipatm_var.h>
#include <netatm/ipatm/ipatm_serv.h>
-#ifndef lint
-__RCSID("@(#) $Id: ipatm_input.c,v 1.1 1998/09/15 08:23:00 phk Exp $");
-#endif
-
/*
* Process VCC Input Data
@@ -111,10 +111,7 @@ ipatm_ipinput(inp, m)
struct ip_nif *inp;
KBuffer *m;
{
- int s;
-#if BSD < 199103
- int space;
-#endif
+ int s, space;
#ifdef DIAGNOSTIC
if (ipatm_print) {
diff --git a/sys/netatm/ipatm/ipatm_load.c b/sys/netatm/ipatm/ipatm_load.c
index 38254150b1e28..8caa6354a4cb7 100644
--- a/sys/netatm/ipatm/ipatm_load.c
+++ b/sys/netatm/ipatm/ipatm_load.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: ipatm_load.c,v 1.1 1998/09/15 08:23:00 phk Exp $
+ * @(#) $Id: ipatm_load.c,v 1.12 1998/07/30 22:23:00 mks Exp $
*
*/
@@ -35,6 +35,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: ipatm_load.c,v 1.12 1998/07/30 22:23:00 mks Exp $";
+#endif
+
#ifndef ATM_IP_MODULE
#include "opt_atm.h"
#endif
@@ -45,10 +49,6 @@
#include <netatm/ipatm/ipatm_var.h>
#include <netatm/ipatm/ipatm_serv.h>
-#ifndef lint
-__RCSID("@(#) $Id: ipatm_load.c,v 1.1 1998/09/15 08:23:00 phk Exp $");
-#endif
-
/*
* Global variables
diff --git a/sys/netatm/ipatm/ipatm_output.c b/sys/netatm/ipatm/ipatm_output.c
index 54def8a1e5062..7f02f28c85056 100644
--- a/sys/netatm/ipatm/ipatm_output.c
+++ b/sys/netatm/ipatm/ipatm_output.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: ipatm_output.c,v 1.1 1998/09/15 08:23:01 phk Exp $
+ * @(#) $Id: ipatm_output.c,v 1.6 1998/02/19 20:14:17 mks Exp $
*
*/
@@ -35,16 +35,16 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: ipatm_output.c,v 1.6 1998/02/19 20:14:17 mks Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/ipatm/ipatm.h>
#include <netatm/ipatm/ipatm_var.h>
#include <netatm/ipatm/ipatm_serv.h>
-#ifndef lint
-__RCSID("@(#) $Id: ipatm_output.c,v 1.1 1998/09/15 08:23:01 phk Exp $");
-#endif
-
/*
* Output an IP Packet
diff --git a/sys/netatm/ipatm/ipatm_usrreq.c b/sys/netatm/ipatm/ipatm_usrreq.c
index 6fc94d6feb76e..1f1751c703d54 100644
--- a/sys/netatm/ipatm/ipatm_usrreq.c
+++ b/sys/netatm/ipatm/ipatm_usrreq.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: ipatm_usrreq.c,v 1.2 1998/10/31 20:06:55 phk Exp $
+ * @(#) $Id: ipatm_usrreq.c,v 1.6 1998/05/18 19:14:04 mks Exp $
*
*/
@@ -35,16 +35,16 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: ipatm_usrreq.c,v 1.6 1998/05/18 19:14:04 mks Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/ipatm/ipatm.h>
#include <netatm/ipatm/ipatm_var.h>
#include <netatm/ipatm/ipatm_serv.h>
-#ifndef lint
-__RCSID("@(#) $Id: ipatm_usrreq.c,v 1.2 1998/10/31 20:06:55 phk Exp $");
-#endif
-
/*
* Process IP PF_ATM ioctls
@@ -333,8 +333,7 @@ ipatm_ioctl(code, data, arg1)
AF_INET;
SATOSIN(&aivr.aip_dst_addr)->sin_addr.s_addr =
ivp->iv_dst.s_addr;
- (void) snprintf(aivr.aip_intf,
- sizeof(aivr.aip_intf), "%s%d",
+ (void) sprintf(aivr.aip_intf, "%s%d",
inp->inf_nif->nif_if.if_name,
inp->inf_nif->nif_if.if_unit);
if ((ivp->iv_conn) &&
diff --git a/sys/netatm/ipatm/ipatm_vcm.c b/sys/netatm/ipatm/ipatm_vcm.c
index 8bfab7e5e0644..cb8f46bdb61ac 100644
--- a/sys/netatm/ipatm/ipatm_vcm.c
+++ b/sys/netatm/ipatm/ipatm_vcm.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: ipatm_vcm.c,v 1.2 1998/09/17 09:35:00 phk Exp $
+ * @(#) $Id: ipatm_vcm.c,v 1.1 1998/09/15 08:23:01 phk Exp $
*
*/
@@ -35,16 +35,16 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: ipatm_vcm.c,v 1.1 1998/09/15 08:23:01 phk Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/ipatm/ipatm.h>
#include <netatm/ipatm/ipatm_var.h>
#include <netatm/ipatm/ipatm_serv.h>
-#ifndef lint
-__RCSID("@(#) $Id: ipatm_vcm.c,v 1.2 1998/09/17 09:35:00 phk Exp $");
-#endif
-
Atm_attributes ipatm_aal5llc = {
NULL, /* nif */
diff --git a/sys/netatm/sigpvc/sigpvc_if.c b/sys/netatm/sigpvc/sigpvc_if.c
index b3af607af6a14..4208f29f4cb3e 100644
--- a/sys/netatm/sigpvc/sigpvc_if.c
+++ b/sys/netatm/sigpvc/sigpvc_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: sigpvc_if.c,v 1.3 1998/12/04 22:54:53 archie Exp $
+ * @(#) $Id: sigpvc_if.c,v 1.13 1998/07/30 22:32:42 mks Exp $
*
*/
@@ -36,6 +36,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: sigpvc_if.c,v 1.13 1998/07/30 22:32:42 mks Exp $";
+#endif
+
#ifndef ATM_SIGPVC_MODULE
#include "opt_atm.h"
#endif
@@ -45,10 +49,6 @@
#include <netatm/sigpvc/sigpvc.h>
#include <netatm/sigpvc/sigpvc_var.h>
-#ifndef lint
-__RCSID("@(#) $Id: sigpvc_if.c,v 1.3 1998/12/04 22:54:53 archie Exp $");
-#endif
-
/*
* Global variables
@@ -604,8 +604,7 @@ sigpvc_ioctl(code, data, arg1)
/*
* Fill in info to be returned
*/
- (void) snprintf(avr.avp_intf, sizeof(avr.avp_intf),
- "%s%d",
+ (void) sprintf(avr.avp_intf, "%s%d",
pvp->pv_pif->pif_name, pvp->pv_pif->pif_unit);
avr.avp_vpi = vcp->vc_vpi;
avr.avp_vci = vcp->vc_vci;
@@ -653,9 +652,8 @@ sigpvc_ioctl(code, data, arg1)
break;
case AIOCS_INF_ARP:
- case AIOCS_INF_ASV:
/*
- * Get ARP table/server information
+ * Get ARP table information
*/
/* We don't maintain any ARP information */
break;
diff --git a/sys/netatm/sigpvc/sigpvc_subr.c b/sys/netatm/sigpvc/sigpvc_subr.c
index 63e3b64fd5777..00f92ec125e58 100644
--- a/sys/netatm/sigpvc/sigpvc_subr.c
+++ b/sys/netatm/sigpvc/sigpvc_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: sigpvc_subr.c,v 1.1 1998/09/15 08:23:02 phk Exp $
+ * @(#) $Id: sigpvc_subr.c,v 1.7 1998/06/29 21:52:25 mks Exp $
*
*/
@@ -35,15 +35,15 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: sigpvc_subr.c,v 1.7 1998/06/29 21:52:25 mks Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/sigpvc/sigpvc.h>
#include <netatm/sigpvc/sigpvc_var.h>
-#ifndef lint
-__RCSID("@(#) $Id: sigpvc_subr.c,v 1.1 1998/09/15 08:23:02 phk Exp $");
-#endif
-
extern struct sp_info sigpvc_vcpool;
/*
diff --git a/sys/netatm/spans/spans_arp.c b/sys/netatm/spans/spans_arp.c
index d2d65e6c38794..5a2443af9de37 100644
--- a/sys/netatm/spans/spans_arp.c
+++ b/sys/netatm/spans/spans_arp.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_arp.c,v 1.3 1998/12/04 22:54:53 archie Exp $
+ * @(#) $Id: spans_arp.c,v 1.9 1998/06/29 22:03:12 mks Exp $
*
*/
@@ -35,6 +35,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: spans_arp.c,v 1.9 1998/06/29 22:03:12 mks Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/ipatm/ipatm_var.h>
@@ -43,10 +47,6 @@
#include <netatm/spans/spans_var.h>
#include <netatm/spans/spans_cls.h>
-#ifndef lint
-__RCSID("@(#) $Id: spans_arp.c,v 1.3 1998/12/04 22:54:53 archie Exp $");
-#endif
-
/*
* Global variables
@@ -1089,8 +1089,7 @@ spansarp_ioctl(code, data, arg1)
AF_INET;
SATOSIN(&aar.aap_arp_addr)->sin_addr.s_addr =
sap->sa_dstip.s_addr;
- (void) snprintf(aar.aap_intf,
- sizeof(aar.aap_intf), "%s%d",
+ (void) sprintf(aar.aap_intf, "%s%d",
clp->cls_ipnif->inf_nif->nif_if.if_name,
clp->cls_ipnif->inf_nif->nif_if.if_unit
);
@@ -1125,13 +1124,6 @@ spansarp_ioctl(code, data, arg1)
aip->air_buf_len = buf_len;
break;
- case AIOCS_INF_ASV:
- /*
- * Get ARP server information
- */
- /* SPANS doesn't have an ARP server */
- break;
-
default:
err = EOPNOTSUPP;
}
diff --git a/sys/netatm/spans/spans_cls.c b/sys/netatm/spans/spans_cls.c
index 17dc135fc5470..f496311f0d39f 100644
--- a/sys/netatm/spans/spans_cls.c
+++ b/sys/netatm/spans/spans_cls.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_cls.c,v 1.2 1998/10/31 20:06:56 phk Exp $
+ * @(#) $Id: spans_cls.c,v 1.11 1998/06/29 22:04:29 mks Exp $
*
*/
@@ -35,6 +35,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: spans_cls.c,v 1.11 1998/06/29 22:04:29 mks Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/ipatm/ipatm_var.h>
@@ -43,10 +47,6 @@
#include <netatm/spans/spans_var.h>
#include <netatm/spans/spans_cls.h>
-#ifndef lint
-__RCSID("@(#) $Id: spans_cls.c,v 1.2 1998/10/31 20:06:56 phk Exp $");
-#endif
-
/*
* Global variables
@@ -842,7 +842,7 @@ spanscls_pdu_print(clp, m, msg)
{
char buf[128];
- snprintf(buf, sizeof(buf), "spanscls %s:\n", msg);
+ sprintf(buf, "spanscls %s:\n", msg);
atm_pdu_print(m, buf);
}
diff --git a/sys/netatm/spans/spans_if.c b/sys/netatm/spans/spans_if.c
index 4557f26a662da..6546ae25a6010 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.3 1998/10/31 20:06:56 phk Exp $
+ * @(#) $Id: spans_if.c,v 1.1 1998/09/15 08:23:03 phk Exp $
*
*/
@@ -36,6 +36,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: spans_if.c,v 1.1 1998/09/15 08:23:03 phk Exp $";
+#endif
+
#ifndef ATM_SPANS_MODULE
#include "opt_atm.h"
#endif
@@ -45,10 +49,6 @@
#include "spans_xdr.h"
#include <netatm/spans/spans_var.h>
-#ifndef lint
-__RCSID("@(#) $Id: spans_if.c,v 1.3 1998/10/31 20:06:56 phk Exp $");
-#endif
-
/*
* Global variables
*/
@@ -972,8 +972,7 @@ spans_ioctl(code, data, arg1)
/*
* Fill out the response struct for the VCC
*/
- (void) snprintf(rsp.avp_intf,
- sizeof(rsp.avp_intf), "%s%d",
+ (void) sprintf(rsp.avp_intf, "%s%d",
spp->sp_pif->pif_name,
spp->sp_pif->pif_unit);
rsp.avp_vpi = svp->sv_vpi;
diff --git a/sys/netatm/spans/spans_kxdr.c b/sys/netatm/spans/spans_kxdr.c
index 3843341c22416..b6534de0e3f7b 100644
--- a/sys/netatm/spans/spans_kxdr.c
+++ b/sys/netatm/spans/spans_kxdr.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_kxdr.c,v 1.1 1998/09/15 08:23:03 phk Exp $
+ * @(#) $Id: spans_kxdr.c,v 1.2 1997/05/06 22:17:00 mks Exp $
*
*/
@@ -35,12 +35,12 @@
*
*/
-#include <netatm/kern_include.h>
-
#ifndef lint
-__RCSID("@(#) $Id: spans_kxdr.c,v 1.1 1998/09/15 08:23:03 phk Exp $");
+static char *RCSid = "@(#) $Id: spans_kxdr.c,v 1.2 1997/05/06 22:17:00 mks Exp $";
#endif
+#include <netatm/kern_include.h>
+
/*
* This file contains code that has been copied and/or modified from
* the following FreeBSD files:
diff --git a/sys/netatm/spans/spans_msg.c b/sys/netatm/spans/spans_msg.c
index f04cc7fb3bed4..1ce9a50eecfd6 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.2 1998/09/17 09:35:00 phk Exp $
+ * @(#) $Id: spans_msg.c,v 1.1 1998/09/15 08:23:03 phk Exp $
*
*/
@@ -35,16 +35,16 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: spans_msg.c,v 1.1 1998/09/15 08:23:03 phk Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <rpc/rpc.h>
#include "spans_xdr.h"
#include <netatm/spans/spans_var.h>
-#ifndef lint
-__RCSID("@(#) $Id: spans_msg.c,v 1.2 1998/09/17 09:35:00 phk Exp $");
-#endif
-
/*
* External functions
*/
diff --git a/sys/netatm/spans/spans_print.c b/sys/netatm/spans/spans_print.c
index 99e8c94b18287..117324c29ef1f 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.3 1998/10/31 20:06:56 phk Exp $
+ * @(#) $Id: spans_print.c,v 1.1 1998/09/15 08:23:03 phk Exp $
*
*/
@@ -35,15 +35,15 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: spans_print.c,v 1.1 1998/09/15 08:23:03 phk Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include "spans_xdr.h"
#include <netatm/spans/spans_var.h>
-#ifndef lint
-__RCSID("@(#) $Id: spans_print.c,v 1.3 1998/10/31 20:06:56 phk Exp $");
-#endif
-
/*
* If LONGPRINT is defined, every field of the SPANS message will be
* printed. If not, a shorter summary (useful for debugging without
@@ -54,17 +54,13 @@ __RCSID("@(#) $Id: spans_print.c,v 1.3 1998/10/31 20:06:56 phk Exp $");
/*
* Local functions
*/
-static void spans_msgtype_str __P((spans_msgtype *, char *, int));
-static void spans_print_msgbody __P((spans_msgbody *));
-static void spans_result_str __P((spans_result *, char *, int));
-
-#ifdef LONGPRINT
-
static void inc_indent __P((void));
static void dec_indent __P((void));
-static void spans_aal_str __P((spans_aal *, char *, int));
-static void spans_query_type_str __P((spans_query_type *, char *, int));
-static void spans_state_str __P((spans_query_type *, char *, int));
+static void spans_aal_str __P((spans_aal *, char *));
+static void spans_result_str __P((spans_result *, char *));
+static void spans_msgtype_str __P((spans_msgtype *, char *));
+static void spans_query_type_str __P((spans_query_type *, char *));
+static void spans_state_str __P((spans_query_type *, char *));
static void spans_print_version __P((spans_version *));
static void spans_print_vpvc __P((spans_vpvc *));
static void spans_print_vpvc_pref __P((spans_vpvc_pref *));
@@ -105,6 +101,7 @@ static void spans_print_parm_leave_cnf __P((spans_parm_leave_cnf *));
static void spans_print_parm_vcir_ind __P((spans_parm_vcir_ind *));
static void spans_print_parm_query_req __P((spans_parm_query_req *));
static void spans_print_parm_query_rsp __P((spans_parm_query_rsp *));
+static void spans_print_msgbody __P((spans_msgbody *));
/*
@@ -119,7 +116,7 @@ static void
inc_indent()
{
if (spans_indent != &indent_str[0]) {
- spans_indent--;
+ *spans_indent--;
}
}
@@ -127,15 +124,14 @@ static void
dec_indent()
{
if (spans_indent != INIT_INDENT) {
- spans_indent++;
+ *spans_indent++;
}
}
static void
-spans_aal_str(objp, dest, len)
+spans_aal_str(objp, dest)
spans_aal *objp;
char *dest;
- int len;
{
static char *aal_names[] = {
"SPANS_AAL0",
@@ -147,20 +143,17 @@ spans_aal_str(objp, dest, len)
};
if (*objp < SPANS_AAL0 || *objp > SPANS_AAL5) {
- snprintf(dest, len, "Invalid (%d)", (int)*objp);
+ sprintf(dest, "Invalid (%d)", (int)*objp);
} else {
- snprintf(dest, len, "%s (%d)", aal_names[(int)*objp],
+ sprintf(dest, "%s (%d)", aal_names[(int)*objp],
(int)*objp);
}
}
-#endif
-
static void
-spans_result_str(objp, dest, len)
+spans_result_str(objp, dest)
spans_result *objp;
char *dest;
- int len;
{
static char *result_names[] = {
"SPANS_OK",
@@ -171,18 +164,17 @@ spans_result_str(objp, dest, len)
};
if (*objp < SPANS_OK || *objp > SPANS_BADDEST) {
- snprintf(dest, len, "Invalid (%d)", (int)*objp);
+ sprintf(dest, "Invalid (%d)", (int)*objp);
} else {
- snprintf(dest, len, "%s (%d)",
+ sprintf(dest, "%s (%d)",
result_names[(int)*objp], (int)*objp);
}
}
static void
-spans_msgtype_str(objp, dest, len)
+spans_msgtype_str(objp, dest)
spans_msgtype *objp;
char *dest;
- int len;
{
int i;
@@ -228,7 +220,7 @@ spans_msgtype_str(objp, dest, len)
*/
for (i=0; msgtype_names[i].name; i++) {
if (*objp == msgtype_names[i].type) {
- snprintf(dest, len, "%s (%d)",
+ sprintf(dest, "%s (%d)",
msgtype_names[i].name,
(int)*objp);
return;
@@ -238,16 +230,13 @@ spans_msgtype_str(objp, dest, len)
/*
* Type was not found--return an error indicator
*/
- snprintf(dest, len, "Invalid (%d)", (int)*objp);
+ sprintf(dest, "Invalid (%d)", (int)*objp);
}
-#ifdef LONGPRINT
-
static void
-spans_query_type_str(objp, dest, len)
+spans_query_type_str(objp, dest)
spans_query_type *objp;
char *dest;
- int len;
{
static char *query_names[] = {
"SPANS_QUERY_NORMAL",
@@ -257,18 +246,17 @@ spans_query_type_str(objp, dest, len)
if (*objp < SPANS_QUERY_NORMAL ||
*objp > SPANS_QUERY_END_TO_END) {
- snprintf(dest, len, "Invalid (%d)", (int)*objp);
+ sprintf(dest, "Invalid (%d)", (int)*objp);
} else {
- snprintf(dest, len, "%s (%d)", query_names[(int)*objp],
+ sprintf(dest, "%s (%d)", query_names[(int)*objp],
(int)*objp);
}
}
static void
-spans_state_str(objp, dest, len)
+spans_state_str(objp, dest)
spans_query_type *objp;
char *dest;
- int len;
{
static char *state_names[] = {
"SPANS_CONN_OPEN",
@@ -278,13 +266,14 @@ spans_state_str(objp, dest, len)
};
if (*objp < SPANS_CONN_OPEN || *objp > SPANS_CONN_CLOSED) {
- snprintf(dest, len, "Invalid (%d)", (int)*objp);
+ sprintf(dest, "Invalid (%d)", (int)*objp);
} else {
- snprintf(dest, len, "%s (%d)", state_names[(int)*objp],
+ sprintf(dest, "%s (%d)", state_names[(int)*objp],
(int)*objp);
}
}
+#ifdef LONGPRINT
static void
spans_print_version(objp)
@@ -362,7 +351,7 @@ spans_print_aal(objp)
{
char aal_str[80];
- spans_aal_str(objp, aal_str, sizeof(aal_str));
+ spans_aal_str(objp, aal_str);
printf("%sspans_aal %s\n", spans_indent, aal_str);
}
@@ -372,7 +361,7 @@ spans_print_result(objp)
{
char result_str[80];
- spans_result_str(objp, result_str, sizeof(result_str));
+ spans_result_str(objp, result_str);
printf("%sspans_result %s\n", spans_indent, result_str);
}
@@ -382,7 +371,7 @@ spans_print_msgtype(objp)
{
char msgtype_str[80];
- spans_msgtype_str(objp, msgtype_str, sizeof(msgtype_str));
+ spans_msgtype_str(objp, msgtype_str);
printf("%sspans_msgtype %s\n", spans_indent, msgtype_str);
}
@@ -722,8 +711,7 @@ spans_print_parm_query_req(objp)
printf("%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));
+ spans_query_type_str(&objp->qyreq_type, query_type_str);
printf("%sqyreq_type %s\n", spans_indent, query_type_str);
dec_indent();
}
@@ -737,11 +725,9 @@ spans_print_parm_query_rsp(objp)
printf("%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));
+ spans_query_type_str(&objp->qyrsp_type, query_type_str);
printf("%sqyrsp_type %s\n", spans_indent, query_type_str);
- spans_state_str(&objp->qyrsp_state,
- state_type_str, sizeof(state_type_str));
+ spans_state_str(&objp->qyrsp_state, state_type_str);
printf("%sqyrsp_state %s\n", spans_indent, state_type_str);
printf("%sqyrsp_data 0x%x\n", spans_indent,
objp->qyrsp_data);
@@ -885,7 +871,7 @@ spans_print_msgbody(objp)
spans_parm_rclose_rsp *rcrsp_p;
spans_parm_rclose_cnf *rccnf_p;
- spans_msgtype_str(&objp->mb_type, msgtype_str, sizeof(msgtype_str));
+ spans_msgtype_str(&objp->mb_type, msgtype_str);
printf("%s: ", msgtype_str);
switch (objp->mb_type) {
case SPANS_STAT_REQ:
@@ -897,7 +883,7 @@ spans_print_msgbody(objp)
strncpy(daddr, spans_addr_print(&stind_p->stind_es_addr),
sizeof(daddr));
strncpy(saddr, spans_addr_print(&stind_p->stind_sw_addr),
- sizeof(saddr));
+ sizeof(daddr));
printf("sw_epoch=0x%lx, es_addr=%s, sw_addr=0x%s",
stind_p->stind_sw_epoch,
daddr, saddr);
@@ -947,8 +933,7 @@ spans_print_msgbody(objp)
sizeof(daddr));
strncpy(saddr, spans_addr_print(&oprsp_p->oprsp_conn.con_src),
sizeof(saddr));
- spans_result_str(&oprsp_p->oprsp_result, result_str,
- sizeof(result_str));
+ spans_result_str(&oprsp_p->oprsp_result, result_str);
printf("result=%s, daddr=%s, saddr=%s, dsap=%d, ssap=%d, vp.vc=%d.%d",
result_str, daddr, saddr,
oprsp_p->oprsp_conn.con_dsap,
@@ -962,8 +947,7 @@ spans_print_msgbody(objp)
sizeof(daddr));
strncpy(saddr, spans_addr_print(&opcnf_p->opcnf_conn.con_src),
sizeof(saddr));
- spans_result_str(&opcnf_p->opcnf_result, result_str,
- sizeof(result_str));
+ spans_result_str(&opcnf_p->opcnf_result, result_str);
printf("result=%s, daddr=%s, saddr=%s, dsap=%d, ssap=%d, vp.vc=%d.%d",
result_str, daddr, saddr,
opcnf_p->opcnf_conn.con_dsap,
@@ -999,8 +983,7 @@ spans_print_msgbody(objp)
sizeof(daddr));
strncpy(saddr, spans_addr_print(&clrsp_p->clrsp_conn.con_src),
sizeof(saddr));
- spans_result_str(&clrsp_p->clrsp_result, result_str,
- sizeof(result_str));
+ spans_result_str(&clrsp_p->clrsp_result, result_str);
printf("result=%s, daddr=%s, saddr=%s, dsap=%d, ssap=%d",
result_str, daddr, saddr,
clrsp_p->clrsp_conn.con_dsap,
@@ -1012,8 +995,7 @@ spans_print_msgbody(objp)
sizeof(daddr));
strncpy(saddr, spans_addr_print(&clcnf_p->clcnf_conn.con_src),
sizeof(saddr));
- spans_result_str(&clcnf_p->clcnf_result, result_str,
- sizeof(result_str));
+ spans_result_str(&clcnf_p->clcnf_result, result_str);
printf("result=%s, daddr=%s, saddr=%s, dsap=%d, ssap=%d",
result_str, daddr, saddr,
clcnf_p->clcnf_conn.con_dsap,
@@ -1047,8 +1029,7 @@ spans_print_msgbody(objp)
sizeof(daddr));
strncpy(saddr, spans_addr_print(&rcrsp_p->rcrsp_conn.con_src),
sizeof(saddr));
- spans_result_str(&rcrsp_p->rcrsp_result, result_str,
- sizeof(result_str));
+ spans_result_str(&rcrsp_p->rcrsp_result, result_str);
printf("result=%s, daddr=%s, saddr=%s, dsap=%d, ssap=%d",
result_str, daddr, saddr,
rcrsp_p->rcrsp_conn.con_dsap,
@@ -1060,8 +1041,7 @@ spans_print_msgbody(objp)
sizeof(daddr));
strncpy(saddr, spans_addr_print(&rccnf_p->rccnf_conn.con_src),
sizeof(saddr));
- spans_result_str(&rccnf_p->rccnf_result, result_str,
- sizeof(result_str));
+ spans_result_str(&rccnf_p->rccnf_result, result_str);
printf("result=%s, daddr=%s, saddr=%s, dsap=%d, ssap=%d",
result_str, daddr, saddr,
rccnf_p->rccnf_conn.con_dsap,
@@ -1075,9 +1055,7 @@ void
spans_print_msg(objp)
spans_msg *objp;
{
-#ifdef LONGPRINT
spans_indent = INIT_INDENT;
-#endif
spans_print_msgbody(&objp->sm_body);
}
diff --git a/sys/netatm/spans/spans_proto.c b/sys/netatm/spans/spans_proto.c
index 2cd2f72262424..b0e0f1e44c1e1 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.2 1998/09/17 09:35:00 phk Exp $
+ * @(#) $Id: spans_proto.c,v 1.1 1998/09/15 08:23:03 phk Exp $
*
*/
@@ -35,15 +35,15 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: spans_proto.c,v 1.1 1998/09/15 08:23:03 phk Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include "spans_xdr.h"
#include <netatm/spans/spans_var.h>
-#ifndef lint
-__RCSID("@(#) $Id: spans_proto.c,v 1.2 1998/09/17 09:35:00 phk Exp $");
-#endif
-
/*
* Internal functions
*/
diff --git a/sys/netatm/spans/spans_subr.c b/sys/netatm/spans/spans_subr.c
index b2a418c454b5f..a6e720f811c44 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.2 1998/09/17 09:35:00 phk Exp $
+ * @(#) $Id: spans_subr.c,v 1.1 1998/09/15 08:23:04 phk Exp $
*
*/
@@ -35,15 +35,15 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: spans_subr.c,v 1.1 1998/09/15 08:23:04 phk Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include "spans_xdr.h"
#include <netatm/spans/spans_var.h>
-#ifndef lint
-__RCSID("@(#) $Id: spans_subr.c,v 1.2 1998/09/17 09:35:00 phk Exp $");
-#endif
-
/*
* Open a SPANS VCC
diff --git a/sys/netatm/spans/spans_util.c b/sys/netatm/spans/spans_util.c
index 904f176d2d564..f3f0235264f62 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.2 1998/09/17 09:35:01 phk Exp $
+ * @(#) $Id: spans_util.c,v 1.1 1998/09/15 08:23:04 phk Exp $
*
*/
@@ -35,15 +35,15 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: spans_util.c,v 1.1 1998/09/15 08:23:04 phk Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include "spans_xdr.h"
#include <netatm/spans/spans_var.h>
-#ifndef lint
-__RCSID("@(#) $Id: spans_util.c,v 1.2 1998/09/17 09:35:01 phk Exp $");
-#endif
-
#ifdef NOTDEF
/* XXX -- Remove all SAP checks? */
diff --git a/sys/netatm/uni/Makefile b/sys/netatm/uni/Makefile
new file mode 100644
index 0000000000000..5b769b4f0a0bc
--- /dev/null
+++ b/sys/netatm/uni/Makefile
@@ -0,0 +1,93 @@
+#
+#
+# ===================================
+# HARP | Host ATM Research Platform
+# ===================================
+#
+#
+# This Host ATM Research Platform ("HARP") file (the "Software") is
+# made available by Network Computing Services, Inc. ("NetworkCS")
+# "AS IS". NetworkCS does not provide maintenance, improvements or
+# support of any kind.
+#
+# NETWORKCS MAKES NO WARRANTIES OR REPRESENTATIONS, EXPRESS OR IMPLIED,
+# INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS FOR A PARTICULAR PURPOSE, AS TO ANY ELEMENT OF THE
+# SOFTWARE OR ANY SUPPORT PROVIDED IN CONNECTION WITH THIS SOFTWARE.
+# In no event shall NetworkCS be responsible for any damages, including
+# but not limited to consequential damages, arising from or relating to
+# any use of the Software or related support.
+#
+# Copyright 1994-1998 Network Computing Services, Inc.
+#
+# Copies of this Software may be made, however, the above copyright
+# notice must be reproduced on all copies.
+#
+# @(#) $Id: Makefile,v 1.6 1998/08/26 23:29:17 mks Exp $
+#
+#
+
+#
+# ATM Forum UNI Support
+# ---------------------
+#
+# Source directory Makefile
+#
+#
+
+DEFS=
+
+UNI_HDRS= uni.h
+UNI_SRCS= uni_load.c
+UNI_OBJS= uni_load.o
+
+SIG_HDRS= unisig.h unisig_decode.h unisig_mbuf.h \
+ unisig_msg.h unisig_print.h unisig_var.h
+SIG_SRCS= unisig_decode.c unisig_encode.c unisig_if.c \
+ unisig_mbuf.c unisig_msg.c \
+ unisig_print.c unisig_proto.c \
+ unisig_sigmgr_state.c unisig_subr.c \
+ unisig_util.c unisig_vc_state.c
+SIG_OBJS= unisig_decode.o unisig_encode.o unisig_if.o \
+ unisig_mbuf.o unisig_msg.o \
+ unisig_print.o unisig_proto.o \
+ unisig_sigmgr_state.o unisig_subr.o \
+ unisig_util.o unisig_vc_state.o
+
+SAAL_HDRS= sscop.h sscop_misc.h sscop_pdu.h sscop_var.h \
+ sscf_uni.h sscf_uni_var.h
+SAAL_SRCS= sscop.c sscop_lower.c sscop_pdu.c sscop_sigaa.c \
+ sscop_sigcpcs.c sscop_subr.c sscop_timer.c sscop_upper.c \
+ qsaal1_sigaa.c qsaal1_sigcpcs.c qsaal1_subr.c \
+ q2110_sigaa.c q2110_sigcpcs.c q2110_subr.c \
+ sscf_uni.c sscf_uni_lower.c sscf_uni_upper.c
+SAAL_OBJS= sscop.o sscop_lower.o sscop_pdu.o sscop_sigaa.o \
+ sscop_sigcpcs.o sscop_subr.o sscop_timer.o sscop_upper.o \
+ qsaal1_sigaa.o qsaal1_sigcpcs.o qsaal1_subr.o \
+ q2110_sigaa.o q2110_sigcpcs.o q2110_subr.o \
+ sscf_uni.o sscf_uni_lower.o sscf_uni_upper.o
+
+IP_HDRS= uniip_var.h
+IP_SRCS= uniip.c uniarp.c uniarp_cache.c uniarp_input.c \
+ uniarp_output.c uniarp_timer.c uniarp_vcm.c
+IP_OBJS= uniip.o uniarp.o uniarp_cache.o uniarp_input.o \
+ uniarp_output.o uniarp_timer.o uniarp_vcm.o
+
+HDRS= $(UNI_HDRS) $(SIG_HDRS) $(SAAL_HDRS) $(IP_HDRS)
+SRCS= $(UNI_SRCS) $(SIG_SRCS) $(SAAL_SRCS) $(IP_SRCS)
+OBJS= $(UNI_OBJS) $(SIG_OBJS) $(SAAL_OBJS) $(IP_OBJS)
+MOD= uni_mod.o
+
+OBJDIR= ../../`../../config/mkobjname -d`/uni
+
+all $(OBJS) $(MOD) config install clean depend lint load unload:
+ @if [ -d $(OBJDIR) ]; then \
+ echo "cd $(OBJDIR); $(MAKE) $@"; \
+ cd $(OBJDIR); \
+ $(MAKE) $(MFLAGS) DEFS='$(DEFS)' HDRS='$(HDRS)' SRCS='$(SRCS)' OBJS='$(OBJS)' $@; \
+ exit $$?; \
+ else \
+ echo "Object directory \"$(OBJDIR)\" does not exist."; \
+ exit 1; \
+ fi
+
diff --git a/sys/netatm/uni/q2110_sigaa.c b/sys/netatm/uni/q2110_sigaa.c
index 381356f6c7e81..357df710c2948 100644
--- a/sys/netatm/uni/q2110_sigaa.c
+++ b/sys/netatm/uni/q2110_sigaa.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: q2110_sigaa.c,v 1.1 1998/09/15 08:23:05 phk Exp $
+ * @(#) $Id: q2110_sigaa.c,v 1.6 1998/08/26 23:29:18 mks Exp $
*
*/
@@ -35,6 +35,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: q2110_sigaa.c,v 1.6 1998/08/26 23:29:18 mks Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/uni/uni.h>
@@ -43,10 +47,6 @@
#include <netatm/uni/sscop_pdu.h>
#include <netatm/uni/sscop_var.h>
-#ifndef lint
-__RCSID("@(#) $Id: q2110_sigaa.c,v 1.1 1998/09/15 08:23:05 phk Exp $");
-#endif
-
/*
* Local functions
diff --git a/sys/netatm/uni/q2110_sigcpcs.c b/sys/netatm/uni/q2110_sigcpcs.c
index 7752fd04278e4..0fa5555a7ce9a 100644
--- a/sys/netatm/uni/q2110_sigcpcs.c
+++ b/sys/netatm/uni/q2110_sigcpcs.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: q2110_sigcpcs.c,v 1.1 1998/09/15 08:23:05 phk Exp $
+ * @(#) $Id: q2110_sigcpcs.c,v 1.7 1998/08/26 23:29:18 mks Exp $
*
*/
@@ -35,6 +35,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: q2110_sigcpcs.c,v 1.7 1998/08/26 23:29:18 mks Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/uni/uni.h>
@@ -43,10 +47,6 @@
#include <netatm/uni/sscop_pdu.h>
#include <netatm/uni/sscop_var.h>
-#ifndef lint
-__RCSID("@(#) $Id: q2110_sigcpcs.c,v 1.1 1998/09/15 08:23:05 phk Exp $");
-#endif
-
/*
* Local functions
diff --git a/sys/netatm/uni/q2110_subr.c b/sys/netatm/uni/q2110_subr.c
index 32f3833aa1342..4c6036b8de2b2 100644
--- a/sys/netatm/uni/q2110_subr.c
+++ b/sys/netatm/uni/q2110_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: q2110_subr.c,v 1.1 1998/09/15 08:23:05 phk Exp $
+ * @(#) $Id: q2110_subr.c,v 1.1 1998/04/07 23:15:20 mks Exp $
*
*/
@@ -35,6 +35,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: q2110_subr.c,v 1.1 1998/04/07 23:15:20 mks Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/uni/uni.h>
@@ -43,10 +47,6 @@
#include <netatm/uni/sscop_pdu.h>
#include <netatm/uni/sscop_var.h>
-#ifndef lint
-__RCSID("@(#) $Id: q2110_subr.c,v 1.1 1998/09/15 08:23:05 phk Exp $");
-#endif
-
/*
* Conditionally Clear Transmission Queues
diff --git a/sys/netatm/uni/qsaal1_sigaa.c b/sys/netatm/uni/qsaal1_sigaa.c
index 1788794c5b001..f3b00973f1e07 100644
--- a/sys/netatm/uni/qsaal1_sigaa.c
+++ b/sys/netatm/uni/qsaal1_sigaa.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: qsaal1_sigaa.c,v 1.1 1998/09/15 08:23:05 phk Exp $
+ * @(#) $Id: qsaal1_sigaa.c,v 1.7 1998/08/26 23:29:18 mks Exp $
*
*/
@@ -35,6 +35,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: qsaal1_sigaa.c,v 1.7 1998/08/26 23:29:18 mks Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/uni/uni.h>
@@ -43,10 +47,6 @@
#include <netatm/uni/sscop_pdu.h>
#include <netatm/uni/sscop_var.h>
-#ifndef lint
-__RCSID("@(#) $Id: qsaal1_sigaa.c,v 1.1 1998/09/15 08:23:05 phk Exp $");
-#endif
-
/*
* Local functions
diff --git a/sys/netatm/uni/qsaal1_sigcpcs.c b/sys/netatm/uni/qsaal1_sigcpcs.c
index 203e483e6a03e..1d6216555bb03 100644
--- a/sys/netatm/uni/qsaal1_sigcpcs.c
+++ b/sys/netatm/uni/qsaal1_sigcpcs.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: qsaal1_sigcpcs.c,v 1.1 1998/09/15 08:23:05 phk Exp $
+ * @(#) $Id: qsaal1_sigcpcs.c,v 1.7 1998/04/07 23:21:03 mks Exp $
*
*/
@@ -35,6 +35,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: qsaal1_sigcpcs.c,v 1.7 1998/04/07 23:21:03 mks Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/uni/uni.h>
@@ -43,10 +47,6 @@
#include <netatm/uni/sscop_pdu.h>
#include <netatm/uni/sscop_var.h>
-#ifndef lint
-__RCSID("@(#) $Id: qsaal1_sigcpcs.c,v 1.1 1998/09/15 08:23:05 phk Exp $");
-#endif
-
/*
* Local functions
diff --git a/sys/netatm/uni/qsaal1_subr.c b/sys/netatm/uni/qsaal1_subr.c
index 9ad2468dc52ac..ed4b43cb3758d 100644
--- a/sys/netatm/uni/qsaal1_subr.c
+++ b/sys/netatm/uni/qsaal1_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: qsaal1_subr.c,v 1.1 1998/09/15 08:23:06 phk Exp $
+ * @(#) $Id: qsaal1_subr.c,v 1.6 1998/04/07 23:21:17 mks Exp $
*
*/
@@ -35,6 +35,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: qsaal1_subr.c,v 1.6 1998/04/07 23:21:17 mks Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/uni/uni.h>
@@ -43,10 +47,6 @@
#include <netatm/uni/sscop_pdu.h>
#include <netatm/uni/sscop_var.h>
-#ifndef lint
-__RCSID("@(#) $Id: qsaal1_subr.c,v 1.1 1998/09/15 08:23:06 phk Exp $");
-#endif
-
/*
* Re-establish a new SSCOP Connection
diff --git a/sys/netatm/uni/sscf_uni.c b/sys/netatm/uni/sscf_uni.c
index b73452442346c..05825808c52cf 100644
--- a/sys/netatm/uni/sscf_uni.c
+++ b/sys/netatm/uni/sscf_uni.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: sscf_uni.c,v 1.3 1998/10/31 20:07:00 phk Exp $
+ * @(#) $Id: sscf_uni.c,v 1.1 1998/09/15 08:23:06 phk Exp $
*
*/
@@ -35,6 +35,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: sscf_uni.c,v 1.1 1998/09/15 08:23:06 phk Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/uni/uni.h>
@@ -42,10 +46,6 @@
#include <netatm/uni/sscf_uni.h>
#include <netatm/uni/sscf_uni_var.h>
-#ifndef lint
-__RCSID("@(#) $Id: sscf_uni.c,v 1.3 1998/10/31 20:07:00 phk Exp $");
-#endif
-
/*
* Global variables
@@ -310,7 +310,7 @@ sscf_uni_pdu_print(uvp, m, msg)
struct vccb *vcp;
vcp = uvp->uv_connvc->cvc_vcc;
- snprintf(buf, sizeof(buf), "sscf_uni %s: vcc=(%d,%d)\n",
+ sprintf(buf, "sscf_uni %s: vcc=(%d,%d)\n",
msg, vcp->vc_vpi, vcp->vc_vci);
atm_pdu_print(m, buf);
}
diff --git a/sys/netatm/uni/sscf_uni_lower.c b/sys/netatm/uni/sscf_uni_lower.c
index 56db85fd7de94..9639d96fa32fa 100644
--- a/sys/netatm/uni/sscf_uni_lower.c
+++ b/sys/netatm/uni/sscf_uni_lower.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: sscf_uni_lower.c,v 1.2 1998/09/17 09:35:01 phk Exp $
+ * @(#) $Id: sscf_uni_lower.c,v 1.1 1998/09/15 08:23:06 phk Exp $
*
*/
@@ -35,6 +35,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: sscf_uni_lower.c,v 1.1 1998/09/15 08:23:06 phk Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/uni/uni.h>
@@ -42,10 +46,6 @@
#include <netatm/uni/sscf_uni.h>
#include <netatm/uni/sscf_uni_var.h>
-#ifndef lint
-__RCSID("@(#) $Id: sscf_uni_lower.c,v 1.2 1998/09/17 09:35:01 phk Exp $");
-#endif
-
/*
* Local variables
diff --git a/sys/netatm/uni/sscf_uni_upper.c b/sys/netatm/uni/sscf_uni_upper.c
index 24a41f555be3e..a979260ac0b38 100644
--- a/sys/netatm/uni/sscf_uni_upper.c
+++ b/sys/netatm/uni/sscf_uni_upper.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: sscf_uni_upper.c,v 1.2 1998/09/17 09:35:01 phk Exp $
+ * @(#) $Id: sscf_uni_upper.c,v 1.1 1998/09/15 08:23:06 phk Exp $
*
*/
@@ -35,6 +35,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: sscf_uni_upper.c,v 1.1 1998/09/15 08:23:06 phk Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/uni/uni.h>
@@ -42,10 +46,6 @@
#include <netatm/uni/sscf_uni.h>
#include <netatm/uni/sscf_uni_var.h>
-#ifndef lint
-__RCSID("@(#) $Id: sscf_uni_upper.c,v 1.2 1998/09/17 09:35:01 phk Exp $");
-#endif
-
/*
* SSCF_UNI Upper Stack Command Handler
diff --git a/sys/netatm/uni/sscop.c b/sys/netatm/uni/sscop.c
index bfd37bdac07bb..d4a2dfb07085d 100644
--- a/sys/netatm/uni/sscop.c
+++ b/sys/netatm/uni/sscop.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: sscop.c,v 1.2 1998/09/17 09:35:01 phk Exp $
+ * @(#) $Id: sscop.c,v 1.1 1998/09/15 08:23:06 phk Exp $
*
*/
@@ -35,6 +35,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: sscop.c,v 1.1 1998/09/15 08:23:06 phk Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/uni/uni.h>
@@ -43,10 +47,6 @@
#include <netatm/uni/sscop_pdu.h>
#include <netatm/uni/sscop_var.h>
-#ifndef lint
-__RCSID("@(#) $Id: sscop.c,v 1.2 1998/09/17 09:35:01 phk Exp $");
-#endif
-
/*
* Global variables
@@ -205,6 +205,7 @@ sscop_stop()
*/
atm_release_pool(&sscop_pool);
+done:
return (err);
}
diff --git a/sys/netatm/uni/sscop_lower.c b/sys/netatm/uni/sscop_lower.c
index 3810f91123fd2..536ed0386dd3e 100644
--- a/sys/netatm/uni/sscop_lower.c
+++ b/sys/netatm/uni/sscop_lower.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: sscop_lower.c,v 1.2 1998/09/17 09:35:01 phk Exp $
+ * @(#) $Id: sscop_lower.c,v 1.1 1998/09/15 08:23:07 phk Exp $
*
*/
@@ -35,6 +35,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: sscop_lower.c,v 1.1 1998/09/15 08:23:07 phk Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/uni/uni.h>
@@ -43,10 +47,6 @@
#include <netatm/uni/sscop_pdu.h>
#include <netatm/uni/sscop_var.h>
-#ifndef lint
-__RCSID("@(#) $Id: sscop_lower.c,v 1.2 1998/09/17 09:35:01 phk Exp $");
-#endif
-
/*
* Local variables
diff --git a/sys/netatm/uni/sscop_pdu.c b/sys/netatm/uni/sscop_pdu.c
index 03562841d8caa..b9aec03400097 100644
--- a/sys/netatm/uni/sscop_pdu.c
+++ b/sys/netatm/uni/sscop_pdu.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: sscop_pdu.c,v 1.2 1998/10/31 20:07:00 phk Exp $
+ * @(#) $Id: sscop_pdu.c,v 1.6 1998/04/07 23:21:36 mks Exp $
*
*/
@@ -35,6 +35,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: sscop_pdu.c,v 1.6 1998/04/07 23:21:36 mks Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/uni/uni.h>
@@ -43,10 +47,6 @@
#include <netatm/uni/sscop_pdu.h>
#include <netatm/uni/sscop_var.h>
-#ifndef lint
-__RCSID("@(#) $Id: sscop_pdu.c,v 1.2 1998/10/31 20:07:00 phk Exp $");
-#endif
-
/*
* Local functions
*/
@@ -1231,8 +1231,7 @@ sscop_pdu_print(sop, m, msg)
struct vccb *vcp;
vcp = sop->so_connvc->cvc_vcc;
- snprintf(buf, sizeof(buf),
- "sscop %s: vcc=(%d,%d)\n", msg, vcp->vc_vpi, vcp->vc_vci);
+ sprintf(buf, "sscop %s: vcc=(%d,%d)\n", msg, vcp->vc_vpi, vcp->vc_vci);
atm_pdu_print(m, buf);
}
diff --git a/sys/netatm/uni/sscop_sigaa.c b/sys/netatm/uni/sscop_sigaa.c
index 6753982161398..8f347ce5ebe1e 100644
--- a/sys/netatm/uni/sscop_sigaa.c
+++ b/sys/netatm/uni/sscop_sigaa.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: sscop_sigaa.c,v 1.1 1998/09/15 08:23:07 phk Exp $
+ * @(#) $Id: sscop_sigaa.c,v 1.1 1998/04/07 23:15:11 mks Exp $
*
*/
@@ -35,6 +35,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: sscop_sigaa.c,v 1.1 1998/04/07 23:15:11 mks Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/uni/uni.h>
@@ -43,10 +47,6 @@
#include <netatm/uni/sscop_pdu.h>
#include <netatm/uni/sscop_var.h>
-#ifndef lint
-__RCSID("@(#) $Id: sscop_sigaa.c,v 1.1 1998/09/15 08:23:07 phk Exp $");
-#endif
-
/*
* SSCOP_ESTABLISH_REQ / SOS_IDLE Command Processor
diff --git a/sys/netatm/uni/sscop_sigcpcs.c b/sys/netatm/uni/sscop_sigcpcs.c
index 6b1c477bbb01d..a9bf504d99c48 100644
--- a/sys/netatm/uni/sscop_sigcpcs.c
+++ b/sys/netatm/uni/sscop_sigcpcs.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: sscop_sigcpcs.c,v 1.1 1998/09/15 08:23:08 phk Exp $
+ * @(#) $Id: sscop_sigcpcs.c,v 1.2 1998/07/24 20:18:09 mks Exp $
*
*/
@@ -35,6 +35,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: sscop_sigcpcs.c,v 1.2 1998/07/24 20:18:09 mks Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/uni/uni.h>
@@ -43,10 +47,6 @@
#include <netatm/uni/sscop_pdu.h>
#include <netatm/uni/sscop_var.h>
-#ifndef lint
-__RCSID("@(#) $Id: sscop_sigcpcs.c,v 1.1 1998/09/15 08:23:08 phk Exp $");
-#endif
-
/*
* No-op Processor
diff --git a/sys/netatm/uni/sscop_subr.c b/sys/netatm/uni/sscop_subr.c
index 16ad1395a243a..88656adb098ec 100644
--- a/sys/netatm/uni/sscop_subr.c
+++ b/sys/netatm/uni/sscop_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: sscop_subr.c,v 1.2 1998/09/17 09:35:01 phk Exp $
+ * @(#) $Id: sscop_subr.c,v 1.1 1998/09/15 08:23:08 phk Exp $
*
*/
@@ -35,6 +35,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: sscop_subr.c,v 1.1 1998/09/15 08:23:08 phk Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/uni/uni.h>
@@ -43,10 +47,6 @@
#include <netatm/uni/sscop_pdu.h>
#include <netatm/uni/sscop_var.h>
-#ifndef lint
-__RCSID("@(#) $Id: sscop_subr.c,v 1.2 1998/09/17 09:35:01 phk Exp $");
-#endif
-
/*
* Local functions
diff --git a/sys/netatm/uni/sscop_timer.c b/sys/netatm/uni/sscop_timer.c
index 087ae79e96cd9..c66525b9f08e2 100644
--- a/sys/netatm/uni/sscop_timer.c
+++ b/sys/netatm/uni/sscop_timer.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: sscop_timer.c,v 1.2 1998/09/17 09:35:01 phk Exp $
+ * @(#) $Id: sscop_timer.c,v 1.1 1998/09/15 08:23:08 phk Exp $
*
*/
@@ -35,6 +35,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: sscop_timer.c,v 1.1 1998/09/15 08:23:08 phk Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/uni/uni.h>
@@ -43,10 +47,6 @@
#include <netatm/uni/sscop_pdu.h>
#include <netatm/uni/sscop_var.h>
-#ifndef lint
-__RCSID("@(#) $Id: sscop_timer.c,v 1.2 1998/09/17 09:35:01 phk Exp $");
-#endif
-
/*
* Local functions
diff --git a/sys/netatm/uni/sscop_upper.c b/sys/netatm/uni/sscop_upper.c
index f2ad1bd95c5e9..162b48cbd1ac3 100644
--- a/sys/netatm/uni/sscop_upper.c
+++ b/sys/netatm/uni/sscop_upper.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: sscop_upper.c,v 1.2 1998/09/17 09:35:01 phk Exp $
+ * @(#) $Id: sscop_upper.c,v 1.1 1998/09/15 08:23:08 phk Exp $
*
*/
@@ -35,6 +35,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: sscop_upper.c,v 1.1 1998/09/15 08:23:08 phk Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/uni/uni.h>
@@ -43,10 +47,6 @@
#include <netatm/uni/sscop_pdu.h>
#include <netatm/uni/sscop_var.h>
-#ifndef lint
-__RCSID("@(#) $Id: sscop_upper.c,v 1.2 1998/09/17 09:35:01 phk Exp $");
-#endif
-
/*
* Local functions
diff --git a/sys/netatm/uni/uni_load.c b/sys/netatm/uni/uni_load.c
index 7be1eba01a0c2..23e7ff586bdb8 100644
--- a/sys/netatm/uni/uni_load.c
+++ b/sys/netatm/uni/uni_load.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: uni_load.c,v 1.1 1998/09/15 08:23:09 phk Exp $
+ * @(#) $Id: uni_load.c,v 1.6 1997/05/06 22:20:43 mks Exp $
*
*/
@@ -35,6 +35,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: uni_load.c,v 1.6 1997/05/06 22:20:43 mks Exp $";
+#endif
+
#ifndef ATM_UNI_MODULE
#include "opt_atm.h"
#endif
@@ -43,10 +47,6 @@
#include <netatm/uni/uni.h>
-#ifndef lint
-__RCSID("@(#) $Id: uni_load.c,v 1.1 1998/09/15 08:23:09 phk Exp $");
-#endif
-
/*
* External functions
*/
diff --git a/sys/netatm/uni/uniarp.c b/sys/netatm/uni/uniarp.c
index 2d6006f802b3d..e0448a8a8c11c 100644
--- a/sys/netatm/uni/uniarp.c
+++ b/sys/netatm/uni/uniarp.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: uniarp.c,v 1.4 1998/12/04 22:54:53 archie Exp $
+ * @(#) $Id: uniarp.c,v 1.1 1998/09/15 08:23:09 phk Exp $
*
*/
@@ -35,6 +35,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: uniarp.c,v 1.1 1998/09/15 08:23:09 phk Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/ipatm/ipatm_var.h>
@@ -42,10 +46,6 @@
#include <netatm/uni/unisig_var.h>
#include <netatm/uni/uniip_var.h>
-#ifndef lint
-__RCSID("@(#) $Id: uniarp.c,v 1.4 1998/12/04 22:54:53 archie Exp $");
-#endif
-
/*
* Global variables
@@ -225,6 +225,7 @@ void
uniarp_ipdact(uip)
struct uniip *uip;
{
+ struct ip_nif *inp = uip->uip_ipnif;
struct uniarp *uap, *unext;
int i;
@@ -1022,8 +1023,7 @@ uniarp_ioctl(code, data, arg1)
AF_INET;
SATOSIN(&aar.aap_arp_addr)->sin_addr.s_addr =
uap->ua_dstip.s_addr;
- (void) snprintf(aar.aap_intf,
- sizeof(aar.aap_intf), "%s%d",
+ (void) sprintf(aar.aap_intf, "%s%d",
nip->nif_if.if_name,
nip->nif_if.if_unit);
aar.aap_flags = uap->ua_flags;
@@ -1077,8 +1077,7 @@ uniarp_ioctl(code, data, arg1)
*/
SATOSIN(&aar.aap_arp_addr)->sin_family = AF_INET;
SATOSIN(&aar.aap_arp_addr)->sin_addr.s_addr = 0;
- (void) snprintf(aar.aap_intf,
- sizeof(aar.aap_intf), "%s%d",
+ (void) sprintf(aar.aap_intf, "%s%d",
nip->nif_if.if_name, nip->nif_if.if_unit);
aar.aap_flags = 0;
aar.aap_origin = uap->ua_origin;
@@ -1137,14 +1136,14 @@ updbuf:
* Get ARP server information
*/
aip = (struct atminfreq *)data;
- nip = (struct atm_nif *)arg1;
buf_addr = aip->air_buf_addr;
buf_len = aip->air_buf_len;
for (uip = uniip_head; uip; uip = uip->uip_next) {
- if (uip->uip_ipnif->inf_nif != nip)
+ if ((arg1 != NULL) &&
+ (uip->uip_ipnif->inf_nif != (struct atm_nif *)arg1))
continue;
/*
@@ -1158,8 +1157,8 @@ updbuf:
/*
* Fill in info to be returned
*/
- (void) snprintf(asr.asp_intf,
- sizeof(asr.asp_intf), "%s%d",
+ nip = uip->uip_ipnif->inf_nif;
+ (void) sprintf(asr.asp_intf, "%s%d",
nip->nif_if.if_name, nip->nif_if.if_unit);
asr.asp_state = uip->uip_arpstate;
if (uip->uip_arpstate == UIAS_SERVER_ACTIVE) {
diff --git a/sys/netatm/uni/uniarp_cache.c b/sys/netatm/uni/uniarp_cache.c
index 88a26a59c76b5..6c9537e722c67 100644
--- a/sys/netatm/uni/uniarp_cache.c
+++ b/sys/netatm/uni/uniarp_cache.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: uniarp_cache.c,v 1.2 1998/10/31 20:07:00 phk Exp $
+ * @(#) $Id: uniarp_cache.c,v 1.8 1998/08/26 23:29:20 mks Exp $
*
*/
@@ -35,6 +35,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: uniarp_cache.c,v 1.8 1998/08/26 23:29:20 mks Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/ipatm/ipatm_var.h>
@@ -42,10 +46,6 @@
#include <netatm/uni/unisig_var.h>
#include <netatm/uni/uniip_var.h>
-#ifndef lint
-__RCSID("@(#) $Id: uniarp_cache.c,v 1.2 1998/10/31 20:07:00 phk Exp $");
-#endif
-
/*
* Add data to the arp table cache
@@ -79,7 +79,6 @@ uniarp_cache_svc(uip, ip, atm, atmsub, origin)
#ifdef DIAGNOSTIC
strncpy(abuf, unisig_addr_print(atmsub), sizeof(abuf));
- abuf[sizeof(abuf) - 1] = 0;
ATM_DEBUG4("cache_svc: ip=%s, atm=(%s,%s), origin=%d\n",
inet_ntoa(*ip), unisig_addr_print(atm), abuf, origin);
#endif
@@ -157,7 +156,6 @@ uniarp_cache_svc(uip, ip, atm, atmsub, origin)
if (ipuap->ua_ivp != NULL) {
strncpy(abuf, unisig_addr_print(atmsub),
sizeof(abuf));
- abuf[sizeof(abuf) - 1] = 0;
log(LOG_WARNING,
"uniarp: duplicate IP address %s from %s,%s\n",
inet_ntoa(*ip), unisig_addr_print(atm),
@@ -187,7 +185,6 @@ uniarp_cache_svc(uip, ip, atm, atmsub, origin)
}
strncpy(abuf, unisig_addr_print(atmsub), sizeof(abuf));
- abuf[sizeof(abuf) - 1] = 0;
log(LOG_WARNING,
"uniarp: ATM address for %s changed to %s,%s\n",
inet_ntoa(*ip), unisig_addr_print(atm), abuf);
@@ -331,7 +328,6 @@ uniarp_cache_pvc(ivp, ip, atm, atmsub)
vci = ivp->iv_conn->co_connvc->cvc_vcc->vc_vci;
}
strncpy(buf, unisig_addr_print(atmsub), sizeof(buf));
- buf[sizeof(buf) - 1] = 0;
ATM_DEBUG5("cache_pvc: vcc=(%d,%d), ip=%s, atm=(%s,%s)\n",
vpi, vci, inet_ntoa(*ip), unisig_addr_print(atm), buf);
#endif
diff --git a/sys/netatm/uni/uniarp_input.c b/sys/netatm/uni/uniarp_input.c
index b621ac35c5410..cceeaa92c87f7 100644
--- a/sys/netatm/uni/uniarp_input.c
+++ b/sys/netatm/uni/uniarp_input.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: uniarp_input.c,v 1.2 1998/10/31 20:07:00 phk Exp $
+ * @(#) $Id: uniarp_input.c,v 1.10 1998/07/13 00:04:32 mks Exp $
*
*/
@@ -35,6 +35,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: uniarp_input.c,v 1.10 1998/07/13 00:04:32 mks Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/ipatm/ipatm_var.h>
@@ -42,10 +46,6 @@
#include <netatm/uni/unisig_var.h>
#include <netatm/uni/uniip_var.h>
-#ifndef lint
-__RCSID("@(#) $Id: uniarp_input.c,v 1.2 1998/10/31 20:07:00 phk Exp $");
-#endif
-
/*
* Local functions
@@ -735,6 +735,7 @@ proc_inarp_rsp(ivp, m)
struct atm_nif *nip;
struct siginst *sgp;
struct uniip *uip;
+ struct uniarp *uap;
struct in_addr myip;
int s = splnet();
@@ -846,8 +847,7 @@ uniarp_pdu_print(ivp, m, msg)
struct vccb *vcp;
vcp = ivp->iv_conn->co_connvc->cvc_vcc;
- snprintf(buf, sizeof(buf),
- "uniarp %s: vcc=(%d,%d)\n", msg, vcp->vc_vpi, vcp->vc_vci);
+ sprintf(buf, "uniarp %s: vcc=(%d,%d)\n", msg, vcp->vc_vpi, vcp->vc_vci);
atm_pdu_print(m, buf);
}
diff --git a/sys/netatm/uni/uniarp_output.c b/sys/netatm/uni/uniarp_output.c
index 4f7a16388d09e..81fab93219c74 100644
--- a/sys/netatm/uni/uniarp_output.c
+++ b/sys/netatm/uni/uniarp_output.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: uniarp_output.c,v 1.1 1998/09/15 08:23:09 phk Exp $
+ * @(#) $Id: uniarp_output.c,v 1.7 1998/06/29 22:15:41 mks Exp $
*
*/
@@ -35,16 +35,16 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: uniarp_output.c,v 1.7 1998/06/29 22:15:41 mks Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/ipatm/ipatm_var.h>
#include <netatm/ipatm/ipatm_serv.h>
#include <netatm/uni/uniip_var.h>
-#ifndef lint
-__RCSID("@(#) $Id: uniarp_output.c,v 1.1 1998/09/15 08:23:09 phk Exp $");
-#endif
-
/*
* Issue an ATMARP Request PDU
diff --git a/sys/netatm/uni/uniarp_timer.c b/sys/netatm/uni/uniarp_timer.c
index b65ca568cdd8e..1f002023e5449 100644
--- a/sys/netatm/uni/uniarp_timer.c
+++ b/sys/netatm/uni/uniarp_timer.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: uniarp_timer.c,v 1.1 1998/09/15 08:23:10 phk Exp $
+ * @(#) $Id: uniarp_timer.c,v 1.8 1998/06/29 22:44:31 mks Exp $
*
*/
@@ -35,6 +35,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: uniarp_timer.c,v 1.8 1998/06/29 22:44:31 mks Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/ipatm/ipatm_var.h>
@@ -42,10 +46,6 @@
#include <netatm/uni/unisig_var.h>
#include <netatm/uni/uniip_var.h>
-#ifndef lint
-__RCSID("@(#) $Id: uniarp_timer.c,v 1.1 1998/09/15 08:23:10 phk Exp $");
-#endif
-
/*
* Local functions
diff --git a/sys/netatm/uni/uniarp_vcm.c b/sys/netatm/uni/uniarp_vcm.c
index e2e9c2d289737..338d2b50264b3 100644
--- a/sys/netatm/uni/uniarp_vcm.c
+++ b/sys/netatm/uni/uniarp_vcm.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: uniarp_vcm.c,v 1.2 1998/09/17 09:35:02 phk Exp $
+ * @(#) $Id: uniarp_vcm.c,v 1.1 1998/09/15 08:23:10 phk Exp $
*
*/
@@ -35,6 +35,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: uniarp_vcm.c,v 1.1 1998/09/15 08:23:10 phk Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/ipatm/ipatm_var.h>
@@ -42,10 +46,6 @@
#include <netatm/uni/unisig_var.h>
#include <netatm/uni/uniip_var.h>
-#ifndef lint
-__RCSID("@(#) $Id: uniarp_vcm.c,v 1.2 1998/09/17 09:35:02 phk Exp $");
-#endif
-
/*
* Local variables
diff --git a/sys/netatm/uni/uniip.c b/sys/netatm/uni/uniip.c
index dd7bc3e3f807d..0039585146713 100644
--- a/sys/netatm/uni/uniip.c
+++ b/sys/netatm/uni/uniip.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: uniip.c,v 1.1 1998/09/15 08:23:10 phk Exp $
+ * @(#) $Id: uniip.c,v 1.6 1998/05/18 19:18:42 mks Exp $
*
*/
@@ -35,16 +35,16 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: uniip.c,v 1.6 1998/05/18 19:18:42 mks Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/ipatm/ipatm_var.h>
#include <netatm/ipatm/ipatm_serv.h>
#include <netatm/uni/uniip_var.h>
-#ifndef lint
-__RCSID("@(#) $Id: uniip.c,v 1.1 1998/09/15 08:23:10 phk Exp $");
-#endif
-
/*
* Local functions
diff --git a/sys/netatm/uni/unisig_decode.c b/sys/netatm/uni/unisig_decode.c
index 08fe4b728a7c4..d7d3cd4be92c8 100644
--- a/sys/netatm/uni/unisig_decode.c
+++ b/sys/netatm/uni/unisig_decode.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: unisig_decode.c,v 1.2 1998/09/17 09:35:02 phk Exp $
+ * @(#) $Id: unisig_decode.c,v 1.1 1998/09/15 08:23:10 phk Exp $
*
*/
@@ -35,6 +35,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: unisig_decode.c,v 1.1 1998/09/15 08:23:10 phk Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/uni/unisig.h>
@@ -43,10 +47,6 @@
#include <netatm/uni/unisig_mbuf.h>
#include <netatm/uni/unisig_decode.h>
-#ifndef lint
-__RCSID("@(#) $Id: unisig_decode.c,v 1.2 1998/09/17 09:35:02 phk Exp $");
-#endif
-
#define ALLOC_IE(ie) \
(ie) = (struct ie_generic *) atm_allocate(&unisig_iepool); \
if (!ie) \
diff --git a/sys/netatm/uni/unisig_encode.c b/sys/netatm/uni/unisig_encode.c
index 34a039aec1596..a142a33e43ab4 100644
--- a/sys/netatm/uni/unisig_encode.c
+++ b/sys/netatm/uni/unisig_encode.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: unisig_encode.c,v 1.2 1998/09/17 09:35:02 phk Exp $
+ * @(#) $Id: unisig_encode.c,v 1.1 1998/09/15 08:23:11 phk Exp $
*
*/
@@ -35,6 +35,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: unisig_encode.c,v 1.1 1998/09/15 08:23:11 phk Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/uni/unisig.h>
@@ -43,10 +47,6 @@
#include <netatm/uni/unisig_mbuf.h>
#include <netatm/uni/unisig_decode.h>
-#ifndef lint
-__RCSID("@(#) $Id: unisig_encode.c,v 1.2 1998/09/17 09:35:02 phk Exp $");
-#endif
-
/*
* Local functions
diff --git a/sys/netatm/uni/unisig_if.c b/sys/netatm/uni/unisig_if.c
index 0401154fa8031..e52f650a35365 100644
--- a/sys/netatm/uni/unisig_if.c
+++ b/sys/netatm/uni/unisig_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: unisig_if.c,v 1.4 1998/12/04 22:54:53 archie Exp $
+ * @(#) $Id: unisig_if.c,v 1.1 1998/09/15 08:23:11 phk Exp $
*
*/
@@ -35,6 +35,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: unisig_if.c,v 1.1 1998/09/15 08:23:11 phk Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/ipatm/ipatm_var.h>
@@ -46,10 +50,6 @@
#include <netatm/uni/unisig_var.h>
#include <netatm/uni/unisig_msg.h>
-#ifndef lint
-__RCSID("@(#) $Id: unisig_if.c,v 1.4 1998/12/04 22:54:53 archie Exp $");
-#endif
-
/*
* Global variables
@@ -863,7 +863,7 @@ unisig_ioctl(code, data, arg1)
/*
* Schedule VCC termination
*/
- unisig_cause_attr_from_user(&uvp->uv_connvc->cvc_attr,
+ unisig_set_cause_attr(&uvp->uv_connvc->cvc_attr,
T_ATM_CAUSE_UNSPECIFIED_NORMAL);
err = unisig_abort((struct vccb *)uvp);
break;
@@ -894,8 +894,7 @@ unisig_ioctl(code, data, arg1)
/*
* Fill out the response struct for the VCC
*/
- (void) snprintf(rsp.avp_intf,
- sizeof(rsp.avp_intf), "%s%d",
+ (void) sprintf(rsp.avp_intf, "%s%d",
usp->us_pif->pif_name,
usp->us_pif->pif_unit);
rsp.avp_vpi = uvp->uv_vpi;
diff --git a/sys/netatm/uni/unisig_mbuf.c b/sys/netatm/uni/unisig_mbuf.c
index b96a636a4be8e..c64ee9a85fac7 100644
--- a/sys/netatm/uni/unisig_mbuf.c
+++ b/sys/netatm/uni/unisig_mbuf.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: unisig_mbuf.c,v 1.2 1998/09/17 09:35:02 phk Exp $
+ * @(#) $Id: unisig_mbuf.c,v 1.1 1998/09/15 08:23:11 phk Exp $
*
*/
@@ -35,16 +35,16 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: unisig_mbuf.c,v 1.1 1998/09/15 08:23:11 phk Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/uni/unisig_var.h>
#include <netatm/uni/unisig_mbuf.h>
#include <netatm/uni/unisig_msg.h>
-#ifndef lint
-__RCSID("@(#) $Id: unisig_mbuf.c,v 1.2 1998/09/17 09:35:02 phk Exp $");
-#endif
-
/*
* Initialize a unisig formatting structure
diff --git a/sys/netatm/uni/unisig_msg.c b/sys/netatm/uni/unisig_msg.c
index f52f46e8f446c..4e61cf48571d8 100644
--- a/sys/netatm/uni/unisig_msg.c
+++ b/sys/netatm/uni/unisig_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: unisig_msg.c,v 1.3 1998/10/31 20:07:01 phk Exp $
+ * @(#) $Id: unisig_msg.c,v 1.1 1998/09/15 08:23:11 phk Exp $
*
*/
@@ -35,6 +35,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: unisig_msg.c,v 1.1 1998/09/15 08:23:11 phk Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/uni/unisig.h>
@@ -43,10 +47,6 @@
#include <netatm/uni/unisig_mbuf.h>
#include <netatm/uni/unisig_print.h>
-#ifndef lint
-__RCSID("@(#) $Id: unisig_msg.c,v 1.3 1998/10/31 20:07:01 phk Exp $");
-#endif
-
/*
* Local functions
@@ -68,7 +68,8 @@ static int unisig_print_msg = 0;
*
* Arguments:
* iep pointer to a cause IE
- * aap pointer to attribute block
+ * msg pointer to message
+ * cause cause code for the error
*
* Returns:
* 0 message sent OK
diff --git a/sys/netatm/uni/unisig_print.c b/sys/netatm/uni/unisig_print.c
index 93133cad3d6e1..f335ce45a7b37 100644
--- a/sys/netatm/uni/unisig_print.c
+++ b/sys/netatm/uni/unisig_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: unisig_print.c,v 1.1 1998/09/15 08:23:12 phk Exp $
+ * @(#) $Id: unisig_print.c,v 1.9 1998/08/26 23:29:23 mks Exp $
*
*/
@@ -35,6 +35,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: unisig_print.c,v 1.9 1998/08/26 23:29:23 mks Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/uni/unisig.h>
@@ -42,10 +46,6 @@
#include <netatm/uni/unisig_msg.h>
#include <netatm/uni/unisig_print.h>
-#ifndef lint
-__RCSID("@(#) $Id: unisig_print.c,v 1.1 1998/09/15 08:23:12 phk Exp $");
-#endif
-
/*
* Local declarations
diff --git a/sys/netatm/uni/unisig_proto.c b/sys/netatm/uni/unisig_proto.c
index 8a3daac6753a8..bbad9e64ff858 100644
--- a/sys/netatm/uni/unisig_proto.c
+++ b/sys/netatm/uni/unisig_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: unisig_proto.c,v 1.2 1998/09/17 09:35:02 phk Exp $
+ * @(#) $Id: unisig_proto.c,v 1.1 1998/09/15 08:23:12 phk Exp $
*
*/
@@ -35,6 +35,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: unisig_proto.c,v 1.1 1998/09/15 08:23:12 phk Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/uni/unisig.h>
@@ -42,10 +46,6 @@
#include <netatm/uni/unisig_msg.h>
#include <netatm/uni/unisig_mbuf.h>
-#ifndef lint
-__RCSID("@(#) $Id: unisig_proto.c,v 1.2 1998/09/17 09:35:02 phk Exp $");
-#endif
-
/*
* Process a UNISIG timeout
diff --git a/sys/netatm/uni/unisig_sigmgr_state.c b/sys/netatm/uni/unisig_sigmgr_state.c
index e2213bf2ec6ac..0439d1c758883 100644
--- a/sys/netatm/uni/unisig_sigmgr_state.c
+++ b/sys/netatm/uni/unisig_sigmgr_state.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: unisig_sigmgr_state.c,v 1.3 1998/10/31 20:07:01 phk Exp $
+ * @(#) $Id: unisig_sigmgr_state.c,v 1.1 1998/09/15 08:23:12 phk Exp $
*
*/
@@ -35,6 +35,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: unisig_sigmgr_state.c,v 1.1 1998/09/15 08:23:12 phk Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/uni/uni.h>
@@ -46,10 +50,6 @@
#include <netatm/uni/sscf_uni.h>
-#ifndef lint
-__RCSID("@(#) $Id: unisig_sigmgr_state.c,v 1.3 1998/10/31 20:07:01 phk Exp $");
-#endif
-
/*
* Local functions
@@ -817,6 +817,11 @@ unisig_sigmgr_act14(usp, m)
}
/*
+ * Set the signalling manager state
+ */
+ usp->us_state = UNISIG_DETACH;
+
+ /*
* Close the signalling channel
*/
if (usp->us_conn) {
@@ -844,14 +849,12 @@ unisig_sigmgr_act14(usp, m)
UNLINK((struct siginst *)usp, struct siginst,
smp->sm_prinst, si_next);
KM_FREE(usp, sizeof(struct unisig), M_DEVBUF);
- } else {
- /*
- * Otherwise, set new signalling manager state and
- * wait for protocol instance to be freed during
- * unisig_free processing for the last queued VCC
- */
- usp->us_state = UNISIG_DETACH;
}
+ /*
+ * Otherwise, wait for protocol instance to be freed
+ * during unisig_free processing for the last queued VCC
+ */
+
return (0);
}
diff --git a/sys/netatm/uni/unisig_subr.c b/sys/netatm/uni/unisig_subr.c
index 888cedcf99ab5..52326bc2bc460 100644
--- a/sys/netatm/uni/unisig_subr.c
+++ b/sys/netatm/uni/unisig_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: unisig_subr.c,v 1.4 1998/10/31 20:08:03 phk Exp $
+ * @(#) $Id: unisig_subr.c,v 1.1 1998/09/15 08:23:12 phk Exp $
*
*/
@@ -35,16 +35,16 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: unisig_subr.c,v 1.1 1998/09/15 08:23:12 phk Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/uni/unisig.h>
#include <netatm/uni/unisig_var.h>
#include <netatm/uni/unisig_msg.h>
-#ifndef lint
-__RCSID("@(#) $Id: unisig_subr.c,v 1.4 1998/10/31 20:08:03 phk Exp $");
-#endif
-
/*
* External variables
@@ -73,7 +73,7 @@ extern struct ie_epst ie_epst_absent;
/*
- * Set a User Location cause code in an ATM attribute block
+ * Set a cause code in an ATM attribute block
*
* Arguments:
* aap pointer to attribute block
@@ -84,13 +84,10 @@ extern struct ie_epst ie_epst_absent;
*
*/
void
-unisig_cause_attr_from_user(aap, cause)
+unisig_set_cause_attr(aap, cause)
Atm_attributes *aap;
int cause;
{
- if (cause == T_ATM_ABSENT)
- return;
-
/*
* Set the fields in the attribute block
*/
@@ -104,35 +101,6 @@ unisig_cause_attr_from_user(aap, cause)
/*
- * Set a cause code in an ATM attribute block from a Cause IE
- *
- * Arguments:
- * aap pointer to attribute block
- * iep pointer to Cause IE
- *
- * Returns:
- * none
- *
- */
-void
-unisig_cause_attr_from_ie(aap, iep)
- Atm_attributes *aap;
- struct ie_generic *iep;
-{
- /*
- * Set the fields in the attribute block
- */
- aap->cause.tag = T_ATM_PRESENT;
- aap->cause.v.coding_standard = iep->ie_coding;
- aap->cause.v.location = iep->ie_caus_loc;
- aap->cause.v.cause_value = iep->ie_caus_cause;
- KM_ZERO(aap->cause.v.diagnostics, sizeof(aap->cause.v.diagnostics));
- KM_COPY(iep->ie_caus_diagnostic, aap->cause.v.diagnostics,
- MIN(sizeof(aap->cause.v.diagnostics), iep->ie_caus_diag_len));
-}
-
-
-/*
* Open a UNI VCC
*
* Called when a user wants to open a VC. This function will construct
@@ -434,7 +402,7 @@ unisig_clear_vcc(usp, uvp, cause)
outstate == UNI_SSCF_RECOV ||
outstate == UNI_PVC_ACT_DOWN ||
outstate == UNI_PVC_ACTIVE) {
- unisig_cause_attr_from_user(&uvp->uv_connvc->cvc_attr, cause);
+ unisig_set_cause_attr(&uvp->uv_connvc->cvc_attr, cause);
atm_cm_cleared(uvp->uv_connvc);
}
@@ -1080,8 +1048,6 @@ unisig_set_attrs(usp, msg, ap)
ap->blli.v.layer_2_protocol.ID.simple_ID;
break;
case T_ATM_USER_ID:
- msg->msg_ie_blli->ie_blli_l2_id =
- UNI_IE_BLLI_L2P_USER;
msg->msg_ie_blli->ie_blli_l2_user_proto =
ap->blli.v.layer_2_protocol.ID.user_defined_ID;
break;
diff --git a/sys/netatm/uni/unisig_util.c b/sys/netatm/uni/unisig_util.c
index a3a2ab2ba3cbf..d7a64f6b17e5d 100644
--- a/sys/netatm/uni/unisig_util.c
+++ b/sys/netatm/uni/unisig_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: unisig_util.c,v 1.3 1998/10/31 20:07:01 phk Exp $
+ * @(#) $Id: unisig_util.c,v 1.1 1998/09/15 08:23:13 phk Exp $
*
*/
@@ -35,16 +35,16 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: unisig_util.c,v 1.1 1998/09/15 08:23:13 phk Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/uni/unisig.h>
#include <netatm/uni/unisig_var.h>
#include <netatm/uni/unisig_msg.h>
-#ifndef lint
-__RCSID("@(#) $Id: unisig_util.c,v 1.3 1998/10/31 20:07:01 phk Exp $");
-#endif
-
/*
* Free a UNISIG signalling message
@@ -303,8 +303,7 @@ unisig_addr_print(p)
* two-digit hex representation of the
* NSAP byte in the output buffer
*/
- snprintf(t_buff, sizeof(t_buff),
- "%x", *cp + 512);
+ sprintf(t_buff, "%x", *cp + 512);
strcpy(op, &t_buff[strlen(t_buff)-2]);
op++; op++;
cp++;
@@ -326,8 +325,7 @@ unisig_addr_print(p)
* Print the IA5 characters of the E.164 address
*/
for(i=0; i<p->address_length; i++) {
- snprintf(strbuff + strlen(strbuff),
- sizeof(strbuff) - strlen(strbuff), "%c",
+ sprintf(&strbuff[strlen(strbuff)], "%c",
((Atm_addr_e164 *)p->address)->aae_addr[i]);
}
break;
@@ -348,7 +346,7 @@ unisig_addr_print(p)
/*
* Print the address as two words xxxxx.yyyyyyyy
*/
- snprintf(strbuff, sizeof(strbuff), "%x.%x", u1.w, u2.w);
+ sprintf(strbuff, "%x.%x", u1.w, u2.w);
break;
case T_ATM_ABSENT:
diff --git a/sys/netatm/uni/unisig_var.h b/sys/netatm/uni/unisig_var.h
index b8d422930250a..1e3d01a7748bb 100644
--- a/sys/netatm/uni/unisig_var.h
+++ b/sys/netatm/uni/unisig_var.h
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: unisig_var.h,v 1.1 1998/09/15 08:23:13 phk Exp $
+ * @(#) $Id: unisig_var.h,v 1.12 1998/07/24 20:24:34 mks Exp $
*
*/
@@ -276,9 +276,7 @@ int unisig_sigmgr_state __P((struct unisig *, int,
KBuffer *));
/* unisig_subr.c */
-void unisig_cause_attr_from_user __P((Atm_attributes *, int));
-void unisig_cause_attr_from_ie __P((Atm_attributes *,
- struct ie_generic *));
+void unisig_set_cause_attr __P((Atm_attributes *, int));
int unisig_open_vcc __P((struct unisig *, Atm_connvc *));
int unisig_close_vcc __P((struct unisig *,
struct unisig_vccb *));
diff --git a/sys/netatm/uni/unisig_vc_state.c b/sys/netatm/uni/unisig_vc_state.c
index 84f995e9cf31b..e52515d3d798a 100644
--- a/sys/netatm/uni/unisig_vc_state.c
+++ b/sys/netatm/uni/unisig_vc_state.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: unisig_vc_state.c,v 1.3 1998/10/31 20:07:01 phk Exp $
+ * @(#) $Id: unisig_vc_state.c,v 1.1 1998/09/15 08:23:13 phk Exp $
*
*/
@@ -35,6 +35,10 @@
*
*/
+#ifndef lint
+static char *RCSid = "@(#) $Id: unisig_vc_state.c,v 1.1 1998/09/15 08:23:13 phk Exp $";
+#endif
+
#include <netatm/kern_include.h>
#include <netatm/uni/unisig.h>
@@ -43,10 +47,6 @@
#include <netatm/uni/unisig_mbuf.h>
#include <netatm/uni/unisig_decode.h>
-#ifndef lint
-__RCSID("@(#) $Id: unisig_vc_state.c,v 1.3 1998/10/31 20:07:01 phk Exp $");
-#endif
-
/*
* Local functions
@@ -380,22 +380,13 @@ unisig_vc_act03(usp, uvp, msg)
struct unisig_vccb *uvp;
struct unisig_msg *msg;
{
- int rc, cause;
-
- /*
- * Set cause code
- */
- if ((msg != NULL) && (msg->msg_ie_caus != NULL)) {
- unisig_cause_attr_from_ie(&uvp->uv_connvc->cvc_attr,
- msg->msg_ie_caus);
- cause = T_ATM_ABSENT;
- } else
- cause = T_ATM_CAUSE_DESTINATION_OUT_OF_ORDER;
+ int rc;
/*
* Clear the VCCB
*/
- rc = unisig_clear_vcc(usp, uvp, cause);
+ rc = unisig_clear_vcc(usp, uvp,
+ T_ATM_CAUSE_DESTINATION_OUT_OF_ORDER);
return(rc);
}
@@ -822,11 +813,7 @@ unisig_vc_act07(usp, uvp, msg)
/*
* Notify the user
*/
- if ((msg != NULL) && (msg->msg_ie_caus != NULL))
- unisig_cause_attr_from_ie(&uvp->uv_connvc->cvc_attr,
- msg->msg_ie_caus);
- else
- unisig_cause_attr_from_user(&uvp->uv_connvc->cvc_attr,
+ unisig_set_cause_attr(&uvp->uv_connvc->cvc_attr,
T_ATM_CAUSE_NORMAL_CALL_CLEARING);
atm_cm_cleared(uvp->uv_connvc);
@@ -900,6 +887,18 @@ unisig_vc_act08(usp, uvp, msg)
}
/*
+ * See if we can handle the specified encapsulation
+ */
+ if (msg->msg_ie_blli->ie_blli_l2_id != UNI_IE_BLLI_L2P_LLC &&
+ (msg->msg_ie_blli->ie_blli_l2_id != 0 ||
+ msg->msg_ie_blli->ie_blli_l3_id !=
+ UNI_IE_BLLI_L3P_ISO9577)) {
+ cause = UNI_IE_CAUS_UNAVAIL;
+ ATM_DEBUG0("unisig_vc_act08: bad encapsulation\n");
+ goto response08;
+ }
+
+ /*
* See if we recognize the specified AAL
*/
if (msg->msg_ie_aalp->ie_aalp_aal_type != UNI_IE_AALP_AT_AAL3 &&
@@ -1152,20 +1151,13 @@ unisig_vc_act11(usp, uvp, msg)
struct unisig_vccb *uvp;
struct unisig_msg *msg;
{
- int rc, cause;
-
- /*
- * Send generic cause code if one is not already set
- */
- if (uvp->uv_connvc->cvc_attr.cause.tag == T_ATM_PRESENT)
- cause = T_ATM_ABSENT;
- else
- cause = T_ATM_CAUSE_CALL_REJECTED;
+ int rc;
/*
* Send a RELEASE COMPLETE message
*/
- rc = unisig_send_release_complete(usp, uvp, msg, cause);
+ rc = unisig_send_release_complete(usp, uvp, msg,
+ UNI_IE_CAUS_REJECT);
/*
* Clear the call VCCB
@@ -1214,7 +1206,7 @@ unisig_vc_act12(usp, uvp, msg)
/*
* Send the RELEASE message
*/
- rc = unisig_vc_clear_call(usp, uvp, (struct unisig_msg *)NULL,
+ rc = unisig_vc_clear_call(usp, uvp, (struct unisig_msg *)0,
T_ATM_ABSENT);
return(rc);
@@ -1263,9 +1255,8 @@ unisig_vc_act13(usp, uvp, msg)
/*
* Notify the user that the call is now closed
*/
- if (msg->msg_ie_caus != NULL)
- unisig_cause_attr_from_ie(&uvp->uv_connvc->cvc_attr,
- msg->msg_ie_caus);
+ unisig_set_cause_attr(&uvp->uv_connvc->cvc_attr,
+ T_ATM_CAUSE_NORMAL_CALL_CLEARING);
atm_cm_cleared(uvp->uv_connvc);
return(0);
@@ -1404,12 +1395,8 @@ unisig_vc_act15(usp, uvp, msg)
/*
* Notify the user that the call is cleared
*/
- if (msg->msg_ie_caus != NULL)
- unisig_cause_attr_from_ie(&uvp->uv_connvc->cvc_attr,
- msg->msg_ie_caus);
- else
- unisig_cause_attr_from_user(&uvp->uv_connvc->cvc_attr,
- T_ATM_CAUSE_UNSPECIFIED_NORMAL);
+ unisig_set_cause_attr(&uvp->uv_connvc->cvc_attr,
+ T_ATM_CAUSE_NORMAL_CALL_CLEARING);
atm_cm_cleared(uvp->uv_connvc);
return(rc);
@@ -1448,7 +1435,8 @@ unisig_vc_act16(usp, uvp, msg)
/*
* Clear the VCCB
*/
- rc = unisig_clear_vcc(usp, uvp, T_ATM_ABSENT);
+ rc = unisig_clear_vcc(usp, uvp,
+ T_ATM_CAUSE_NORMAL_CALL_CLEARING);
return(rc);
}
@@ -1684,7 +1672,7 @@ unisig_vc_act21(usp, uvp, msg)
return(0);
}
rc = unisig_clear_vcc(usp, uvp,
- T_ATM_CAUSE_MESSAGE_INCOMPATIBLE_WITH_CALL_STATE);
+ T_ATM_CAUSE_NORMAL_CALL_CLEARING);
}
/*
@@ -1700,7 +1688,8 @@ unisig_vc_act21(usp, uvp, msg)
cause,
msg->msg_ie_caus->ie_caus_diagnostic[0]);
if (uvp) {
- (void)unisig_clear_vcc(usp, uvp, cause);
+ (void)unisig_clear_vcc(usp, uvp,
+ T_ATM_CAUSE_INVALID_INFO_ELEMENT_CONTENTS);
}
}
@@ -1969,10 +1958,8 @@ unisig_vc_act26(usp, uvp, msg)
/*
* Notify the user
*/
- if (uvp->uv_connvc->cvc_attr.cause.tag != T_ATM_PRESENT)
- unisig_cause_attr_from_user(&uvp->uv_connvc->cvc_attr,
+ unisig_set_cause_attr(&uvp->uv_connvc->cvc_attr,
T_ATM_CAUSE_NORMAL_CALL_CLEARING);
-
atm_cm_cleared(uvp->uv_connvc);
return(0);