Good morning hackers,
I am writing a pseudo driver for a routing protocol that insert its header 
after the ip header. I call it TTT. On the output after ip_output, for 
packets destined to a particular subnet I go through the ttt0 virtual 
interface calling ttt_output.
In ttt_input all I have is a printf statement to make sure that it is being 
called. tcpdump on the physical interface shows those packets getting in as a 
result of a ping from 243.10.1.1, but I don't see in the /var/log/messages 
what should be printed by ttt_input. I use 2 machines connected back to back 
with a crossover cable.

tcpdump: listening on fxp0
16:11:15.398205 243.10.1.1 > 243.10.1.2:  ip-proto-110 91
16:11:16.408227 243.10.1.1 > 243.10.1.2:  ip-proto-110 91
.........................................

in if_ttt.c I have this to support calls to ttt_input

extern  struct domain inetdomain;
static  const struct protosw in_ttt_protosw =
{ SOCK_RAW, &inetdomain, IPPROTO_TTT, PR_ATOMIC|PR_ADDR, 
(pr_input_t*)ttt_input, (pr_output_t*)rip_output, rip_ctlinput, 
rip_ctloutput, 0, 0, 0, 0, 0,
 &rip_usrreqs,
};


and in 

static int ttt_clone_create(struct if_clone *ifc, int unit) 
{
............
sc->encap_cookie = encap_attach_func(AF_INET, IPPROTO_TTT,
            ttt_encapcheck, &in_ttt_protosw, sc);

............
}


sorry for the long post, but if somebody can tell me what I am missing I'll 
appreciate.
thank you,
Jerry.


_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to