aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2004-12-30 16:56:07 +0000
committerRobert Watson <rwatson@FreeBSD.org>2004-12-30 16:56:07 +0000
commit05b4b08b61b3d4d55e68ee3a16b84ec378542e36 (patch)
treeec55bc0d0b5e2b6edf3c1b0657564c62d8a8741d
parent7665f445d0acc2e9aa64a83c63ca91120bcf1547 (diff)
Notes
-rw-r--r--sys/netipx/ipx_input.c15
-rw-r--r--sys/netipx/ipx_var.h8
2 files changed, 11 insertions, 12 deletions
diff --git a/sys/netipx/ipx_input.c b/sys/netipx/ipx_input.c
index a511a4f623ec7..9e12ac60a8cb2 100644
--- a/sys/netipx/ipx_input.c
+++ b/sys/netipx/ipx_input.c
@@ -72,17 +72,18 @@ static int ipxnetbios = 0;
SYSCTL_INT(_net_ipx, OID_AUTO, ipxnetbios, CTLFLAG_RW,
&ipxnetbios, 0, "");
-union ipx_net ipx_zeronet;
-union ipx_host ipx_zerohost;
+const union ipx_net ipx_zeronet;
+const union ipx_host ipx_zerohost;
-union ipx_net ipx_broadnet;
-union ipx_host ipx_broadhost;
+const union ipx_net ipx_broadnet = { .s_net[0] = 0xffff,
+ .s_net[1] = 0xffff };
+const union ipx_host ipx_broadhost = { .s_host[0] = 0xffff,
+ .s_host[1] = 0xffff,
+ .s_host[2] = 0xffff };
struct ipxstat ipxstat;
struct sockaddr_ipx ipx_netmask, ipx_hostmask;
-static u_short allones[] = {-1, -1, -1};
-
struct ipxpcb ipxpcb;
struct ipxpcb ipxrawpcb;
@@ -103,8 +104,6 @@ static void ipxintr(struct mbuf *m);
void
ipx_init()
{
- ipx_broadnet = *(union ipx_net *)allones;
- ipx_broadhost = *(union ipx_host *)allones;
read_random(&ipx_pexseq, sizeof ipx_pexseq);
ipxpcb.ipxp_next = ipxpcb.ipxp_prev = &ipxpcb;
diff --git a/sys/netipx/ipx_var.h b/sys/netipx/ipx_var.h
index ff2045e933f31..04cbec5a94278 100644
--- a/sys/netipx/ipx_var.h
+++ b/sys/netipx/ipx_var.h
@@ -72,10 +72,10 @@ extern struct pr_usrreqs ripx_usrreqs;
extern struct sockaddr_ipx ipx_netmask;
extern struct sockaddr_ipx ipx_hostmask;
-extern union ipx_net ipx_zeronet;
-extern union ipx_host ipx_zerohost;
-extern union ipx_net ipx_broadnet;
-extern union ipx_host ipx_broadhost;
+extern const union ipx_net ipx_zeronet;
+extern const union ipx_host ipx_zerohost;
+extern const union ipx_net ipx_broadnet;
+extern const union ipx_host ipx_broadhost;
struct ifnet;
struct ipx_addr;