summaryrefslogtreecommitdiffstats
path: root/sbin/atm
diff options
context:
space:
mode:
authormks <mks@FreeBSD.org>1999-07-01 20:48:59 +0000
committermks <mks@FreeBSD.org>1999-07-01 20:48:59 +0000
commit7707e35f12ca77282d0d391e98bf0db7bf1b734c (patch)
tree4a3901b074c8e4dd2814e00f82d841659871f67a /sbin/atm
parent22e38b45b20e68f38edb59cfdd12a4422d39c6c4 (diff)
downloadFreeBSD-src-7707e35f12ca77282d0d391e98bf0db7bf1b734c.zip
FreeBSD-src-7707e35f12ca77282d0d391e98bf0db7bf1b734c.tar.gz
Modify code to be -Wall'able.
PR: bin/11315
Diffstat (limited to 'sbin/atm')
-rw-r--r--sbin/atm/atm/atm.c28
-rw-r--r--sbin/atm/atm/atm.h3
-rw-r--r--sbin/atm/atm/atm_eni.c34
-rw-r--r--sbin/atm/atm/atm_fore200.c42
-rw-r--r--sbin/atm/atm/atm_inet.c20
-rw-r--r--sbin/atm/atm/atm_print.c41
-rw-r--r--sbin/atm/atm/atm_set.c23
-rw-r--r--sbin/atm/atm/atm_show.c32
-rw-r--r--sbin/atm/atm/atm_subr.c25
-rw-r--r--sbin/atm/fore_dnld/fore_dnld.c40
-rw-r--r--sbin/atm/ilmid/ilmid.c28
11 files changed, 164 insertions, 152 deletions
diff --git a/sbin/atm/atm/atm.c b/sbin/atm/atm/atm.c
index a668b74..9231207 100644
--- a/sbin/atm/atm/atm.c
+++ b/sbin/atm/atm/atm.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.c,v 1.17 1998/08/06 16:57:47 johnc Exp $
+ * @(#) $Id: atm.c,v 1.1 1998/09/15 08:22:45 phk Exp $
*
*/
@@ -35,17 +35,8 @@
*
*/
-#ifndef lint
-static char *RCSid = "@(#) $Id: atm.c,v 1.17 1998/08/06 16:57:47 johnc Exp $";
-#endif
-
#include <sys/types.h>
#include <sys/param.h>
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#include <sys/socket.h>
#include <sys/sockio.h>
#include <net/if.h>
@@ -59,9 +50,19 @@ static char *RCSid = "@(#) $Id: atm.c,v 1.17 1998/08/06 16:57:47 johnc Exp $";
#include <netatm/atm_sigmgr.h>
#include <netatm/atm_ioctl.h>
+#include <errno.h>
#include <libatm.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
#include "atm.h"
+#ifndef lint
+__RCSID("@(#) $Id: atm.c,v 1.1 1998/09/15 08:22:45 phk Exp $");
+#endif
+
/*
* Usage string
@@ -217,6 +218,7 @@ char *prog;
char prefix[128] = "";
+int
main(argc, argv)
int argc;
char **argv;
@@ -226,7 +228,7 @@ main(argc, argv)
/*
* Save program name, ignoring any path components
*/
- if (prog = (char *)strrchr(argv[0], '/'))
+ if ((prog = (char *)strrchr(argv[0], '/')) != NULL)
prog++;
else
prog = argv[0];
@@ -240,7 +242,7 @@ main(argc, argv)
/*
* Validate and process command
*/
- if (error = do_cmd(cmds, argc, argv))
+ if ((error = do_cmd(cmds, argc, argv)) != 0)
usage(cmds, "");
exit(error);
@@ -724,7 +726,7 @@ arp_add(argc, argv, cmdp)
char **argv;
struct cmd *cmdp;
{
- int len, rc, s;
+ int len, s;
struct atmaddreq apr;
Atm_addr host_atm;
struct sockaddr_in *sin;
diff --git a/sbin/atm/atm/atm.h b/sbin/atm/atm/atm.h
index f903bd7..bed5bad 100644
--- a/sbin/atm/atm/atm.h
+++ b/sbin/atm/atm/atm.h
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: atm.h,v 1.1 1998/09/15 08:22:45 phk Exp $
+ * @(#) $Id: atm.h,v 1.2 1999/01/20 18:36:58 mks Exp $
*
*/
@@ -166,6 +166,7 @@ void ip_pvcadd __P((int, char **, struct cmd *, struct atmaddreq *,
/* atm_print.c */
void print_arp_info __P((struct air_arp_rsp *));
void print_asrv_info __P((struct air_asrv_rsp *));
+void print_cfg_info __P((struct air_cfg_rsp *));
void print_intf_info __P((struct air_int_rsp *));
void print_ip_vcc_info __P((struct air_ip_vcc_rsp *));
void print_netif_info __P((struct air_netif_rsp *));
diff --git a/sbin/atm/atm/atm_eni.c b/sbin/atm/atm/atm_eni.c
index 272e48f..6bf0985 100644
--- a/sbin/atm/atm/atm_eni.c
+++ b/sbin/atm/atm/atm_eni.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_eni.c,v 1.8 1998/08/26 23:29:31 mks Exp $
+ * @(#) $Id: atm_eni.c,v 1.1 1998/09/15 08:22:45 phk Exp $
*
*/
@@ -35,17 +35,8 @@
*
*/
-#ifndef lint
-static char *RCSid = "@(#) $Id: atm_eni.c,v 1.8 1998/08/26 23:29:31 mks Exp $";
-#endif
-
#include <sys/types.h>
#include <sys/param.h>
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#include <sys/socket.h>
#include <net/if.h>
#include <netinet/in.h>
@@ -55,10 +46,19 @@ static char *RCSid = "@(#) $Id: atm_eni.c,v 1.8 1998/08/26 23:29:31 mks Exp $";
#include <netatm/atm_sap.h>
#include <netatm/atm_sys.h>
#include <netatm/atm_ioctl.h>
+#include <dev/hea/eni_stats.h>
+#include <errno.h>
#include <libatm.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
#include "atm.h"
-#include <dev/hea/eni_stats.h>
+
+#ifndef lint
+__RCSID("@(#) $Id: atm_eni.c,v 1.1 1998/09/15 08:22:45 phk Exp $");
+#endif
/*
@@ -241,7 +241,7 @@ print_eni_oc3(vi)
/*
* Print the OC-3c info
*/
- printf("%7d %7d %7d %7d %7d %7d %7d\n",
+ printf("%7ld %7ld %7ld %7ld %7ld %7ld %7ld\n",
stats->eni_st_oc3.oc3_sect_bip8,
stats->eni_st_oc3.oc3_path_bip8,
stats->eni_st_oc3.oc3_line_bip24,
@@ -282,7 +282,7 @@ print_eni_atm(vi)
/*
* Print the ATM layer info
*/
- printf("%10d %10d\n",
+ printf("%10ld %10ld\n",
stats->eni_st_atm.atm_rcvd,
stats->eni_st_atm.atm_xmit);
}
@@ -318,7 +318,7 @@ print_eni_aal0(vi)
/*
* Print the AAL 0 info
*/
- printf("%10d %10d %10d\n",
+ printf("%10ld %10ld %10ld\n",
stats->eni_st_aal0.aal0_rcvd,
stats->eni_st_aal0.aal0_xmit,
stats->eni_st_aal0.aal0_drops);
@@ -355,7 +355,7 @@ print_eni_aal5(vi)
/*
* Print the AAL 5 info
*/
- printf("%10d %10d %5d %5d %9d %9d %5d %5d %5d\n",
+ printf("%10ld %10ld %5ld %5ld %9ld %9ld %5ld %5ld %5ld\n",
stats->eni_st_aal5.aal5_rcvd,
stats->eni_st_aal5.aal5_xmit,
stats->eni_st_aal5.aal5_crc_len,
@@ -397,7 +397,7 @@ print_eni_driver(vi)
/*
* Print the driver info
*/
- printf ( "%5d %5d %5d %5d %5d %5d %5d %5d %5d %5d %5d\n",
+ printf ( "%5ld %5ld %5ld %5ld %5ld %5ld %5ld %5ld %5ld %5ld %5ld\n",
stats->eni_st_drv.drv_mm_toobig,
stats->eni_st_drv.drv_mm_nodesc,
stats->eni_st_drv.drv_mm_nobuf,
@@ -419,7 +419,7 @@ print_eni_driver(vi)
/*
* Print the driver info
*/
- printf ( "%5d %5d %5d %5d %5d %5d %5d %7d %5d %7d\n",
+ printf ( "%5ld %5ld %5ld %5ld %5ld %5ld %5ld %7ld %5ld %7ld\n",
stats->eni_st_drv.drv_rv_novcc,
stats->eni_st_drv.drv_rv_intrq,
stats->eni_st_drv.drv_rv_segdma,
diff --git a/sbin/atm/atm/atm_fore200.c b/sbin/atm/atm/atm_fore200.c
index 9dd64b4..0040aa4 100644
--- a/sbin/atm/atm/atm_fore200.c
+++ b/sbin/atm/atm/atm_fore200.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_fore200.c,v 1.10 1998/08/26 23:29:31 mks Exp $
+ * @(#) $Id: atm_fore200.c,v 1.1 1998/09/15 08:22:45 phk Exp $
*
*/
@@ -35,17 +35,8 @@
*
*/
-#ifndef lint
-static char *RCSid = "@(#) $Id: atm_fore200.c,v 1.10 1998/08/26 23:29:31 mks Exp $";
-#endif
-
#include <sys/types.h>
#include <sys/param.h>
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#include <sys/socket.h>
#include <net/if.h>
#include <netinet/in.h>
@@ -55,13 +46,22 @@ static char *RCSid = "@(#) $Id: atm_fore200.c,v 1.10 1998/08/26 23:29:31 mks Exp
#include <netatm/atm_sap.h>
#include <netatm/atm_sys.h>
#include <netatm/atm_ioctl.h>
-
-#include <libatm.h>
-#include "atm.h"
#include <dev/hfa/fore_aali.h>
#include <dev/hfa/fore_slave.h>
#include <dev/hfa/fore_stats.h>
+#include <errno.h>
+#include <libatm.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "atm.h"
+
+#ifndef lint
+__RCSID("@(#) $Id: atm_fore200.c,v 1.1 1998/09/15 08:22:45 phk Exp $");
+#endif
+
/*
* Local constants
@@ -305,7 +305,7 @@ print_fore200_taxi(vi)
/*
* Print the physical layer info
*/
- printf("%10d %12d\n",
+ printf("%10ld %12ld\n",
stats->st_taxi.taxi_bad_crc,
stats->st_taxi.taxi_framing);
}
@@ -341,7 +341,7 @@ print_fore200_oc3(vi)
/*
* Print the OC-3c info
*/
- printf("%7d %7d %7d %7d %7d %7d %7d\n",
+ printf("%7ld %7ld %7ld %7ld %7ld %7ld %7ld\n",
stats->st_oc3.oc3_sect_bip8,
stats->st_oc3.oc3_path_bip8,
stats->st_oc3.oc3_line_bip24,
@@ -382,7 +382,7 @@ print_fore200_dev(vi)
/*
* Print the device info
*/
- printf("%10d %10d %10d %10d %10d %s\n",
+ printf("%10ld %10ld %10ld %10ld %10ld %s\n",
stats->st_misc.buf1_sm_fail,
stats->st_misc.buf1_lg_fail,
stats->st_misc.buf2_sm_fail,
@@ -422,7 +422,7 @@ print_fore200_atm(vi)
/*
* Print the ATM layer info
*/
- printf("%10d %10d %10d %10d %10d %10d\n",
+ printf("%10ld %10ld %10ld %10ld %10ld %10ld\n",
stats->st_atm.atm_rcvd,
stats->st_atm.atm_xmit,
stats->st_atm.atm_vpi_range,
@@ -462,7 +462,7 @@ print_fore200_aal0(vi)
/*
* Print the AAL 0 info
*/
- printf("%10d %10d %10d\n",
+ printf("%10ld %10ld %10ld\n",
stats->st_aal0.aal0_rcvd,
stats->st_aal0.aal0_xmit,
stats->st_aal0.aal0_drops);
@@ -499,7 +499,7 @@ print_fore200_aal4(vi)
/*
* Print the AAL 4 info
*/
- printf("%10d %10d %5d %5d %5d %9d %9d %5d %5d\n",
+ printf("%10ld %10ld %5ld %5ld %5ld %9ld %9ld %5ld %5ld\n",
stats->st_aal4.aal4_rcvd,
stats->st_aal4.aal4_xmit,
stats->st_aal4.aal4_crc,
@@ -542,7 +542,7 @@ print_fore200_aal5(vi)
/*
* Print the AAL 5 info
*/
- printf("%10d %10d %5d %5d %9d %9d %5d %5d %5d\n",
+ printf("%10ld %10ld %5ld %5ld %9ld %9ld %5ld %5ld %5ld\n",
stats->st_aal5.aal5_rcvd,
stats->st_aal5.aal5_xmit,
stats->st_aal5.aal5_crc_len,
@@ -585,7 +585,7 @@ print_fore200_driver(vi)
/*
* Print the driver info
*/
- printf("%4d %4d %4d %4d %4d %4d %4d %4d %4d %4d %4d %4d %4d\n",
+ printf("%4ld %4ld %4ld %4ld %4ld %4ld %4ld %4ld %4ld %4ld %4ld %4ld %4ld\n",
stats->st_drv.drv_xm_notact,
stats->st_drv.drv_xm_full,
stats->st_drv.drv_xm_maxpdu,
diff --git a/sbin/atm/atm/atm_inet.c b/sbin/atm/atm/atm_inet.c
index 91b62dc..9ca2ceb 100644
--- a/sbin/atm/atm/atm_inet.c
+++ b/sbin/atm/atm/atm_inet.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_inet.c,v 1.9 1998/08/26 23:29:31 mks Exp $
+ * @(#) $Id: atm_inet.c,v 1.1 1998/09/15 08:22:45 phk Exp $
*
*/
@@ -35,18 +35,9 @@
*
*/
-#ifndef lint
-static char *RCSid = "@(#) $Id: atm_inet.c,v 1.9 1998/08/26 23:29:31 mks Exp $";
-#endif
-
#include <sys/types.h>
#include <sys/param.h>
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <sys/socket.h>
-#include <string.h>
#include <net/if.h>
#include <netinet/in.h>
#include <netatm/port.h>
@@ -56,9 +47,18 @@ static char *RCSid = "@(#) $Id: atm_inet.c,v 1.9 1998/08/26 23:29:31 mks Exp $";
#include <netatm/atm_sys.h>
#include <netatm/atm_ioctl.h>
+#include <errno.h>
#include <libatm.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
#include "atm.h"
+#ifndef lint
+__RCSID("@(#) $Id: atm_inet.c,v 1.1 1998/09/15 08:22:45 phk Exp $");
+#endif
+
/*
* Process add command for a TCP/IP PVC
diff --git a/sbin/atm/atm/atm_print.c b/sbin/atm/atm/atm_print.c
index 93aaef8..4b5e843 100644
--- a/sbin/atm/atm/atm_print.c
+++ b/sbin/atm/atm/atm_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: atm_print.c,v 1.12 1998/07/30 22:38:56 mks Exp $
+ * @(#) $Id: atm_print.c,v 1.1 1998/09/15 08:22:45 phk Exp $
*
*/
@@ -35,19 +35,12 @@
*
*/
-#ifndef lint
-static char *RCSid = "@(#) $Id: atm_print.c,v 1.12 1998/07/30 22:38:56 mks Exp $";
-#endif
-
#include <sys/types.h>
#include <sys/param.h>
-
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
#include <sys/socket.h>
#include <net/if.h>
#include <netinet/in.h>
+#include <arpa/inet.h>
#include <netatm/port.h>
#include <netatm/atm.h>
#include <netatm/atm_if.h>
@@ -56,15 +49,23 @@ static char *RCSid = "@(#) $Id: atm_print.c,v 1.12 1998/07/30 22:38:56 mks Exp $
#include <netatm/atm_sys.h>
#include <netatm/atm_vc.h>
#include <netatm/atm_ioctl.h>
-
-#include <libatm.h>
#include <netatm/ipatm/ipatm_var.h>
#include <netatm/sigpvc/sigpvc_var.h>
#include <netatm/spans/spans_var.h>
#include <netatm/uni/uniip_var.h>
#include <netatm/uni/unisig_var.h>
+
+#include <errno.h>
+#include <libatm.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
#include "atm.h"
+#ifndef lint
+__RCSID("@(#) $Id: atm_print.c,v 1.1 1998/09/15 08:22:45 phk Exp $");
+#endif
#define ARP_HDR \
@@ -349,7 +350,6 @@ print_asrv_info(si)
{
int i;
char *atm_addr, *state;
- char print_lis[32];
struct in_addr *addr;
/*
@@ -395,7 +395,7 @@ print_asrv_info(si)
for (i = 0; i < si->asp_nprefix; i++) {
printf("%s", inet_ntoa(*addr));
addr++;
- printf("/0x%0x", ntohl(addr->s_addr));
+ printf("/0x%0lx", ntohl(addr->s_addr));
addr++;
if (i < si->asp_nprefix -1)
printf(", ");
@@ -444,7 +444,7 @@ print_cfg_info(si)
/*
* Print the ARP server information
*/
- printf("%-8s %-8s %-8s %-14s %-4s %d\n",
+ printf("%-8s %-8s %-8s %-14s %-4s %ld\n",
si->acp_intf,
vendor,
adapter,
@@ -474,9 +474,8 @@ print_intf_info(ni)
{
int i;
char nif_names[(IFNAMSIZ *2)+4];
- char *atm_addr, *ip_addr;
+ char *atm_addr;
char *sigmgr = "-", *state_name = "-";
- struct sockaddr_in *sin;
struct state *s_t;
/*
@@ -681,8 +680,6 @@ void
print_intf_stats(pi)
struct air_phy_stat_rsp *pi;
{
- int i;
-
/*
* Print a header if it hasn't already been done
*/
@@ -694,7 +691,7 @@ print_intf_stats(pi)
/*
* Print the interface statistics
*/
- printf("%-9s %7d %8d %5d %7d %8d %5d %5d\n",
+ printf("%-9s %7ld %8ld %5ld %7ld %8ld %5ld %5ld\n",
pi->app_intf,
pi->app_ipdus,
pi->app_ibytes,
@@ -737,7 +734,7 @@ print_vcc_stats(vi)
vi->avp_vpi,
vi->avp_vci);
if ( vi->avp_type & VCC_IN )
- printf ( " %7d %8d %5d",
+ printf ( " %7ld %8ld %5ld",
vi->avp_ipdus,
vi->avp_ibytes,
vi->avp_ierrors);
@@ -745,7 +742,7 @@ print_vcc_stats(vi)
printf ( " - - -" );
if ( vi->avp_type & VCC_OUT )
- printf ( " %7d %8d %5d\n",
+ printf ( " %7ld %8ld %5ld\n",
vi->avp_opdus,
vi->avp_obytes,
vi->avp_oerrors);
@@ -770,7 +767,7 @@ print_vcc_info(vi)
{
int i;
char *aal_name = "-" , *encaps_name = "-", *owner_name = "-";
- char *proto_name = "-", *state_name = "-", *type_name = "-";
+ char *state_name = "-", *type_name = "-";
char dir_name[10];
struct state *s_t;
diff --git a/sbin/atm/atm/atm_set.c b/sbin/atm/atm/atm_set.c
index 199c37f..413116b 100644
--- a/sbin/atm/atm/atm_set.c
+++ b/sbin/atm/atm/atm_set.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_set.c,v 1.12 1998/08/26 23:29:32 mks Exp $
+ * @(#) $Id: atm_set.c,v 1.1 1998/09/15 08:22:45 phk Exp $
*
*/
@@ -35,17 +35,8 @@
*
*/
-#ifndef lint
-static char *RCSid = "@(#) $Id: atm_set.c,v 1.12 1998/08/26 23:29:32 mks Exp $";
-#endif
-
#include <sys/types.h>
#include <sys/param.h>
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#include <sys/socket.h>
#include <sys/sockio.h>
#include <net/if.h>
@@ -57,9 +48,19 @@ static char *RCSid = "@(#) $Id: atm_set.c,v 1.12 1998/08/26 23:29:32 mks Exp $";
#include <netatm/atm_sys.h>
#include <netatm/atm_ioctl.h>
+#include <errno.h>
#include <libatm.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
#include "atm.h"
+#ifndef lint
+__RCSID("@(#) $Id: atm_set.c,v 1.1 1998/09/15 08:22:45 phk Exp $");
+#endif
+
/*
* Process ATM ARP server set command
@@ -83,7 +84,7 @@ set_arpserver(argc, argv, cmdp)
struct cmd *cmdp;
{
int i, len, prefix_len = 0, rc, s;
- char *cp, *intf;
+ char *intf;
Atm_addr server;
struct sockaddr_in *lis;
struct sockaddr_in if_mask;
diff --git a/sbin/atm/atm/atm_show.c b/sbin/atm/atm/atm_show.c
index 8c32dfc..7e29685 100644
--- a/sbin/atm/atm/atm_show.c
+++ b/sbin/atm/atm/atm_show.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_show.c,v 1.12 1998/07/24 16:20:34 johnc Exp $
+ * @(#) $Id: atm_show.c,v 1.1 1998/09/15 08:22:46 phk Exp $
*
*/
@@ -35,17 +35,8 @@
*
*/
-#ifndef lint
-static char *RCSid = "@(#) $Id: atm_show.c,v 1.12 1998/07/24 16:20:34 johnc Exp $";
-#endif
-
#include <sys/types.h>
#include <sys/param.h>
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#include <sys/socket.h>
#include <net/if.h>
#include <netinet/in.h>
@@ -57,9 +48,18 @@ static char *RCSid = "@(#) $Id: atm_show.c,v 1.12 1998/07/24 16:20:34 johnc Exp
#include <netatm/atm_vc.h>
#include <netatm/atm_ioctl.h>
+#include <errno.h>
#include <libatm.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
#include "atm.h"
+#ifndef lint
+__RCSID("@(#) $Id: atm_show.c,v 1.1 1998/09/15 08:22:46 phk Exp $");
+#endif
+
/*
* Local functions
@@ -90,7 +90,7 @@ show_arp(argc, argv, cmdp)
char **argv;
struct cmd *cmdp;
{
- int buf_len, arp_info_len, ip_info_len, sel;
+ int buf_len, arp_info_len;
struct atminfreq air;
struct air_arp_rsp *arp_info, *arp_info_base;
struct sockaddr_in *sin;
@@ -418,7 +418,7 @@ show_ip_vcc(argc, argv, cmdp)
char **argv;
struct cmd *cmdp;
{
- int buf_len, ip_info_len, rc, sel;
+ int buf_len, ip_info_len, rc;
char *if_name = (char *)0;
struct atminfreq air;
struct air_ip_vcc_rsp *ip_info, *ip_info_base;
@@ -1150,17 +1150,17 @@ arp_compare(p1, p2)
/*
* Compare the IP addresses
*/
- if (rc = sin1->sin_family - sin2->sin_family)
+ if ((rc = sin1->sin_family - sin2->sin_family) != 0)
return(rc);
- if (rc = sin1->sin_addr.s_addr - sin2->sin_addr.s_addr)
+ if ((rc = sin1->sin_addr.s_addr - sin2->sin_addr.s_addr) != 0)
return(rc);
/*
* Compare the ATM addresses
*/
- if (rc = c1->aap_addr.address_format - c2->aap_addr.address_format)
+ if ((rc = c1->aap_addr.address_format - c2->aap_addr.address_format) != 0)
return(rc);
- if (rc = c1->aap_addr.address_length - c2->aap_addr.address_length)
+ if ((rc = c1->aap_addr.address_length - c2->aap_addr.address_length) != 0)
return(rc);
switch(c1->aap_addr.address_format) {
case T_ATM_ABSENT:
diff --git a/sbin/atm/atm/atm_subr.c b/sbin/atm/atm/atm_subr.c
index 4571173..6c2cbb9 100644
--- a/sbin/atm/atm/atm_subr.c
+++ b/sbin/atm/atm/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.11 1998/07/09 22:24:03 johnc Exp $
+ * @(#) $Id: atm_subr.c,v 1.1 1998/09/15 08:22:46 phk Exp $
*
*/
@@ -35,17 +35,8 @@
*
*/
-#ifndef lint
-static char *RCSid = "@(#) $Id: atm_subr.c,v 1.11 1998/07/09 22:24:03 johnc Exp $";
-#endif
-
#include <sys/types.h>
#include <sys/param.h>
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#include <sys/socket.h>
#include <net/if.h>
#include <netinet/in.h>
@@ -55,10 +46,20 @@ static char *RCSid = "@(#) $Id: atm_subr.c,v 1.11 1998/07/09 22:24:03 johnc Exp
#include <netatm/atm_sap.h>
#include <netatm/atm_sys.h>
#include <netatm/atm_ioctl.h>
+#include <arpa/inet.h>
+#include <errno.h>
#include <libatm.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
#include "atm.h"
+#ifndef lint
+__RCSID("@(#) $Id: atm_subr.c,v 1.1 1998/09/15 08:22:46 phk Exp $");
+#endif
+
/*
* Table entry definition
@@ -328,7 +329,7 @@ parse_ip_prefix(cp, op)
char *cp;
struct in_addr *op;
{
- int i, len;
+ int len;
char *mp;
struct in_addr ip_addr;
@@ -494,7 +495,7 @@ compress_prefix_list(ipp, ilen)
/*
* m1 is longer
*/
- if (ip1->s_addr & m2->s_addr ==
+ if ((ip1->s_addr & m2->s_addr) ==
ip2->s_addr) {
ip1->s_addr = 0;
m1->s_addr = 0;
diff --git a/sbin/atm/fore_dnld/fore_dnld.c b/sbin/atm/fore_dnld/fore_dnld.c
index fa4fc1a..ecf0567 100644
--- a/sbin/atm/fore_dnld/fore_dnld.c
+++ b/sbin/atm/fore_dnld/fore_dnld.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: fore_dnld.c,v 1.2 1998/10/30 16:17:43 dg Exp $
+ * @(#) $Id: fore_dnld.c,v 1.3 1999/05/23 23:18:34 imp Exp $
*
*/
@@ -36,36 +36,37 @@
*
*/
-#ifndef lint
-static char *RCSid = "@(#) $Id: fore_dnld.c,v 1.2 1998/10/30 16:17:43 dg Exp $";
-#endif
-
#include <sys/types.h>
#include <sys/param.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <fcntl.h>
#include <sys/mman.h>
#include <sys/socket.h>
-#include <net/if.h>
#include <sys/stat.h>
+#include <net/if.h>
#include <netatm/atm.h>
#include <netatm/atm_if.h>
#include <netatm/atm_sap.h>
#include <netatm/atm_sys.h>
#include <netatm/atm_ioctl.h>
-
#include <dev/hfa/fore.h>
#include <dev/hfa/fore_aali.h>
#include <dev/hfa/fore_slave.h>
+#include <ctype.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#if (defined(BSD) && (BSD >= 199103))
#include <termios.h>
#else
#include <termio.h>
#endif /* !BSD */
+#include <unistd.h>
+
+#ifndef lint
+__RCSID("@(#) $Id: fore_dnld.c,v 1.3 1999/05/23 23:18:34 imp Exp $");
+#endif
+
#ifdef sun
#define DEV_NAME "/dev/sbus%d"
@@ -98,6 +99,7 @@ int lineptr = 0;
Mon960 *Uart;
+void
delay(cnt)
int cnt;
{
@@ -256,6 +258,7 @@ int dn;
* Returns:
* none
*/
+void
xmit_to_i960 ( line, len, dn )
char *line;
int len;
@@ -670,10 +673,12 @@ u_char *ram;
u_long start;
u_long entry;
} binhdr;
+#ifdef sun
union {
u_long w;
char c[4];
} w1, w2;
+#endif
int fd;
int n;
int cnt = 0;
@@ -784,9 +789,8 @@ u_char *ram;
*/
{
char cmd[80];
- char c;
- sprintf ( cmd, "go %x\r\n", binhdr.entry );
+ sprintf ( cmd, "go %lx\r\n", binhdr.entry );
xmit_to_i960 ( cmd, strlen ( cmd ), 0 );
@@ -805,6 +809,7 @@ u_char *ram;
/*
* Program to download previously processed microcode to series-200 host adapter
*/
+int
main( argc, argv )
int argc;
char *argv[];
@@ -817,7 +822,6 @@ char *argv[];
int i, err;
int binary = 0; /* Send binary file */
caddr_t buf; /* Ioctl buffer */
- Atm_config *adp; /* Adapter config */
char bus_dev[80]; /* Bus device to mmap on */
struct atminfreq req;
struct air_cfg_rsp *air; /* Config info response structure */
@@ -929,7 +933,11 @@ char *argv[];
/*
* Create /dev name
*/
+#ifdef sun
sprintf ( bus_dev, DEV_NAME, air->acp_busslot );
+#else
+ sprintf ( bus_dev, DEV_NAME );
+#endif
/*
* Setup signal handlers
@@ -1197,6 +1205,8 @@ char *argv[];
} else
sndfile = filename;
break;
+ default:
+ break;
}
} else
sndfile = objfile;
diff --git a/sbin/atm/ilmid/ilmid.c b/sbin/atm/ilmid/ilmid.c
index a1c6e34..7c2e0f3 100644
--- a/sbin/atm/ilmid/ilmid.c
+++ b/sbin/atm/ilmid/ilmid.c
@@ -23,7 +23,7 @@
* Copies of this Software may be made, however, the above copyright
* notice must be reproduced on all copies.
*
- * @(#) $Id: ilmid.c,v 1.2 1999/01/20 00:56:21 mks Exp $
+ * @(#) $Id: ilmid.c,v 1.3 1999/05/23 23:18:38 imp Exp $
*
*/
@@ -46,19 +46,6 @@
*/
#include <sys/param.h>
-
-#ifndef lint
-__RCSID("@(#) $Id: ilmid.c,v 1.2 1999/01/20 00:56:21 mks Exp $");
-#endif
-
-#include <err.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <syslog.h>
-#include <time.h>
-#include <unistd.h>
#include <sys/socket.h>
#include <sys/sockio.h>
#include <net/if.h>
@@ -75,7 +62,20 @@ __RCSID("@(#) $Id: ilmid.c,v 1.2 1999/01/20 00:56:21 mks Exp $");
#include <dev/hfa/fore_slave.h>
#include <dev/hfa/fore_stats.h>
+#include <err.h>
+#include <errno.h>
#include <libatm.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <syslog.h>
+#include <time.h>
+#include <unistd.h>
+
+#ifndef lint
+__RCSID("@(#) $Id: ilmid.c,v 1.3 1999/05/23 23:18:38 imp Exp $");
+#endif
+
#define MAX_LEN 9180
OpenPOWER on IntegriCloud