All of lore.kernel.org
 help / color / mirror / Atom feed
* Adding new protocol to linux.
@ 2016-03-28 15:03 Manoj Nayak
  2016-03-28 20:08 ` Rami Rosen
  0 siblings, 1 reply; 9+ messages in thread
From: Manoj Nayak @ 2016-03-28 15:03 UTC (permalink / raw)
  To: kernelnewbies

> 1) Is it possible to write a new protocol for linux with an out of
> tree module without modifing socket.h file?

I think this has been already tried in the following code.

http://lxr.free-electrons.com/source/include/net/bluetooth/bluetooth.h#L36

http://lxr.free-electrons.com/source/include/linux/socket.h#L239

The challenge is to expose this development specific header file to
userspace.
The following document talks about that.

http://kernelnewbies.org/KernelHeaders

Regards
Manoj Nayak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160328/cbd945bb/attachment.html 

^ permalink raw reply	[flat|nested] 9+ messages in thread
* Adding new protocol to linux.
@ 2016-03-29  4:36 Manoj Nayak
  0 siblings, 0 replies; 9+ messages in thread
From: Manoj Nayak @ 2016-03-29  4:36 UTC (permalink / raw)
  To: kernelnewbies

Hi Daniel,

Some of the Network application use two connections. One connection for
control channel to send commands and status update. Other connection is
used for real data transfer. For example: FTP. However this needs two
socket.

TCP talks about out-of-band data transfer using Urgent Pointer flag and
Urgent pointer offset in the tcp header. However the data transfer uses the
same connection.

Regards
Manoj Nayak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160329/7b1a00f2/attachment.html 

^ permalink raw reply	[flat|nested] 9+ messages in thread
* Adding new protocol to linux
@ 2016-03-28 13:35 Manoj Nayak
  0 siblings, 0 replies; 9+ messages in thread
From: Manoj Nayak @ 2016-03-28 13:35 UTC (permalink / raw)
  To: kernelnewbies

> 2) Could netlink socket be used to solve this? .. and

Netlink is used to transfer information between kernel and user-space
processes.  It consists of a standard sockets-based interface for
user space processes and an internal kernel API for kernel modules.
netlink socket does not call dev_queue_xmit().

But here the requirement is to transfer the packet using Nordic's nRF24L01+.

AF_PACKET is used to output a raw packet from userspace to a device layer.
Even AF_PACKET does that using proto_ops and net_proto_family.

Regards
Manoj Nayak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160328/7238ca5e/attachment.html 

^ permalink raw reply	[flat|nested] 9+ messages in thread
* Adding new protocol to linux.
@ 2016-03-26  2:00 Daniel.
  2016-03-26 11:04 ` Rami Rosen
  2016-03-26 19:59 ` Valdis.Kletnieks at vt.edu
  0 siblings, 2 replies; 9+ messages in thread
From: Daniel. @ 2016-03-26  2:00 UTC (permalink / raw)
  To: kernelnewbies

Hi everybody,

I'm planing to write a socket API for Nordic's nRF24L01+ and I was
digging on socket code and find all supported protocols at
include/linux/socket.h with all that #define AF_x y. So my questions
are:

1) Is it possible to write a new protocol for linux with an out of
tree module without modifing socket.h file?
2) Could netlink socket be used to solve this? .. and
3) I saw that there is net_device_ops and proto_ops. How they are tied together?

Thanks in advance and
Best regards,

-- 
"Do or do not. There is no try"
  Yoda Master

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-03-29  4:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-28 15:03 Adding new protocol to linux Manoj Nayak
2016-03-28 20:08 ` Rami Rosen
2016-03-28 21:36   ` Daniel.
  -- strict thread matches above, loose matches on Subject: below --
2016-03-29  4:36 Manoj Nayak
2016-03-28 13:35 Manoj Nayak
2016-03-26  2:00 Daniel.
2016-03-26 11:04 ` Rami Rosen
     [not found]   ` <CAF3SDA5kn7_Pnx0=XpeQOB-D2UCeYZEnzPpcE=25U30ob9KSHQ@mail.gmail.com>
2016-03-26 23:30     ` Daniel
2016-03-26 19:59 ` Valdis.Kletnieks at vt.edu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.