ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I believe it does. SOCK_RDM is defined in include/linux/net.h.
Code:
/**
* enum sock_type - Socket types
* @SOCK_STREAM: stream (connection) socket
* @SOCK_DGRAM: datagram (conn.less) socket
* @SOCK_RAW: raw socket
* @SOCK_RDM: reliably-delivered message
* @SOCK_SEQPACKET: sequential packet socket
* @SOCK_DCCP: Datagram Congestion Control Protocol socket
* @SOCK_PACKET: linux specific way of getting packets at the dev level.
* For writing rarp and other similar things on the user level.
*
* When adding some new socket type please
* grep ARCH_HAS_SOCKET_TYPE include/asm-* /socket.h, at least MIPS
* overrides this enum for binary compat reasons.
*/
On further review it does appear that standard 2.6 kernels don't support SOCK_RDM... at least my 2.6.22 kernel packaged by Ubuntu doesn't.
I get an errno 94 back from the socket call which means "Socket type not supported" just like you did.
Also food for thought... I pulled out my copy of Advanced Programming in the UNIX Environment (2nd Edition by Stevens and Lago) and it does not list SOCK_RDM in the table of POSIX.1 socket types. It does say, however, that OS's are free to implement other socket types if they wish.
On further review it does appear that standard 2.6 kernels don't support SOCK_RDM... at least my 2.6.22 kernel packaged by Ubuntu doesn't.
I get an errno 94 back from the socket call which means "Socket type not supported" just like you did.
Also food for thought... I pulled out my copy of Advanced Programming in the UNIX Environment (2nd Edition by Stevens and Lago) and it does not list SOCK_RDM in the table of POSIX.1 socket types. It does say, however, that OS's are free to implement other socket types if they wish.
Nice find. I actually have that book lost in my personal jungle of literature :P
I find it interesting that after specification for socket has existed for so long no actual POSIX implementation existed, even if it were something like RUDP (RFC 1151). I wonder if anyone was willing to include such reliable UDP implementation for the kernel at any stage. Out of the many that exist out there surely a defacto standard like the Bell labs one could have been included. I'd much favour seeing something like udt3 though :P
I might be interested in actually helping support that kind of project for the kernel. Would kernel.org be the place to goto for such things?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.