Date: Wed, 15 May 2002 18:01:46 +0200 From: Daniel Blankensteiner <db@traceroute.dk> To: freebsd-questions@freebsd.org Subject: Descriptors Message-ID: <20020515160127.JFIA12125.fepC.post.tele.dk@there>
next in thread | raw e-mail | index | archive | help
Hi FL (FreeBSD lovers ;-) I am reading about socket programming and the author wrote that a socket is given a descriptor, like when you open a file you get a file descriptor. The descriptors are given from the same table, so a file and a socket can't get the same descriptor. That is all fine, but then I run sockstat on my FreeBSD 4.5 Stable, I get: db# sockstat -4 -l USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS root centeric 696 8 tcp4 *:49158 *:* root XF86_SVG 637 0 tcp4 *:6000 *:* root sshd 82 4 tcp4 *:22 *:* root amd 72 4 udp4 *:1023 *:* root amd 72 5 tcp4 *:1023 *:* root amd 72 6 udp4 *:1022 *:* root amd 72 7 udp4 *:1021 *:* daemon portmap 70 3 udp4 *:111 *:* daemon portmap 70 4 tcp4 *:111 *:* root syslogd 67 5 udp4 *:514 *:* Why do some have the same FD (file descriptor)? br db To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020515160127.JFIA12125.fepC.post.tele.dk>