# /* udp_socket.c */ /* EMACS_MODES: c !fill */ /* User Datagram Protocol layer for the UNIX network system. The * following routines are included: * udp_socket return a unique socket number for a udp conn. */ #include unshort udp_socket () /* Return a unique value for the local udp socket. Just call down * to the operating system to get one. Make sure that it's not a * well-known socket. */ { reg unshort sock; /* the socket */ sock = getid (); if (sock < 1000) sock += 1000; return (sock); }