namedb.h.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <?xml version='1.0' encoding='iso-8859-1'?>
  2. <!doctype html public '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
  3. <html xmlns='http://www.w3c.org/1999/xhtml' lang='en-us'>
  4. <head>
  5. <title>
  6. namedb.h
  7. </title>
  8. <meta http-equiv='content-type' content='text/html;iso-8859-1'/>
  9. <meta name='generator' content='motley-tools 1.9.4 13:40:33 Feb 18 2015'/>
  10. <meta name='author' content='cmaier@cmassoc.net'/>
  11. <meta name='robots' content='noindex,nofollow'/>
  12. <link href='toolkit.css' rel='stylesheet' type='text/css'/>
  13. </head>
  14. <body>
  15. <div class='headerlink'>
  16. [<a href='mme.h.html' title=' mme.h '>PREV</a>]
  17. [<a href='toolkit.html' title=' Index '>HOME</a>]
  18. [<a href='node.h.html' title=' node.h '>NEXT</a>]
  19. </div>
  20. <pre>
  21. /*
  22. * Copyright (c) 1994, 1996
  23. * The Regents of the University of California. All rights reserved.
  24. *
  25. * Redistribution and use in source and binary forms, with or without
  26. * modification, are permitted provided that the following conditions
  27. * are met:
  28. * 1. Redistributions of source code must retain the above copyright
  29. * notice, this list of conditions and the following disclaimer.
  30. * 2. Redistributions in binary form must reproduce the above copyright
  31. * notice, this list of conditions and the following disclaimer in the
  32. * documentation and/or other materials provided with the distribution.
  33. * 3. All advertising materials mentioning features or use of this software
  34. * must display the following acknowledgement:
  35. * This product includes software developed by the Computer Systems
  36. * Engineering Group at Lawrence Berkeley Laboratory.
  37. * 4. Neither the name of the University nor of the Laboratory may be used
  38. * to endorse or promote products derived from this software without
  39. * specific prior written permission.
  40. *
  41. * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  42. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  43. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  44. * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  45. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  46. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  47. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  48. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  49. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  50. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  51. * SUCH DAMAGE.
  52. *
  53. * @(#) $Header: /tcpdump/master/libpcap/pcap/namedb.h,v 1.1 2006/10/04 18:09:22 guy Exp $ (LBL)
  54. */
  55. #ifndef lib_pcap_namedb_h
  56. #define lib_pcap_namedb_h
  57. #ifdef __cplusplus
  58. extern &quot;C&quot; {
  59. #endif
  60. /*
  61. * As returned by the pcap_next_etherent()
  62. * XXX this stuff doesn't belong in this interface, but this
  63. * library already must do name to address translation, so
  64. * on systems that don't have support for /etc/ethers, we
  65. * export these hooks since they'll
  66. */
  67. struct pcap_etherent {
  68. u_char addr[6];
  69. char name[122];
  70. };
  71. #ifndef PCAP_ETHERS_FILE
  72. #define PCAP_ETHERS_FILE &quot;/etc/ethers&quot;
  73. #endif
  74. struct pcap_etherent *pcap_next_etherent(FILE *);
  75. u_char *pcap_ether_hostton(const char*);
  76. u_char *pcap_ether_aton(const char *);
  77. bpf_u_int32 **pcap_nametoaddr(const char *);
  78. #ifdef INET6
  79. struct addrinfo *pcap_nametoaddrinfo(const char *);
  80. #endif
  81. bpf_u_int32 pcap_nametonetaddr(const char *);
  82. int pcap_nametoport(const char *, int *, int *);
  83. int pcap_nametoportrange(const char *, int *, int *, int *);
  84. int pcap_nametoproto(const char *);
  85. int pcap_nametoeproto(const char *);
  86. int pcap_nametollc(const char *);
  87. /*
  88. * If a protocol is unknown, PROTO_UNDEF is returned.
  89. * Also, pcap_nametoport() returns the protocol along with the port number.
  90. * If there are ambiguous entried in /etc/services (i.e. domain
  91. * can be either tcp or udp) PROTO_UNDEF is returned.
  92. */
  93. #define PROTO_UNDEF -1
  94. /* XXX move these to pcap-int.h? */
  95. int __pcap_atodn(const char *, bpf_u_int32 *);
  96. int __pcap_atoin(const char *, bpf_u_int32 *);
  97. u_short __pcap_nametodnaddr(const char *);
  98. #ifdef __cplusplus
  99. }
  100. #endif
  101. #endif
  102. </pre>
  103. <div class='footerlink'>
  104. [<a href='mme.h.html' title=' mme.h '>PREV</a>]
  105. [<a href='toolkit.html' title=' Index '>HOME</a>]
  106. [<a href='node.h.html' title=' node.h '>NEXT</a>]
  107. </div>
  108. </body>
  109. </html>