ip_addr.xml 927 B

123456789101112131415161718192021222324252627282930313233
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
  4. <section id="ip_addr" xmlns:xi="http://www.w3.org/2001/XInclude">
  5. <sectioninfo>
  6. <revhistory>
  7. <revision>
  8. <revnumber>$Revision$</revnumber>
  9. <date>$Date$</date>
  10. </revision>
  11. </revhistory>
  12. </sectioninfo>
  13. <title>Structure <structname>ip_addr</structname></title>
  14. <para>
  15. The structure represents IPv4 or IPv6 address. It is defined in
  16. <filename>ip_addr.h</filename>.
  17. <programlisting>
  18. struct ip_addr{
  19. unsigned int af; /* address family: AF_INET6 or AF_INET */
  20. unsigned int len; /* address len, 16 or 4 */
  21. /* 64 bits aligned address */
  22. union {
  23. unsigned int addr32[4];
  24. unsigned short addr16[8];
  25. unsigned char addr[16];
  26. }u;
  27. };
  28. </programlisting>
  29. </para>
  30. </section>