[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: creating socket



I believe SOCK_PACKET is used to over-ride TCP/IP or ETH protocols,
and give data sent through the socket to a Network Interface Driver
that the socket is bound to using 'bind' call.

senthil devan wrote:

> Hi
>
> In this
>
> #define TO16(x)    ((((x) >> 8) & 0x00FF) | (((x) << 8) & 0xFF00))
>
> sockid = socket(AF_INET, SOCK_PACKET, TO16(ETH_P_ALL))
>
> what does SOCK_PACKET mean. In went through W.R Stevens, but I am unable to
> find SOCK_PACKET type. Similarly I am not able to understand what is
> ETH_P_ALL and the necessity of the bit operations on it. Any help will be
> appreciated.
>
> Thanks in advance
>
> Devan
>
> ---------------------------------------------
> Find out more about this and other Linux India
> mailing lists at http://lists.linux-india.org/