mirror of
https://github.com/PDP-10/klh10.git
synced 2026-01-13 15:27:10 +00:00
Add ifmeth=string as parameter for NI20 and IMP.
This commit is contained in:
parent
27c1e41d9c
commit
f7761c466a
@ -701,6 +701,7 @@ net_init(struct dpimp_s *dpimp)
|
||||
struct osnpf npf;
|
||||
|
||||
npf.osnpf_ifnam = dpimp->dpimp_ifnam;
|
||||
npf.osnpf_ifmeth = dpimp->dpimp_ifmeth;
|
||||
npf.osnpf_dedic = FALSE; /* Force filtering always! */
|
||||
npf.osnpf_rdtmo = dpimp->dpimp_rdtmo;
|
||||
npf.osnpf_backlog = dpimp->dpimp_backlog;
|
||||
|
||||
@ -93,7 +93,7 @@
|
||||
|
||||
/* Version of DPIMP-specific shared memory structure */
|
||||
|
||||
#define DPIMP_VERSION ((1<<10) | (1<<5) | (2)) /* 1.1.2 */
|
||||
#define DPIMP_VERSION ((1<<10) | (1<<5) | (3)) /* 1.1.3 */
|
||||
|
||||
/* DPIMP-specific stuff */
|
||||
/* C = controlling parent sets, D = Device proc sets */
|
||||
@ -103,6 +103,7 @@ struct dpimp_s {
|
||||
int dpimp_ver; /* C Version of shared struct */
|
||||
int dpimp_attrs; /* C Attribute flags */
|
||||
char dpimp_ifnam[16]; /* CD Interface name if any */
|
||||
char dpimp_ifmeth[16]; /* C Interface access method */
|
||||
unsigned char dpimp_eth[6]; /* CD Ethernet address of interface */
|
||||
unsigned char dpimp_ip[4]; /* C 10's IP address to filter on, if shared */
|
||||
unsigned char dpimp_gw[4]; /* C Default GW address for IMP to use */
|
||||
|
||||
@ -500,6 +500,7 @@ void net_init(struct dpni20_s *dpni)
|
||||
struct osnpf npf;
|
||||
|
||||
npf.osnpf_ifnam = dpni->dpni_ifnam;
|
||||
npf.osnpf_ifmeth = dpni->dpni_ifmeth;
|
||||
npf.osnpf_dedic = dpni->dpni_dedic;
|
||||
npf.osnpf_rdtmo = dpni->dpni_rdtmo;
|
||||
npf.osnpf_backlog = dpni->dpni_backlog;
|
||||
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
/* Version of DPNI20-specific shared memory structure */
|
||||
|
||||
#define DPNI20_VERSION DPC_VERSION(1,1,1) /* 1.1.1 */
|
||||
#define DPNI20_VERSION DPC_VERSION(1,1,2) /* 1.1.2 */
|
||||
|
||||
|
||||
/* DPNI20-specific stuff */
|
||||
@ -50,6 +50,7 @@ struct dpni20_s {
|
||||
# define DPNI20F_LSAP 0x0100 /* Set if LSAP value specified */
|
||||
int dpni_lsap; /* C Dest/Source LSAP value if needed */
|
||||
char dpni_ifnam[16]; /* CD Interface name if any */
|
||||
char dpni_ifmeth[16]; /* C Interface access method */
|
||||
unsigned char dpni_eth[6]; /* CD Ethernet address of interface */
|
||||
unsigned char dpni_ip[4]; /* C 10's IP address to filter on, if shared */
|
||||
unsigned char dpni_tun[4]; /* CD host's IP address on tunnel */
|
||||
|
||||
13
src/dvlhdh.c
13
src/dvlhdh.c
@ -97,6 +97,7 @@ struct lhdh {
|
||||
|
||||
/* Misc config info not set elsewhere */
|
||||
char *lh_ifnam; /* Native platform's interface name */
|
||||
char *lh_ifmeth; /* Access method to the native interface */
|
||||
int lh_dedic; /* TRUE if interface dedicated (else shared) */
|
||||
int lh_doarp; /* TRUE to do ARP hackery (if shared) */
|
||||
int lh_backlog; /* Max # input msgs to queue up in kernel */
|
||||
@ -175,6 +176,7 @@ static int imp_outxfer(struct lhdh *lh);
|
||||
prmdef(LHDHP_TUN,"tunaddr"), /* IP address of local side of tunnel */\
|
||||
prmdef(LHDHP_EN, "enaddr"), /* Ethernet address to use (override) */\
|
||||
prmdef(LHDHP_IFC,"ifc"), /* Ethernet interface name */\
|
||||
prmdef(LHDHP_IFM,"ifmeth"), /* Access method to Ethernet interface */\
|
||||
prmdef(LHDHP_BKL,"backlog"),/* Max bklog for rcvd pkts (else sys deflt) */\
|
||||
prmdef(LHDHP_DED,"dedic"), /* TRUE= Ifc dedicated (else shared) */\
|
||||
prmdef(LHDHP_ARP,"doarp"), /* TRUE= if shared, do ARP hackery */\
|
||||
@ -222,6 +224,7 @@ lhdh_conf(FILE *f, char *s, struct lhdh *lh)
|
||||
*/
|
||||
DVDEBUG(lh) = FALSE;
|
||||
lh->lh_ifnam = NULL;
|
||||
lh->lh_ifmeth = NULL;
|
||||
lh->lh_backlog = 0;
|
||||
lh->lh_dedic = FALSE;
|
||||
lh->lh_doarp = TRUE;
|
||||
@ -323,6 +326,12 @@ lhdh_conf(FILE *f, char *s, struct lhdh *lh)
|
||||
lh->lh_ifnam = s_dup(prm.prm_val);
|
||||
continue;
|
||||
|
||||
case LHDHP_IFM: /* Parse as simple string */
|
||||
if (!prm.prm_val)
|
||||
break;
|
||||
lh->lh_ifmeth = s_dup(prm.prm_val);
|
||||
continue;
|
||||
|
||||
case LHDHP_BKL: /* Parse as decimal number */
|
||||
if (!prm.prm_val || !s_todnum(prm.prm_val, &lval))
|
||||
break;
|
||||
@ -1062,6 +1071,10 @@ imp_init(register struct lhdh *lh, FILE *of)
|
||||
strncpy(dpc->dpimp_ifnam, lh->lh_ifnam, sizeof(dpc->dpimp_ifnam)-1);
|
||||
else
|
||||
dpc->dpimp_ifnam[0] = '\0'; /* No specific interface */
|
||||
if (lh->lh_ifmeth) /* Pass on interface method if any */
|
||||
strncpy(dpc->dpimp_ifmeth, lh->lh_ifmeth, sizeof(dpc->dpimp_ifmeth)-1);
|
||||
else
|
||||
dpc->dpimp_ifnam[0] = '\0'; /* No specific interface */
|
||||
memcpy((char *)dpc->dpimp_ip, /* Set our IP address for filter */
|
||||
lh->lh_ipadr, 4);
|
||||
memcpy((char *)dpc->dpimp_gw, /* Set our GW address for IMP */
|
||||
|
||||
13
src/dvni20.c
13
src/dvni20.c
@ -149,6 +149,7 @@ struct ni20 {
|
||||
|
||||
/* Misc config info not set elsewhere */
|
||||
char *ni_ifnam; /* Native platform's interface name */
|
||||
char *ni_ifmeth; /* Native platform's interface access method */
|
||||
int ni_dedic; /* TRUE if interface dedicated (else shared) */
|
||||
int ni_decnet; /* TRUE to filter DECNET packets (if shared) */
|
||||
int ni_doarp; /* TRUE to do ARP hackery (if shared) */
|
||||
@ -292,6 +293,7 @@ static uint32 ni_ecpdigest(unsigned char *ucp, int len);
|
||||
prmdef(NIP_DBG,"debug"), /* Initial debug flag */\
|
||||
prmdef(NIP_EN, "enaddr"), /* Ethernet address to use (override) */\
|
||||
prmdef(NIP_IFC,"ifc"), /* Ethernet interface name */\
|
||||
prmdef(NIP_IFM,"ifmeth"), /* Ethernet interface access method */\
|
||||
prmdef(NIP_BKL,"backlog"),/* Max bklog for rcvd pkts (else sys default) */\
|
||||
prmdef(NIP_DED,"dedic"), /* TRUE= Ifc dedicated (else shared) */\
|
||||
prmdef(NIP_IP, "ipaddr"), /* IP address of KLH10, if shared */\
|
||||
@ -343,6 +345,7 @@ ni20_conf(FILE *f, char *s, struct ni20 *ni)
|
||||
/* First set defaults for all configurable parameters */
|
||||
DVDEBUG(ni) = FALSE;
|
||||
ni->ni_ifnam = NULL;
|
||||
ni->ni_ifmeth = NULL;
|
||||
ni->ni_backlog = 0;
|
||||
ni->ni_decnet = FALSE;
|
||||
ni->ni_dedic = FALSE;
|
||||
@ -413,6 +416,12 @@ ni20_conf(FILE *f, char *s, struct ni20 *ni)
|
||||
ni->ni_ifnam = s_dup(prm.prm_val);
|
||||
continue;
|
||||
|
||||
case NIP_IFM: /* Parse as simple string */
|
||||
if (!prm.prm_val)
|
||||
break;
|
||||
ni->ni_ifmeth = s_dup(prm.prm_val);
|
||||
continue;
|
||||
|
||||
case NIP_BKL: /* Parse as decimal number */
|
||||
if (!prm.prm_val || !s_todnum(prm.prm_val, &lval))
|
||||
break;
|
||||
@ -718,6 +727,10 @@ ni20_init(struct device *d,
|
||||
strncpy(dpc->dpni_ifnam, ni->ni_ifnam, sizeof(dpc->dpni_ifnam)-1);
|
||||
else
|
||||
dpc->dpni_ifnam[0] = '\0'; /* No specific interface */
|
||||
if (ni->ni_ifmeth) /* Pass on interface access method */
|
||||
strncpy(dpc->dpni_ifmeth, ni->ni_ifmeth, sizeof(dpc->dpni_ifmeth)-1);
|
||||
else
|
||||
dpc->dpni_ifmeth[0] = '\0'; /* No specific access method */
|
||||
memcpy((char *)dpc->dpni_ip, /* Set our IP address for filter */
|
||||
ni->ni_ipadr, 4);
|
||||
memcpy((char *)dpc->dpni_tun, /* Set IP address for tunnel */
|
||||
|
||||
@ -429,6 +429,7 @@ int osn_arp_look(struct in_addr *ipa, unsigned char *eap);
|
||||
|
||||
struct osnpf { /* Arg struct for common initialization params */
|
||||
char *osnpf_ifnam; /* Interface name */
|
||||
char *osnpf_ifmeth; /* Which connection method to use (pcap, tun, tap, etc */
|
||||
int osnpf_dedic; /* TRUE if dedicated ifc, else shared */
|
||||
int osnpf_rdtmo; /* Read timeout, if any */
|
||||
int osnpf_backlog; /* Allow # backlogged packets, if any */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user