mirror of
https://github.com/PDP-10/klh10.git
synced 2026-05-01 05:48:15 +00:00
Patch applied. No conflicts.
klh10$ patch -p1 <tuntap.patch Hmm... Looks like a new-style context diff to me... The text leading up to this was: -------------------------- |*** klh10-2.0h/bld/lnx86/00build 2005-02-22 02:47:02.000000000 |-0500 |--- klh10-2.0i/bld/lnx86/00build 2005-09-10 01:05:48.000000000 |-0400 -------------------------- Patching file bld/lnx86/00build using Plan A... Hunk #1 succeeded at 1. Hmm... The next patch looks like a new-style context diff to me... The text leading up to this was: -------------------------- |*** klh10-2.0h/src/dpimp.c 2003-02-23 13:07:35.000000000 -0500 |--- klh10-2.0i/src/dpimp.c 2005-09-11 10:14:55.000000000 -0400 -------------------------- Patching file src/dpimp.c using Plan A... Hunk #1 succeeded at 279. Hunk #2 succeeded at 501. Hunk #3 succeeded at 563. Hunk #4 succeeded at 573. Hunk #5 succeeded at 637. Hunk #6 succeeded at 695. Hunk #7 succeeded at 709. Hunk #8 succeeded at 1755. Hmm... The next patch looks like a new-style context diff to me... The text leading up to this was: -------------------------- |*** klh10-2.0h/src/dpimp.h 2001-11-19 05:45:49.000000000 -0500 |--- klh10-2.0i/src/dpimp.h 2005-08-16 20:05:22.000000000 -0400 -------------------------- Patching file src/dpimp.h using Plan A... Hunk #1 succeeded at 106. Hmm... The next patch looks like a new-style context diff to me... The text leading up to this was: -------------------------- |*** klh10-2.0h/src/dpni20.c 2003-02-23 13:07:50.000000000 -0500 |--- klh10-2.0i/src/dpni20.c 2005-09-09 20:50:47.000000000 -0400 -------------------------- Patching file src/dpni20.c using Plan A... Hunk #1 succeeded at 177. Hunk #2 succeeded at 388. Hunk #3 succeeded at 456. Hunk #4 succeeded at 491. Hunk #5 succeeded at 506. Hunk #6 succeeded at 1463. Hunk #7 succeeded at 1531. Hunk #8 succeeded at 1543. Hmm... The next patch looks like a new-style context diff to me... The text leading up to this was: -------------------------- |*** klh10-2.0h/src/dpni20.h 2001-11-10 16:29:01.000000000 -0500 |--- klh10-2.0i/src/dpni20.h 2005-08-16 20:05:22.000000000 -0400 -------------------------- Patching file src/dpni20.h using Plan A... Hunk #1 succeeded at 52. Hmm... The next patch looks like a new-style context diff to me... The text leading up to this was: -------------------------- |diff -r -c --exclude='*.orig' --unidirectional-new-file |klh10-2.0h/src/dvlhdh.c klh10-2.0i/src/dvlhdh.c |*** klh10-2.0h/src/dvlhdh.c 2001-11-19 05:47:54.000000000 -0500 |--- klh10-2.0i/src/dvlhdh.c 2005-08-16 20:05:22.000000000 -0400 -------------------------- Patching file src/dvlhdh.c using Plan A... Hunk #1 succeeded at 103. Hunk #2 succeeded at 172. Hunk #3 succeeded at 303. Hunk #4 succeeded at 1066. Hmm... The next patch looks like a new-style context diff to me... The text leading up to this was: -------------------------- |*** klh10-2.0h/src/dvni20.c 2001-11-10 16:29:03.000000000 -0500 |--- klh10-2.0i/src/dvni20.c 2005-08-16 20:05:22.000000000 -0400 -------------------------- Patching file src/dvni20.c using Plan A... Hunk #1 succeeded at 157. Hunk #2 succeeded at 295. Hunk #3 succeeded at 393. Hunk #4 succeeded at 720. Hmm... The next patch looks like a new-style context diff to me... The text leading up to this was: -------------------------- |*** klh10-2.0h/src/Makefile.mk 2005-02-22 02:16:14.000000000 -0500 |--- klh10-2.0i/src/Makefile.mk 2005-08-16 20:05:22.000000000 -0400 -------------------------- Patching file src/Makefile.mk using Plan A... Hunk #1 succeeded at 302. Hmm... The next patch looks like a new-style context diff to me... The text leading up to this was: -------------------------- |*** klh10-2.0h/src/osdnet.c 2005-04-28 18:01:04.000000000 -0400 |--- klh10-2.0i/src/osdnet.c 2005-09-11 11:12:41.000000000 -0400 -------------------------- Patching file src/osdnet.c using Plan A... Hunk #1 succeeded at 812. Hunk #2 succeeded at 1131. Hunk #3 succeeded at 1162. Hunk #4 succeeded at 1225. Hunk #5 succeeded at 1616. Hunk #6 succeeded at 1633. Hunk #7 succeeded at 1691. Hunk #8 succeeded at 1721. Hunk #9 succeeded at 1817. Hmm... The next patch looks like a new-style context diff to me... The text leading up to this was: -------------------------- |*** klh10-2.0h/src/osdnet.h 2001-11-19 05:34:01.000000000 -0500 |--- klh10-2.0i/src/osdnet.h 2005-08-16 20:05:22.000000000 -0400 -------------------------- Patching file src/osdnet.h using Plan A... Hunk #1 succeeded at 69. Hunk #2 succeeded at 146. Hunk #3 succeeded at 382. done klh10$
This commit is contained in:
33
src/dpimp.c
33
src/dpimp.c
@@ -279,7 +279,11 @@ struct in_addr ehost_ip; /* Emulated host IP addr, net order */
|
||||
struct in_addr ihost_ip; /* IMP/Native host IP addr, net order */
|
||||
struct in_addr ihost_nm; /* IMP/Native host subnet netmask, net order */
|
||||
struct in_addr ihost_net; /* IMP/Native host net #, net order */
|
||||
#if KLH10_NET_TUN
|
||||
struct in_addr tun_ip; /* IP addr of tunnel */
|
||||
#else
|
||||
struct in_addr gwdef_ip; /* IP addr of default prime gateway */
|
||||
#endif
|
||||
|
||||
struct ether_addr ehost_ea; /* Emulated host ethernet addr */
|
||||
struct ether_addr ihost_ea; /* IMP/Native host ethernet addr */
|
||||
@@ -497,7 +501,11 @@ main(int argc, char **argv)
|
||||
shared DP area.
|
||||
*/
|
||||
memcpy((void *)&ehost_ip, dpimp->dpimp_ip, 4); /* Host IP addr */
|
||||
#if KLH10_NET_TUN
|
||||
memcpy((void *)&tun_ip, dpimp->dpimp_tun, 4); /* Tunnel addr */
|
||||
#else
|
||||
memcpy((void *)&gwdef_ip, dpimp->dpimp_gw, 4); /* Default GW addr */
|
||||
#endif
|
||||
memcpy((void *)&ehost_ea, dpimp->dpimp_eth, 6); /* Host Ether addr */
|
||||
|
||||
/* IMP must always have IP address specified! */
|
||||
@@ -555,6 +563,7 @@ main(int argc, char **argv)
|
||||
char ipbuf[OSN_IPSTRSIZ];
|
||||
char eabuf[OSN_EASTRSIZ];
|
||||
|
||||
#if !KLH10_NET_TUN
|
||||
dbprintln("ifc \"%s\" => ether %s",
|
||||
dpimp->dpimp_ifnam,
|
||||
eth_adrsprint(eabuf, (unsigned char *)&ihost_ea));
|
||||
@@ -564,10 +573,16 @@ main(int argc, char **argv)
|
||||
ip_adrsprint(ipbuf, (unsigned char *)&ihost_nm));
|
||||
dbprintln(" net %s",
|
||||
ip_adrsprint(ipbuf, (unsigned char *)&ihost_net));
|
||||
dbprintln(" HOST: %s",
|
||||
ip_adrsprint(ipbuf, (unsigned char *)&ehost_ip));
|
||||
dbprintln(" gwdef %s",
|
||||
ip_adrsprint(ipbuf, (unsigned char *)&gwdef_ip));
|
||||
#else
|
||||
dbprintln("ifc \"%s\"",
|
||||
dpimp->dpimp_ifnam);
|
||||
dbprintln(" tun %s",
|
||||
ip_adrsprint(ipbuf, (unsigned char *)&tun_ip));
|
||||
#endif
|
||||
dbprintln(" HOST %s",
|
||||
ip_adrsprint(ipbuf, (unsigned char *)&ehost_ip));
|
||||
}
|
||||
|
||||
/* Init ARP stuff - ensure can talk to native host.
|
||||
@@ -622,6 +637,8 @@ net_init(register struct dpimp_s *dpimp)
|
||||
{
|
||||
struct ifreq ifr;
|
||||
|
||||
#if !KLH10_NET_TUN
|
||||
|
||||
#if 1 /* This code is identical to dpni20 - merge in osdnet? */
|
||||
|
||||
/* Ensure network device name, if specified, isn't too long */
|
||||
@@ -678,6 +695,8 @@ net_init(register struct dpimp_s *dpimp)
|
||||
if (gwdef_ip.s_addr == -1 || gwdef_ip.s_addr == 0)
|
||||
efatal(1, "No default prime gateway specified");
|
||||
|
||||
#endif
|
||||
|
||||
/* Set up appropriate net fd and packet filter.
|
||||
** Should also determine interface's ethernet addr, if possible,
|
||||
** and set ihost_ea.
|
||||
@@ -690,12 +709,18 @@ net_init(register struct dpimp_s *dpimp)
|
||||
npf.osnpf_rdtmo = dpimp->dpimp_rdtmo;
|
||||
npf.osnpf_backlog = dpimp->dpimp_backlog;
|
||||
npf.osnpf_ip.ia_addr = ehost_ip;
|
||||
#if KLH10_NET_TUN
|
||||
npf.osnpf_tun.ia_addr = tun_ip;
|
||||
#endif
|
||||
/* Ether addr is both a potential arg and a returned value;
|
||||
the packetfilter open may use and/or change it.
|
||||
*/
|
||||
ea_set(&npf.osnpf_ea, dpimp->dpimp_eth); /* Set requested ea if any */
|
||||
pffd = osn_pfinit(&npf, (void *)dpimp); /* Will abort if fails */
|
||||
ea_set(&ihost_ea, &npf.osnpf_ea); /* Copy actual ea if one */
|
||||
#if KLH10_NET_TUN
|
||||
tun_ip = npf.osnpf_tun.ia_addr; /* Copy actual tun if any */
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1730,7 +1755,11 @@ ihl_hhsend(register struct dpimp_s *dpimp,
|
||||
/* Hack to set host/imp value as properly as possible. */
|
||||
memcpy((char *)&haddr.ia_octet[0], pp + IPBOFF_SRC, 4);
|
||||
if ((haddr.ia_addr.s_addr & ihost_nm.s_addr) != ihost_net.s_addr) {
|
||||
#if !KLH10_NET_TUN
|
||||
haddr.ia_addr = gwdef_ip; /* Not local, use default GW */
|
||||
#else
|
||||
haddr.ia_addr = tun_ip; /* Not local, use tunnel end */
|
||||
#endif
|
||||
}
|
||||
|
||||
ihobuf[SIH_HSIZ+SIL_HST] = haddr.ia_octet[1];
|
||||
|
||||
Reference in New Issue
Block a user