1. Add serial devices to list of possible network device candidates.

2. Rework tcpip.c a bit so that devices which have been configured also
   have the enabled flag set.
This commit is contained in:
Jordan K. Hubbard 1995-05-18 13:18:35 +00:00
parent ab9357a910
commit 690e60d830
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=8595
5 changed files with 23 additions and 10 deletions

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: devices.c,v 1.16 1995/05/16 11:37:08 jkh Exp $
* $Id: devices.c,v 1.17 1995/05/17 14:39:36 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -105,6 +105,9 @@ static struct {
{ DEVICE_TYPE_NETWORK, "lnc", "Lance/PCnet cards (Isolan/Novell NE2100/NE32-VL)" },
{ DEVICE_TYPE_NETWORK, "ze", "IBM/National Semiconductor PCMCIA ethernet" },
{ DEVICE_TYPE_NETWORK, "zp", "3Com PCMCIA Etherlink III" },
{ DEVICE_TYPE_NETWORK, "cuaa0", "Serial port (COM1) - possible PPP device" },
{ DEVICE_TYPE_NETWORK, "cuaa1", "Serial port (COM2) - possible PPP devic
e", },
{ NULL },
};
@ -267,7 +270,7 @@ deviceGetAll(void)
CHECK_DEVS;
Devices[numDevs] = new_device(ifptr->ifr_name);
Devices[numDevs]->type = DEVICE_TYPE_NETWORK;
Devices[numDevs]->enabled = TRUE;
Devices[numDevs]->enabled = FALSE;
Devices[numDevs]->init = mediaInitNetwork;
Devices[numDevs]->get = mediaGetNetwork;
Devices[numDevs]->close = mediaCloseNetwork;

View File

@ -1,5 +1,5 @@
/*
* $Id: tcpip.c,v 1.5 1995/05/17 14:39:58 jkh Exp $
* $Id: tcpip.c,v 1.6 1995/05/18 09:02:06 jkh Exp $
*
* Copyright (c) 1995
* Gary J Palmer. All rights reserved.
@ -68,6 +68,7 @@ typedef struct _interface {
char netmask[32];
char extras[256]; /* Extra stuff for ifconfig (link0, etc) */
int valid;
Device *dptr;
} Interface;
/* The names and details of the available interfaces, for the list */
@ -215,6 +216,7 @@ tcpOpenDialog(char *str)
while (devs[n] != NULL) {
iface_names[n] = (devs[n])->name;
if_list[n].dptr = devs[n];
++n;
}
n_iface = n;
@ -506,6 +508,7 @@ tcpOpenDialog(char *str)
strcpy(if_list[n_iface].netmask, netmask);
strcpy(if_list[n_iface].extras, extras);
if_list[n_iface].valid = TRUE;
if_list[n_iface].dptr->enabled = TRUE;
} else if (n < max)
++n;
else
@ -556,7 +559,6 @@ tcpOpenDialog(char *str)
/* Loop over the per-interface data saving data which has been
validated ... */
foo = 0;
for (foo = 0 ; foo < INTERFACE_MAX ; foo++) {
if (if_list[foo].valid == TRUE) {
char temp[512], ifn[64];

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: devices.c,v 1.16 1995/05/16 11:37:08 jkh Exp $
* $Id: devices.c,v 1.17 1995/05/17 14:39:36 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -105,6 +105,9 @@ static struct {
{ DEVICE_TYPE_NETWORK, "lnc", "Lance/PCnet cards (Isolan/Novell NE2100/NE32-VL)" },
{ DEVICE_TYPE_NETWORK, "ze", "IBM/National Semiconductor PCMCIA ethernet" },
{ DEVICE_TYPE_NETWORK, "zp", "3Com PCMCIA Etherlink III" },
{ DEVICE_TYPE_NETWORK, "cuaa0", "Serial port (COM1) - possible PPP device" },
{ DEVICE_TYPE_NETWORK, "cuaa1", "Serial port (COM2) - possible PPP devic
e", },
{ NULL },
};
@ -267,7 +270,7 @@ deviceGetAll(void)
CHECK_DEVS;
Devices[numDevs] = new_device(ifptr->ifr_name);
Devices[numDevs]->type = DEVICE_TYPE_NETWORK;
Devices[numDevs]->enabled = TRUE;
Devices[numDevs]->enabled = FALSE;
Devices[numDevs]->init = mediaInitNetwork;
Devices[numDevs]->get = mediaGetNetwork;
Devices[numDevs]->close = mediaCloseNetwork;

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: devices.c,v 1.16 1995/05/16 11:37:08 jkh Exp $
* $Id: devices.c,v 1.17 1995/05/17 14:39:36 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -105,6 +105,9 @@ static struct {
{ DEVICE_TYPE_NETWORK, "lnc", "Lance/PCnet cards (Isolan/Novell NE2100/NE32-VL)" },
{ DEVICE_TYPE_NETWORK, "ze", "IBM/National Semiconductor PCMCIA ethernet" },
{ DEVICE_TYPE_NETWORK, "zp", "3Com PCMCIA Etherlink III" },
{ DEVICE_TYPE_NETWORK, "cuaa0", "Serial port (COM1) - possible PPP device" },
{ DEVICE_TYPE_NETWORK, "cuaa1", "Serial port (COM2) - possible PPP devic
e", },
{ NULL },
};
@ -267,7 +270,7 @@ deviceGetAll(void)
CHECK_DEVS;
Devices[numDevs] = new_device(ifptr->ifr_name);
Devices[numDevs]->type = DEVICE_TYPE_NETWORK;
Devices[numDevs]->enabled = TRUE;
Devices[numDevs]->enabled = FALSE;
Devices[numDevs]->init = mediaInitNetwork;
Devices[numDevs]->get = mediaGetNetwork;
Devices[numDevs]->close = mediaCloseNetwork;

View File

@ -1,5 +1,5 @@
/*
* $Id: tcpip.c,v 1.5 1995/05/17 14:39:58 jkh Exp $
* $Id: tcpip.c,v 1.6 1995/05/18 09:02:06 jkh Exp $
*
* Copyright (c) 1995
* Gary J Palmer. All rights reserved.
@ -68,6 +68,7 @@ typedef struct _interface {
char netmask[32];
char extras[256]; /* Extra stuff for ifconfig (link0, etc) */
int valid;
Device *dptr;
} Interface;
/* The names and details of the available interfaces, for the list */
@ -215,6 +216,7 @@ tcpOpenDialog(char *str)
while (devs[n] != NULL) {
iface_names[n] = (devs[n])->name;
if_list[n].dptr = devs[n];
++n;
}
n_iface = n;
@ -506,6 +508,7 @@ tcpOpenDialog(char *str)
strcpy(if_list[n_iface].netmask, netmask);
strcpy(if_list[n_iface].extras, extras);
if_list[n_iface].valid = TRUE;
if_list[n_iface].dptr->enabled = TRUE;
} else if (n < max)
++n;
else
@ -556,7 +559,6 @@ tcpOpenDialog(char *str)
/* Loop over the per-interface data saving data which has been
validated ... */
foo = 0;
for (foo = 0 ; foo < INTERFACE_MAX ; foo++) {
if (if_list[foo].valid == TRUE) {
char temp[512], ifn[64];