in.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /* Copyright (C) 1991 Free Software Foundation, Inc.
  2. This file is part of the GNU C Library.
  3. The GNU C Library is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 1, or (at your option)
  6. any later version.
  7. The GNU C Library is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with the GNU C Library; see the file COPYING. If not, write to
  13. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
  14. #ifndef _NETINET_IN_H
  15. #define _NETINET_IN_H 1
  16. #include <features.h>
  17. #include <sys/socket.h>
  18. __BEGIN_DECLS
  19. /* Standard well-known ports. */
  20. enum
  21. {
  22. IPPORT_ECHO = 7, /* Echo service. */
  23. IPPORT_DISCARD = 9, /* Discard transmissions service. */
  24. IPPORT_SYSTAT = 11, /* System status service. */
  25. IPPORT_DAYTIME = 13, /* Time of day service. */
  26. IPPORT_NETSTAT = 15, /* Network status service. */
  27. IPPORT_FTP = 21, /* File Transfer Protocol. */
  28. IPPORT_TELNET = 23, /* Telnet protocol. */
  29. IPPORT_SMTP = 25, /* Simple Mail Transfer Protocol. */
  30. IPPORT_TIMESERVER = 37, /* Timeserver service. */
  31. IPPORT_NAMESERVER = 42, /* Domain Name Service. */
  32. IPPORT_WHOIS = 43, /* Internet Whois service. */
  33. IPPORT_MTP = 57,
  34. IPPORT_TFTP = 69, /* Trivial File Transfer Protocol. */
  35. IPPORT_RJE = 77,
  36. IPPORT_FINGER = 79, /* Finger service. */
  37. IPPORT_TTYLINK = 87,
  38. IPPORT_SUPDUP = 95, /* SUPDUP protocol. */
  39. IPPORT_EXECSERVER = 512, /* execd service. */
  40. IPPORT_LOGINSERVER = 513, /* rlogind service. */
  41. IPPORT_CMDSERVER = 514,
  42. IPPORT_EFSSERVER = 520,
  43. /* UDP ports. */
  44. IPPORT_BIFFUDP = 512,
  45. IPPORT_WHOSERVER = 513,
  46. IPPORT_ROUTESERVER = 520,
  47. /* Ports less than this value are reserved for privileged processes. */
  48. IPPORT_RESERVED = 1024,
  49. /* Ports greater this value are reserved for (non-privileged) servers. */
  50. IPPORT_USERRESERVED = 5000
  51. };
  52. /* Link numbers. */
  53. #define IMPLINK_IP 155
  54. #define IMPLINK_LOWEXPER 156
  55. #define IMPLINK_HIGHEXPER 158
  56. /*
  57. * Many other definitions have been moved to <linux/in.h>,
  58. * because several parts of the kernel need them. -FvK
  59. */
  60. #include <linux/in.h>
  61. /*
  62. * Bind a socket to a privileged IP port
  63. */
  64. extern int bindresvport __P ((int __sockfd,
  65. struct sockaddr_in * __sin));
  66. __END_DECLS
  67. #endif /* netinet/in.h */