Re: Implement custom network protocol for local processes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kfir,

On Mon, Jan 17, 2011 at 23:24 +0200, Kfir Lavi wrote:
> Hi,
> How can one implement custom header network protocol.
> I mean header that wraps regular network packets like ethernet, udp, tcp,
> etc...
> The sending of this custom packets is done between processes running
> locally.
> ie. I get a Ethernet packet, inspect it, then add my custom header and
> forward
> it to another process that listens to a socket, and expect to get data
> wrapped with
> this custom header.

You might want to use datagram-oriented UNIX socket to communicate with
client processes.

Also you have to understand what do you want - getting UDP packets on
specific port doesn't require anything special, just bind()'ing to this
port.  But you can get TCP segments only with SOCK_RAW socket.


Thanks,

-- 
Vasiliy

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux