From c4659640727bfbb4e018af3bbce5ec5743d1fcee Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Mon, 25 Sep 1995 20:24:40 +0000 Subject: Formerly main.c.~3~ --- pfinet/main.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/pfinet/main.c b/pfinet/main.c index 518c8baa..5b30c4eb 100644 --- a/pfinet/main.c +++ b/pfinet/main.c @@ -18,8 +18,34 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */ -#include +#include "pfinet.h" main () { + char addr[4]; + + setup_ethernet_device (); + + /* Call initialization routines */ + init_proto_init (); + + /* Simulate SIOCSIFADDR call. */ + + /* 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; + + ether_dev.family = AF_INET; + ether_dev.pa_brdaddr = ether_dev->pa_addr | ~ether_dev->pa_mask; + + /* Turn on device. */ + dev_open (ðer_dev); } -- cgit v1.2.3