[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <54F68BEA.8040605@nsn-intra.net>
Date: Wed, 04 Mar 2015 10:06:58 +0530
From: Sriram Raghunathan <srirr@...-intra.net>
To: ext Philippe Troin <phil@...i.org>,
Sriram Raghunathan <sriram.r@....com>
CC: netdev@...r.kernel.org
Subject: Re: About Raw socket, vlan + ip header
Hi Philippe,
Using SOCK_RAW.
Sriram
On Tuesday 03 March 2015 10:33 PM, ext Philippe Troin wrote:
> On Tue, 2015-03-03 at 10:44 +0530, Sriram Raghunathan wrote:
>> Writing a socket program where, I'm trying to construct a ether frame
>> with vlan id and copying ip header there after. By using PF_PACKET
>> family.
>>
>> But when I do a sendto, the ip header is stripped off from the
>> packet. Could you please let me know how to go about?
> man 7 packet
>
> ...
> The socket_type is either SOCK_RAW for raw packets including the link
> level header or SOCK_DGRAM for cooked packets with the link level
> header removed. The link level header information is available in a
> common format in a sockaddr_ll. protocol is the IEEE 802.3 protocol
> ...
>
> Are you opening a SOCK_RAW or a SOCK_DGRAM PF_PACKET socket?
>
> Phil.
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists