Re: Question:socket sources



vpaces@xxxxxxxxx wrote:
[ ... ]
For example:
int socket(int domain, int type, int protocol);
int bind(int s, const struct sockaddr *addr, socklen_t addrlen);

Browsing through your WWW CVS repository I'm just finding sources for MAN pages in directory / src / lib / libc / sys: access.2, connect.2 and so on. But where are the C sources of these calls? Or are the sources of these system calls not available?

C functions from section 2 of the manpages are "system calls", which means that a stub function is generated in libc via makesyscalls.sh, but most of the work in done in the kernel:

http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/kern/uipc_syscalls.c?rev=1.221.2.4
http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/kern/uipc_socket.c?rev=1.283

--
-Chuck
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: [2.6 patch] drivers/pnp/: cleanups
    ... int pnp_register_protocol(struct pnp_protocol *protocol); ... this function will free all mem used by dev ...
    (Linux-Kernel)
  • Re: Long integer to bytes?
    ... I'm attempting to implement a well defined protocol which has been ... output the data you mask the low order 4 bytes into an int. ... directly to the network using DataOutputStream.writeInt. ...
    (comp.lang.java.help)
  • Re: Serial interface "Line Protocol" up/ down question
    ... I have one that will not go UP, UP when doing a Show Int. ... What dictates if Line Protocol is UP? ... Last input 00:00:08, output 18:55:50, output hang never ... maybe the remote router was not configured for PPP? ...
    (comp.dcom.sys.cisco)
  • Serial interface "Line Protocol" up/ down question
    ... I have one that will not go UP, UP when doing a Show Int. ... Serial4/0 is up, line protocol is down ... Keepalive set ... output buffer failures, ...
    (comp.dcom.sys.cisco)
  • std::vector<char> or std::ostringstream
    ... I'm playing/developing a simple p2p file sharing client for an existing ... A 2 second description of the protocol is ... Message Length = int, 4 bytes ...
    (comp.lang.cpp)