RE: socket call in the kernel

2001-12-28 Thread Henry Su
c: [EMAIL PROTECTED] Subject: RE: socket call in the kernel Well, you'll find an example of using a ksocket node in /usr/share/examples/netgraph and of course /sys/netgraph/ng_ksocket.c has the actual code that does that if you wanted to duplicate it in your own module. Why do you want to d

RE: socket call in the kernel

2001-12-28 Thread Julian Elischer
ailto:[EMAIL PROTECTED]]On Behalf Of Julian Elischer > Sent: Thursday, December 20, 2001 3:08 PM > To: Henry Su > Cc: [EMAIL PROTECTED] > Subject: RE: socket call in the kernel > > > > > I have two answers: > > 1/ Use ipfw add NNN fwd localhost,8001 [deny criteri

RE: socket call in the kernel

2001-12-28 Thread Henry Su
Henry Su Cc: [EMAIL PROTECTED] Subject: RE: socket call in the kernel I have two answers: 1/ Use ipfw add NNN fwd localhost,8001 [deny criteria] to make the packet that is denied go to a default server listenning on port 8001 2/ there is an in-kernel webserver built using netgraph but it&#x

RE: socket call in the kernel

2001-12-27 Thread Henry Su
Same thing, it only works for telneting to test2:80 for test1. -Original Message- From: Julian Elischer [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 27, 2001 5:31 PM To: Henry Su Cc: [EMAIL PROTECTED] Subject: RE: socket call in the kernel put the forward rule as rule 50 and

RE: socket call in the kernel

2001-12-27 Thread Julian Elischer
put the forward rule as rule 50 and see what happens. On Thu, 27 Dec 2001, Henry Su wrote: > Hi, Julian: > > > Here's all the rules that I am using: > > [17:13:59][root@test2:~]$ ipfw show > 001000 0 allow ip from any to any via lo0 > 002000 0 deny ip from any to 127.0.0.0/8

RE: socket call in the kernel

2001-12-27 Thread Henry Su
Hi, Julian: Here's all the rules that I am using: [17:13:59][root@test2:~]$ ipfw show 001000 0 allow ip from any to any via lo0 002000 0 deny ip from any to 127.0.0.0/8 003000 0 deny ip from 127.0.0.0/8 to any 004000 0 allow udp from 0.0.0.0 2054 to 0.0.0.0 00500

RE: socket call in the kernel

2001-12-27 Thread Henry Su
** Henry Su * NTT MCL * ** On Thu, 27 Dec 2001, Julian Elischer wrote: > > > > > On Thu, 27 Dec 2001, Henry Su wrote: > > > Thanks a lot Julian. Please let me know if u need more info. > > > > > > My goal is using test2 as authentication server, when htt

RE: socket call in the kernel

2001-12-27 Thread Julian Elischer
On Thu, 27 Dec 2001, Henry Su wrote: > Thanks a lot Julian. Please let me know if u need more info. > > > My goal is using test2 as authentication server, when http request pass > through test2 box, test2 will redirect to an authentication url on itself. > > _

RE: socket call in the kernel

2001-12-27 Thread Henry Su
Thanks a lot Julian. Please let me know if u need more info. My goal is using test2 as authentication server, when http request pass through test2 box, test2 will redirect to an authentication url on itself. __ ___ | |crossover cable |

RE: socket call in the kernel

2001-12-27 Thread Julian Elischer
mcl.com. > > > Escape character is '^]'. > > > 1234 > > > > > > HTTP/1.1 302 Moved > > > Date: Wed, 26 Dec 2001 18:15:11 PST > > > Location: https://216.69.69.254/cgi-bin/login > > > 0 > > > > > > > > &

Re: socket call in the kernel

2001-12-27 Thread Julian Elischer
yes, but there is no need to change the packet.. fwd will do exactly what he wants as soon as I can get the network topology worked out :-) On Thu, 27 Dec 2001, Crist J . Clark wrote: > On Thu, Dec 27, 2001 at 01:04:25AM -0800, Henry Su wrote: > > Yes, it works: > > > > [00:52:58][root@test2:

Re: socket call in the kernel

2001-12-27 Thread Crist J . Clark
On Thu, Dec 27, 2001 at 01:04:25AM -0800, Henry Su wrote: > Yes, it works: > > [00:52:58][root@test2:~]$ telnet 127.0.0.1 8800 > Trying 127.0.0.1... > Connected to localhost. > Escape character is '^]'. > 12334 > > HTTP/1.1 302 Moved > Date: Thu, 27 Dec 2001 00:53:18 PST > Location: https://216

RE: socket call in the kernel

2001-12-27 Thread Henry Su
'^]'. > > 1234 > > > > HTTP/1.1 302 Moved > > Date: Wed, 26 Dec 2001 18:15:11 PST > > Location: https://216.69.69.254/cgi-bin/login > > 0 > > > > > > Connection closed by foreign host. > > > > > > Do you have any clue, why

RE: socket call in the kernel

2001-12-26 Thread Julian Elischer
ection closed by foreign host. > > > Do you have any clue, why the packet can not be received at port 8800. > > > Thanks. > > -Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Julian Elischer > Sent: Wednesday, Decembe

RE: socket call in the kernel

2001-12-26 Thread Henry Su
et can not be received at port 8800. Thanks. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Julian Elischer Sent: Wednesday, December 26, 2001 4:08 PM To: Henry Su Cc: [EMAIL PROTECTED] Subject: RE: socket call in the kernel On Wed, 26 Dec 2001, H

RE: socket call in the kernel

2001-12-26 Thread Julian Elischer
t; > close(s); > > } > > */ > > /* > > while ((bytes = read(s, buffer, BUFSIZ)) > 0) > > write(1, bu

RE: socket call in the kernel

2001-12-26 Thread Henry Su
Behalf Of Julian Elischer Sent: Thursday, December 20, 2001 3:08 PM To: Henry Su Cc: [EMAIL PROTECTED] Subject: RE: socket call in the kernel I have two answers: 1/ Use ipfw add NNN fwd localhost,8001 [deny criteria] to make the packet that is denied go to a default server listenning on

RE: socket call in the kernel

2001-12-20 Thread Julian Elischer
/* > while ((bytes = read(s, buffer, BUFSIZ)) > 0) > write(1, buffer, bytes); > */ > } > } > /* end debug */ > return(IP_FW_PORT_DENY_FLAG); > >

