summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/physical.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2001-01-14 00:54:48 +0000
committerbrian <brian@FreeBSD.org>2001-01-14 00:54:48 +0000
commit187b13bfd2fa124b2ceb29d4e1e8e6032ba03662 (patch)
tree30b826763fdf682fb6dd4f0bcfcc5a95829bfad2 /usr.sbin/ppp/physical.c
parent94588351ce2d8970ce221dba2766deee30ef192b (diff)
downloadFreeBSD-src-187b13bfd2fa124b2ceb29d4e1e8e6032ba03662.zip
FreeBSD-src-187b13bfd2fa124b2ceb29d4e1e8e6032ba03662.tar.gz
Use fstat to check if descriptor 0 is a socket.
Suggested by: julian
Diffstat (limited to 'usr.sbin/ppp/physical.c')
-rw-r--r--usr.sbin/ppp/physical.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/usr.sbin/ppp/physical.c b/usr.sbin/ppp/physical.c
index 3d7811f..5e50224 100644
--- a/usr.sbin/ppp/physical.c
+++ b/usr.sbin/ppp/physical.c
@@ -119,15 +119,22 @@ struct {
int (*DeviceSize)(void);
} devices[] = {
#ifndef NOI4B
+ /*
+ * This must come before ``tty'' so that the probe routine is
+ * able to identify it as a more specific type of terminal device.
+ */
{ i4b_Create, i4b_iov2device, i4b_DeviceSize },
#endif
{ tty_Create, tty_iov2device, tty_DeviceSize },
#ifndef NONETGRAPH
- /* This must come before ``udp'' & ``tcp'' */
+ /*
+ * This must come before ``udp'' so that the probe routine is
+ * able to identify it as a more specific type of SOCK_DGRAM.
+ */
{ ether_Create, ether_iov2device, ether_DeviceSize },
#endif
#ifndef NOATM
- /* and so must this */
+ /* Ditto for ATM devices */
{ atm_Create, atm_iov2device, atm_DeviceSize },
#endif
{ tcp_Create, tcp_iov2device, tcp_DeviceSize },
OpenPOWER on IntegriCloud