LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-12-2004, 09:27 PM   #1
trotters78
LQ Newbie
 
Registered: Aug 2004
Location: Japan
Distribution: Fedora Core 2/ FreeBSD 4.9
Posts: 12

Rep: Reputation: 0
Implementation of sockets in Linux and FreeBsd


Hi,

I have checked the forum and seems that noone has asked this question before.
I would like to ask what is difference between sockets in Linux and BSD ? (in terms of programming)

I think the data structure is different, but can someone advise me regarding this? How about Netlink API? Function calls?
Are they reusable?

I know that Linux and BSD are closely related and most of the codes are reusable.
My main concern is, can I throw a socket program that is working in BSD into Linux, compile it and expect it to work?

If not, what should i take note of?

Any kind of response will be greatly appreciated.
Thank you in advance.

Regards
Daryl
 
Old 08-12-2004, 09:37 PM   #2
infamous41md
Member
 
Registered: Mar 2003
Posts: 804

Rep: Reputation: 30
the sockets api is the same for linux and bsd at the user level. netlink is linux only, netgraph is bsd only. the raw sockets api is different, linux has LSF(linux socket filter) and packet sockets, bsd has BPF(berkely packet filter). other than that i can't think of anything else. any plain old sockets app, ie socket(), connect(), accept(), and so on will compile fine on both. the select() call is slightly different in regards to the timeout value and whether it gets changed,check out man page for that one.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux NetCafe Implementation yokim Linux - Newbie 2 10-08-2005 09:32 PM
Tcp implementation in linux kskkumar Linux - Networking 1 08-24-2005 05:45 AM
tcp linux implementation mk_26 Linux - Networking 0 03-22-2004 08:10 PM
Linux TCP implementation mk_26 Linux - Newbie 0 03-22-2004 04:05 PM
linux security implementation klog2_k Linux - Security 3 07-17-2003 09:56 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration