mnk......... huh? ZzZzZzZz..... woah, um, hi.....Originally Posted by Aaron_Adams
hmm, not that i know _anything_ about programming, but interesting....
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.
mnk......... huh? ZzZzZzZz..... woah, um, hi.....Originally Posted by Aaron_Adams
hmm, not that i know _anything_ about programming, but interesting....
whatdoyougetwhenyoumultiplysixbynine??
LoL alastair.
Aaron_Adams,
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
Bookmarks