bring back il protocol support

front
cinap_lenrek 2012-05-03 10:47:40 +02:00
parent 299cf4e4b9
commit 1de9ca2de5
10 changed files with 1465 additions and 24 deletions

View File

@ -285,10 +285,35 @@ tcp=wiki port=17035
tcp=vica port=17036
tcp=aan port=17037
# testing
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=tacacs port=49
udp=tftp port=69

View File

@ -54,7 +54,7 @@ fn ask {
}
mt=()
. /rc/lib/tcp.rc
. /rc/lib/net.rc
. /rc/lib/local.rc
fn main{
@ -63,7 +63,7 @@ fn main{
if(~ $#nobootprompt 0){
echo
showlocaldevs
ask bootargs ' is (tcp, local!device)' $"bootargs
ask bootargs ' is (tcp, il, local!device)' $"bootargs
}
if not bootargs=$nobootprompt
nobootprompt=()
@ -92,8 +92,8 @@ fn main{
}
if not
x=($x -u)
if(! ~ $#authaddr 0)
x=($x -a $authaddr)
if(! ~ $#auth 0)
x=($x -a $auth)
if(! ~ $#debugfactotum 0)
x=($x -p)
must $x

View File

@ -1,8 +1,7 @@
#!/bin/rc
fn configtcp{
fn confignet{
must ip/ipconfig -p $*
if(~ $#fs 0)
fs=`{awk -F'=' '/fs=/{print $2; exit}' /net/ndb}
if(~ $#auth 0)
@ -11,14 +10,16 @@ fn configtcp{
ask fs ' ip is?' $auth
if(~ $#auth 0)
ask auth ' ip is?' $fs
fsaddr=tcp!$fs!564
authaddr=tcp!$auth!567
}
fn connecttcp{
srv -q $"fsaddr boot
srv -q tcp!$fs!564 boot
}
mtcp=(configtcp connecttcp)
mt=(mtcp $mt)
fn connectil{
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

File diff suppressed because it is too large Load Diff

View File

@ -486,9 +486,11 @@ enum
Logip= 1<<1,
Logtcp= 1<<2,
Logfs= 1<<3,
Logil= 1<<4,
Logicmp= 1<<5,
Logudp= 1<<6,
Logcompress= 1<<7,
Logilmsg= 1<<8,
Loggre= 1<<9,
Logppp= 1<<10,
Logtcprxmt= 1<<11,

View File

@ -39,10 +39,12 @@ static Netlogflag flags[] =
{ "ppp", Logppp, },
{ "ip", Logip, },
{ "fs", Logfs, },
{ "il", Logil, },
{ "tcp", Logtcp, },
{ "icmp", Logicmp, },
{ "udp", Logudp, },
{ "compress", Logcompress, },
{ "logilmsg", Logilmsg, },
{ "gre", Loggre, },
{ "tcpwin", Logtcp|Logtcpwin, },
{ "tcprxmt", Logtcp|Logtcprxmt, },

View File

@ -126,6 +126,7 @@ ip
ipmux
esp
rudp
il
port
int cpuserver = 1;

View File

@ -129,6 +129,7 @@ ip
gre
ipmux
esp
il
port
int cpuserver = 0;

View File

@ -40,7 +40,7 @@ rc
lib
rcmain
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
fstype
diskparts

View File

@ -150,22 +150,23 @@ struct Network
Network *next;
};
enum
{
Ntcp = 0,
enum {
Ntcp = 1,
};
/*
* net doesn't apply to (r)udp, icmp(v6), or telco (for speed).
*/
Network network[] = {
[Ntcp] { "tcp", iplookup, iptrans, 0 },
{ "udp", iplookup, iptrans, 1 },
{ "icmp", iplookup, iptrans, 1 },
{ "icmpv6", iplookup, iptrans, 1 },
{ "rudp", iplookup, iptrans, 1 },
{ "ssh", iplookup, iptrans, 1 },
{ "telco", telcolookup, telcotrans, 1 },
{ "il", iplookup, iptrans, 0, 1, },
{ "tcp", iplookup, iptrans, 0, 0, },
{ "il", iplookup, iptrans, 0, 0, },
{ "udp", iplookup, iptrans, 1, 0, },
{ "icmp", iplookup, iptrans, 1, 0, },
{ "icmpv6", iplookup, iptrans, 1, 0, },
{ "rudp", iplookup, iptrans, 1, 0, },
{ "ssh", iplookup, iptrans, 1, 0, },
{ "telco", telcolookup, telcotrans, 1, 0, },
{ 0 },
};