RE: socket call in the kernel

2001-12-20 Thread Julian Elischer
er, bytes); > */ > } > } > /* end debug */ > return(IP_FW_PORT_DENY_FLAG); > > > -Original Message- > From: Julian Elischer [mailto:[EMAIL PROTECTED]] > Sent: Thursday, December 20, 2001 12:59

RE: socket call in the kernel

2001-12-20 Thread Henry Su
s, buffer, BUFSIZ)) > 0) write(1, buffer, bytes); */ } } /* end debug */ return(IP_FW_PORT_DENY_FLAG); -Original Message- From: Julian Elischer [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 20, 2001 12:59 PM To: Henry Su Cc: [EMAIL PROTECTED] Subj

Re: socket call in the kernel

2001-12-20 Thread Alfred Perlstein
* Henry Su <[EMAIL PROTECTED]> [011220 14:56] wrote: > I am trying to modify ip_fw.c in the /usr/src/sys/netinet, I tried to add a > socket call in the code, it can be compiled, but when it runs into the code, > it just crashed. It gave me the "Fatal trap error 12", Memory address is > wrong. > >

Re: socket call in the kernel

2001-12-20 Thread Julian Elischer
You cannot do a socket directly but you can indirectly tell me what you are trying to do and I can help.. On Thu, 20 Dec 2001, Henry Su wrote: > I am trying to modify ip_fw.c in the /usr/src/sys/netinet, I tried to add a > socket call in the code, it can be compiled, but when it runs into the

socket call in the kernel

2001-12-20 Thread Henry Su
I am trying to modify ip_fw.c in the /usr/src/sys/netinet, I tried to add a socket call in the code, it can be compiled, but when it runs into the code, it just crashed. It gave me the "Fatal trap error 12", Memory address is wrong. Can any one tell me if socket call can be used in kernel level?