diff options
author | Michael I. Bushnell <mib@gnu.org> | 1995-10-20 21:14:03 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1995-10-20 21:14:03 +0000 |
commit | 62c948919f2947a12541851757831a82b9aaca8a (patch) | |
tree | 374ab3ec4b09f508d7db18ba133ca5979788ea3c | |
parent | 50326660792937362d5710dff973861d61332e0d (diff) |
Formerly main.c.~6~
-rw-r--r-- | pfinet/main.c | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/pfinet/main.c b/pfinet/main.c index 5e1d5f2e..4b3a8263 100644 --- a/pfinet/main.c +++ b/pfinet/main.c @@ -24,8 +24,6 @@ main () { - char addr[4]; - pfinet_bucket = ports_create_bucket (); init_devices (); @@ -37,22 +35,31 @@ main () inet_proto_init (); /* Simulate SIOCSIFADDR call. */ + { + char addr[4]; - /* 128.52.46.37 is turing.gnu.ai.mit.edu. */ - addr[0] = 128; - addr[1] = 52; - addr[2] = 46; - addr[3] = 37; - ether_dev.pa_addr = *(u_long *)addr; + /* 128.52.46.37 is turing.gnu.ai.mit.edu. */ + addr[0] = 128; + addr[1] = 52; + addr[2] = 46; + addr[3] = 37; + ether_dev.pa_addr = *(u_long *)addr; - /* Mask is 255.255.255.0. */ - addr[0] = addr[1] = addr[2] = 255; - addr[3] = 0; - ether_dev.pa_mask = *(u_long *)addr; + /* Mask is 255.255.255.0. */ + addr[0] = addr[1] = addr[2] = 255; + addr[3] = 0; + ether_dev.pa_mask = *(u_long *)addr; - ether_dev.family = AF_INET; - ether_dev.pa_brdaddr = ether_dev.pa_addr | ~ether_dev.pa_mask; + ether_dev.family = AF_INET; + ether_dev.pa_brdaddr = ether_dev.pa_addr | ~ether_dev.pa_mask; + } + /* Simulate SIOCADDRT call */ + { + ip_rt_add (0, ether_dev.pa_addr & ether_dev.pa_mask, ether_dev.pa_mask, + 0, ðer_dev, 0, 0); + } + /* Turn on device. */ dev_open (ðer_dev); |