Skip to contentSkip to conversation

about the sock_fd

DISCUSSION C.J 2 participants 2 messages May 9, 2008 PPP protocol drivers and compressors

lore
Share & tools
lore

C.J

author
#0 lore raw

Hi list,

In the pppd code, I read that it used sock_fd to set ip addr on a interface(ppp0). I want to know whether this sock_fd is a common udp socket or not. Do we need some extra operations on this socket. Like unit_fd or dev_fd which both of them need ioctl on them.

Thx & Reg

--
cj

#1 lore raw
Quoted 1 line · C.J

In the pppd code, I read that it used sock_fd to set ip addr on a interface(ppp0). I want to know whether this sock_fd is a common udp socket or not. Do we need some extra operations on this socket. Like unit_fd or dev_fd which both of them need ioctl on them.

Does this help?

% grep 'sock_fd = ' *.c
sys-linux.c:static int sock_fd = -1; /* socket for doing interface ioctls */

sys-linux.c:    sock_fd = socket(AF_INET, SOCK_DGRAM, 0);
sys-linux.c:    sock_fd = socket(AF_INET, SOCK_DGRAM, 0);

%

Signature · 1 line
James Carlson         42.703N 71.076W         <[email protected]>