Re: Difference between BSD sockets and Linux sockets

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

 



On Tue, Nov 06, 2007 at 08:58:41AM -0200, Mateus Interciso wrote:
> The main reason I'm reading this book is that my final paper on
> university is about the AntNet algorithm for routing, and I would VERY
> like to implement it, in a pure C fassion, and not using something
> like OmNet++. Also, I'm very found of networking, of course.
> So maybe, I'll need some more "esoteric" things, specially when it
> comes with RAW_SOCKETS, that at least for now, seems like a big
> question mark to me on how to implement them, not on what they are
> for. hehe

The RAW_SOCKET (PF_RAW) are something which has a bit more divergence
from BSD.  However essentially the same ping codes does work on both,
so the difference is not all that huge.

Some experimenting may discover what does and does not work.

> Thanks man.
> 
> Mateus

/Matti Aarnio


> On 11/6/07, Matti Aarnio <matti.aarnio@xxxxxxxxxxx> wrote:
> > On Tue, Nov 06, 2007 at 10:26:30AM +0000, Mateus Interciso wrote:
> > > Hello, I was reading the Unix Network Programing, and there it sayd that
> > > Linux Socket's was remade from scratch, instead of using BSD sockets,
> > > what's the main difference between both of them? Does anyone knows?
> >
> > Main difference is just that - re-implemented from scratch.
> >
> > That is, normal user codes see no differences at all, and those who play
> > with socket options should know what they are doing and why and how.
> >
> > At socket API level there is only one obscure detail in one setsockopt()
> > parameter set.  (man setsockopt, man 7 tcp)
> >
> > When you use that book for application level programming, see always
> > "man xyz" on the function your are about to use, if there is some obscure
> > difference from BSD, although none that really matter do exist.
> >
> > If you try to diverge from normal socket application usage into
> > more esoteric things of "what interfaces do I have in this system,
> > what are their addresses, etc." then some differences may manifest
> > or might not.
> >
> >
> > > Thanks a lot.
> > > Mateus
> >
> > /Matti Aarnio
> >
> 
> 
> -- 
> -==Zarnick==-
> -
> To unsubscribe from this list: send the line "unsubscribe linux-net" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux