bring back il protocol support
This commit is contained in:
parent
299cf4e4b9
commit
1de9ca2de5
10 changed files with 1465 additions and 24 deletions
27
sys/lib/dist/ndb/common
vendored
27
sys/lib/dist/ndb/common
vendored
|
@ -285,10 +285,35 @@ tcp=wiki port=17035
|
||||||
tcp=vica port=17036
|
tcp=vica port=17036
|
||||||
tcp=aan port=17037
|
tcp=aan port=17037
|
||||||
|
|
||||||
|
|
||||||
# testing
|
# testing
|
||||||
tcp=9fsa port=18008
|
tcp=9fsa port=18008
|
||||||
|
|
||||||
|
il=echo port=7
|
||||||
|
il=discard port=9
|
||||||
|
il=chargen port=19
|
||||||
|
il=whoami port=565
|
||||||
|
il=ticket port=566
|
||||||
|
il=challbox port=567
|
||||||
|
il=ocpu port=17005
|
||||||
|
il=ocpunote port=17006
|
||||||
|
il=exportfs port=17007
|
||||||
|
il=9fs port=17008
|
||||||
|
il=rexexec port=17009
|
||||||
|
il=ncpu port=17010
|
||||||
|
il=ncpunote port=17011
|
||||||
|
il=tcpu port=17012
|
||||||
|
il=cpu port=17013
|
||||||
|
il=fsauth port=17020
|
||||||
|
il=rexauth port=17021
|
||||||
|
il=changekey port=17022
|
||||||
|
il=chal port=17023
|
||||||
|
il=check port=17024
|
||||||
|
il=juke port=17026
|
||||||
|
il=video port=17028
|
||||||
|
il=vgen port=17029
|
||||||
|
il=alefnslook port=17030
|
||||||
|
il=ramfs port=17031
|
||||||
|
|
||||||
udp=echo port=7
|
udp=echo port=7
|
||||||
udp=tacacs port=49
|
udp=tacacs port=49
|
||||||
udp=tftp port=69
|
udp=tftp port=69
|
||||||
|
|
|
@ -54,7 +54,7 @@ fn ask {
|
||||||
}
|
}
|
||||||
|
|
||||||
mt=()
|
mt=()
|
||||||
. /rc/lib/tcp.rc
|
. /rc/lib/net.rc
|
||||||
. /rc/lib/local.rc
|
. /rc/lib/local.rc
|
||||||
|
|
||||||
fn main{
|
fn main{
|
||||||
|
@ -63,7 +63,7 @@ fn main{
|
||||||
if(~ $#nobootprompt 0){
|
if(~ $#nobootprompt 0){
|
||||||
echo
|
echo
|
||||||
showlocaldevs
|
showlocaldevs
|
||||||
ask bootargs ' is (tcp, local!device)' $"bootargs
|
ask bootargs ' is (tcp, il, local!device)' $"bootargs
|
||||||
}
|
}
|
||||||
if not bootargs=$nobootprompt
|
if not bootargs=$nobootprompt
|
||||||
nobootprompt=()
|
nobootprompt=()
|
||||||
|
@ -92,8 +92,8 @@ fn main{
|
||||||
}
|
}
|
||||||
if not
|
if not
|
||||||
x=($x -u)
|
x=($x -u)
|
||||||
if(! ~ $#authaddr 0)
|
if(! ~ $#auth 0)
|
||||||
x=($x -a $authaddr)
|
x=($x -a $auth)
|
||||||
if(! ~ $#debugfactotum 0)
|
if(! ~ $#debugfactotum 0)
|
||||||
x=($x -p)
|
x=($x -p)
|
||||||
must $x
|
must $x
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
#!/bin/rc
|
#!/bin/rc
|
||||||
|
|
||||||
fn configtcp{
|
fn confignet{
|
||||||
must ip/ipconfig -p $*
|
must ip/ipconfig -p $*
|
||||||
|
|
||||||
if(~ $#fs 0)
|
if(~ $#fs 0)
|
||||||
fs=`{awk -F'=' '/fs=/{print $2; exit}' /net/ndb}
|
fs=`{awk -F'=' '/fs=/{print $2; exit}' /net/ndb}
|
||||||
if(~ $#auth 0)
|
if(~ $#auth 0)
|
||||||
|
@ -11,14 +10,16 @@ fn configtcp{
|
||||||
ask fs ' ip is?' $auth
|
ask fs ' ip is?' $auth
|
||||||
if(~ $#auth 0)
|
if(~ $#auth 0)
|
||||||
ask auth ' ip is?' $fs
|
ask auth ' ip is?' $fs
|
||||||
|
|
||||||
fsaddr=tcp!$fs!564
|
|
||||||
authaddr=tcp!$auth!567
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn connecttcp{
|
fn connecttcp{
|
||||||
srv -q $"fsaddr boot
|
srv -q tcp!$fs!564 boot
|
||||||
}
|
}
|
||||||
|
|
||||||
mtcp=(configtcp connecttcp)
|
fn connectil{
|
||||||
mt=(mtcp $mt)
|
srv -q il!$fs!17008 boot
|
||||||
|
}
|
||||||
|
|
||||||
|
mtcp=(confignet connecttcp)
|
||||||
|
mil=(confignet connectil)
|
||||||
|
mt=(mtcp mil $mt)
|
1408
sys/src/9/ip/il.c
Normal file
1408
sys/src/9/ip/il.c
Normal file
File diff suppressed because it is too large
Load diff
|
@ -486,9 +486,11 @@ enum
|
||||||
Logip= 1<<1,
|
Logip= 1<<1,
|
||||||
Logtcp= 1<<2,
|
Logtcp= 1<<2,
|
||||||
Logfs= 1<<3,
|
Logfs= 1<<3,
|
||||||
|
Logil= 1<<4,
|
||||||
Logicmp= 1<<5,
|
Logicmp= 1<<5,
|
||||||
Logudp= 1<<6,
|
Logudp= 1<<6,
|
||||||
Logcompress= 1<<7,
|
Logcompress= 1<<7,
|
||||||
|
Logilmsg= 1<<8,
|
||||||
Loggre= 1<<9,
|
Loggre= 1<<9,
|
||||||
Logppp= 1<<10,
|
Logppp= 1<<10,
|
||||||
Logtcprxmt= 1<<11,
|
Logtcprxmt= 1<<11,
|
||||||
|
|
|
@ -39,10 +39,12 @@ static Netlogflag flags[] =
|
||||||
{ "ppp", Logppp, },
|
{ "ppp", Logppp, },
|
||||||
{ "ip", Logip, },
|
{ "ip", Logip, },
|
||||||
{ "fs", Logfs, },
|
{ "fs", Logfs, },
|
||||||
|
{ "il", Logil, },
|
||||||
{ "tcp", Logtcp, },
|
{ "tcp", Logtcp, },
|
||||||
{ "icmp", Logicmp, },
|
{ "icmp", Logicmp, },
|
||||||
{ "udp", Logudp, },
|
{ "udp", Logudp, },
|
||||||
{ "compress", Logcompress, },
|
{ "compress", Logcompress, },
|
||||||
|
{ "logilmsg", Logilmsg, },
|
||||||
{ "gre", Loggre, },
|
{ "gre", Loggre, },
|
||||||
{ "tcpwin", Logtcp|Logtcpwin, },
|
{ "tcpwin", Logtcp|Logtcpwin, },
|
||||||
{ "tcprxmt", Logtcp|Logtcprxmt, },
|
{ "tcprxmt", Logtcp|Logtcprxmt, },
|
||||||
|
|
|
@ -126,6 +126,7 @@ ip
|
||||||
ipmux
|
ipmux
|
||||||
esp
|
esp
|
||||||
rudp
|
rudp
|
||||||
|
il
|
||||||
|
|
||||||
port
|
port
|
||||||
int cpuserver = 1;
|
int cpuserver = 1;
|
||||||
|
|
|
@ -129,6 +129,7 @@ ip
|
||||||
gre
|
gre
|
||||||
ipmux
|
ipmux
|
||||||
esp
|
esp
|
||||||
|
il
|
||||||
|
|
||||||
port
|
port
|
||||||
int cpuserver = 0;
|
int cpuserver = 0;
|
||||||
|
|
|
@ -40,7 +40,7 @@ rc
|
||||||
lib
|
lib
|
||||||
rcmain
|
rcmain
|
||||||
local.rc 555 sys sys ../boot/local.rc
|
local.rc 555 sys sys ../boot/local.rc
|
||||||
tcp.rc 555 sys sys ../boot/tcp.rc
|
net.rc 555 sys sys ../boot/net.rc
|
||||||
bin
|
bin
|
||||||
fstype
|
fstype
|
||||||
diskparts
|
diskparts
|
||||||
|
|
|
@ -150,22 +150,23 @@ struct Network
|
||||||
Network *next;
|
Network *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
enum {
|
||||||
{
|
Ntcp = 1,
|
||||||
Ntcp = 0,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* net doesn't apply to (r)udp, icmp(v6), or telco (for speed).
|
* net doesn't apply to (r)udp, icmp(v6), or telco (for speed).
|
||||||
*/
|
*/
|
||||||
Network network[] = {
|
Network network[] = {
|
||||||
[Ntcp] { "tcp", iplookup, iptrans, 0 },
|
{ "il", iplookup, iptrans, 0, 1, },
|
||||||
{ "udp", iplookup, iptrans, 1 },
|
{ "tcp", iplookup, iptrans, 0, 0, },
|
||||||
{ "icmp", iplookup, iptrans, 1 },
|
{ "il", iplookup, iptrans, 0, 0, },
|
||||||
{ "icmpv6", iplookup, iptrans, 1 },
|
{ "udp", iplookup, iptrans, 1, 0, },
|
||||||
{ "rudp", iplookup, iptrans, 1 },
|
{ "icmp", iplookup, iptrans, 1, 0, },
|
||||||
{ "ssh", iplookup, iptrans, 1 },
|
{ "icmpv6", iplookup, iptrans, 1, 0, },
|
||||||
{ "telco", telcolookup, telcotrans, 1 },
|
{ "rudp", iplookup, iptrans, 1, 0, },
|
||||||
|
{ "ssh", iplookup, iptrans, 1, 0, },
|
||||||
|
{ "telco", telcolookup, telcotrans, 1, 0, },
|
||||||
{ 0 },
|
{ 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue