summaryrefslogtreecommitdiff
path: root/pfinet
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1995-09-25 20:24:40 +0000
committerMichael I. Bushnell <mib@gnu.org>1995-09-25 20:24:40 +0000
commitc4659640727bfbb4e018af3bbce5ec5743d1fcee (patch)
tree3d0d5109f3f2c983399078a5cffc31361c58ad9f /pfinet
parent66906b7aa5c5ccb09335939578cfd0ccfcf583cd (diff)
Formerly main.c.~3~
Diffstat (limited to 'pfinet')
-rw-r--r--pfinet/main.c28
1 files changed, 27 insertions, 1 deletions
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 <cthreads.h>
+#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 (&ether_dev);
}