Subject: Re: uid,gid, and socket protocols
To: Andrew Brown <atatat@atatdot.net>
From: Joe Reed <jnr@po.cwru.edu>
List: tech-kern
Date: 09/06/2002 16:11:12
On Friday 06 September 2002 01:59 pm, Andrew Brown wrote:
> >> >2) how to i determine what protocol a socket is using? i want to be
> >> > able to differentiate between a TCP/UDP/ICMP socket. i was looking at
> >> > the protosw struct, but couln't find the values for the pr_protocol
> >> > member. where are they located?
> >>
> >> so->so_proto->pr_protocol?
> >
> >right, i got that far. there's a pr_type and a pr_protocol in teh protosw
> >struct. but i cannot seem to find what values of those entries correspond
> > to what protocols (TCP/UDP/ICMP). am i missing something here, or are
> > those values tucked away somewhere else?
>
> it looks to me like pr_protocol will be one of IPPROTO_UDP,
> IPPROTO_TCP, IPPROTO_ICMP, etc. or perhaps i'm not understanding you?
worked, thanks
--joe