Results 1 to 3 of 3

Thread: Linux Network API Syscalls

  1. #1

    Linux Network API Syscalls

    This is more of a commentary then a question, but I thought some of you may be interested.

    Lately, I've been spending my freetime at work doing some assembly programming. Assembly programming, btw, is not nearly as hard as most people seem to put on. I'm working on a shell server in assembly, templated from one I wrote in C, and I've noticed something 'interesting' about the Network API Syscall for Linux.

    Most Unix kernels have individual system calls for each networking function, for example: socket(), accept(), bind(), getsockopt(), etc are all syscalls on most Unix systems.

    Linux on the other hand uses a syscall similar to the ioctl syscall, which is used to execute all network functions, depending on a 'call' number. The syscall is called socketcall(). The usage is straight forward, but it seems somewhat tedious having to specify the call number AND putting in the arguments you would normally be giving the network function.

    I guess the interesting thing is that Linus (or whomever) would decide to break portability with other Unix systems by implementing a non-portable system call for all networking functions. I'm unaware of any efficiency gain by using socketcall(), and someday I hope to figure out why it was implemented this way. Does anyone know if this is something that was brought over from the Minix kernel?

    Anyway, if anyone has any insight into why socketcall() is there, I'd be interested in hearing your thoughts.

    Hopefully you're not bored to death now.

    P.S. I haven't bothered reading the kernel sources to see if it mentions why it was done, but I plan on doing it soon.

  2. #2

    Re:Linux Network API Syscalls

    Quote Originally Posted by Aaron_Adams
    Hopefully you're not bored to death now.
    mnk......... huh? ZzZzZzZz..... woah, um, hi.....
    hmm, not that i know _anything_ about programming, but interesting....

  3. #3

    Re:Linux Network API Syscalls

    LoL alastair.


    Thx for posting that. I havn't gotten into anything this advanced yet, however I thought it was an interesting read, and when you do come up with the answer to the question you asked, please write-up a follow-up commentary. I would like to know why they chose this as well. It seems like they would have gone the route of portability, but I suppose in this case they didn't.
    AMD Athlon 2200+ 1.8Ghz
    1280MB PC-3200 CAS2.5 RAM
    ATI Radeon 9600 Pro 128MB AGP
    Western Digital WDC WD2500JB-00FUA0 250GB 7200 rpm ATA/133
    Seagate ST3200822A 200GB 7200 rpm ATA/133
    Western Digital WDC WD1200BB-00CAA1 120GB 7200 rpm ATA/133
    Western Digital WDC WD800BB-00CAA1 80GB 7200 rpm ATA/133
    Maxtor OneTouch 2HA43R32 1TB 7200 rpm USB 2.0
    D-Link DFE-530TX+ 10/100 NIC
    D-Link DWL-G520 Rev.A
    Debian 5.0r1 Lenny

Similar Threads

  1. Network Performance of Linux
    By dscao in forum Linux - Hardware, Networking & Security
    Replies: 9
    Last Post: 08-14-2009, 06:06 AM
  2. Linux Network with 4 PC
    By scarab in forum Linux - Hardware, Networking & Security
    Replies: 5
    Last Post: 10-27-2005, 06:23 AM
  3. Network Linux and XP
    By gowild00 in forum Linux - General Topics
    Replies: 2
    Last Post: 12-17-2004, 11:17 PM
  4. help- linux network settings
    By microwiz2 in forum Linux - General Topics
    Replies: 3
    Last Post: 04-22-2002, 08:38 PM
  5. Linux on windows network
    By BJ250 in forum Linux - Hardware, Networking & Security
    Replies: 2
    Last Post: 01-16-2002, 11:41 PM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts