] I have written a kernel module and modified the stack 
] code ( at the socket layer) to send control to my 
] module. I am trying to access the inpcb structure 
] associated with that particular socket. 
] struct in_pcb* inp = sotoinpcb(so);
] if (inp)
]    .... processing
] 
] 
] though the pbc structure is allocated i am getting a 
] page fault everytime when i try to  access it. 
] any idea? my code is in the socket layer..i checked up 
] the udp routines.. they do pretty much the same thing..
] any help?

It may be that the packets you are processing are not IP
packets, and therefore do not have an in_pcb in them.

Verify that they are IP packets first, e.g.:

        if (so->so_proto->pr_domain->dom_family == PF_INET) {
                struct in_pcb* inp = sotoinpcb(so);
                if (inp) {
                        ... processing ...
                }
        }

Pretty obvious in retrospect, eh?

-- Terry

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to