epoc32/include/libc/netinet/arp.h
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
    32  */
    32  */
    33 
    33 
    34 #ifndef	_NETINET_ARP_H
    34 #ifndef	_NETINET_ARP_H
    35 #define	_NETINET_ARP_H
    35 #define	_NETINET_ARP_H
    36 
    36 
    37 
       
    38 #include <libc\sys\socket.h>
       
    39 
       
    40 #ifdef	__cplusplus
    37 #ifdef	__cplusplus
    41 extern "C" {
    38 extern "C" {
    42 #endif
    39 #endif
    43 
    40 
       
    41 #include <sys/socket.h>
       
    42 #include <sys/types.h>
       
    43 #include <libc/netinet/net_types.h>
    44 /**
    44 /**
    45 Address Resolution Protocol.
    45 Address Resolution Protocol.
    46 
    46 
    47 See RFC 826 for protocol description.  ARP packets are variable
    47 See RFC 826 for protocol description.  ARP packets are variable
    48 in size; the arphdr structure defines the fixed-length portion.
    48 in size; the arphdr structure defines the fixed-length portion.
    88 	struct ether_addr arp_sha;	/* sender hardware address */
    88 	struct ether_addr arp_sha;	/* sender hardware address */
    89 	u_char	arp_spa[4];		/* sender protocol address */
    89 	u_char	arp_spa[4];		/* sender protocol address */
    90 	struct ether_addr arp_tha;	/* target hardware address */
    90 	struct ether_addr arp_tha;	/* target hardware address */
    91 	u_char	arp_tpa[4];		/* target protocol address */
    91 	u_char	arp_tpa[4];		/* target protocol address */
    92 };
    92 };
    93 /**
       
    94 @internalComponent
       
    95 */
       
    96 #define	arp_hrd	ea_hdr.ar_hrd
       
    97 /**
       
    98 @internalComponent
       
    99 */
       
   100 #define	arp_pro	ea_hdr.ar_pro
       
   101 /**
       
   102 @internalComponent
       
   103 */
       
   104 #define	arp_hln	ea_hdr.ar_hln
       
   105 /**
       
   106 @internalComponent
       
   107 */
       
   108 #define	arp_pln	ea_hdr.ar_pln
       
   109 /**
       
   110 @internalComponent
       
   111 */
       
   112 #define	arp_op	ea_hdr.ar_op
       
   113 
    93 
   114 /**
    94 /**
   115 ARP ioctl request
    95 ARP ioctl request
   116 */
    96 */
   117 struct arpreq {
    97 struct arpreq {
   118 	struct	sockaddr arp_pa;		/* protocol address */
    98 	struct	sockaddr arp_pa;		/* protocol address */
   119 	struct	sockaddr arp_ha;		/* hardware address */
    99 	struct	sockaddr arp_ha;		/* hardware address */
   120 	int	arp_flags;			/* flags */
   100 	int	arp_flags;			/* flags */
   121 };
   101 };
   122 /**
   102 
   123 arp_flags and at_flags field values 
       
   124 @internalComponent
       
   125 */
       
   126 #define	ATF_INUSE	0x01	/* entry in use */
       
   127 /**
       
   128 @internalComponent
       
   129 */
       
   130 #define	ATF_COM		0x02	/* completed entry (enaddr valid) */
       
   131 /**
       
   132 @internalComponent
       
   133 */
       
   134 #define	ATF_PERM	0x04	/* permanent entry */
       
   135 /**
       
   136 @internalComponent
       
   137 */
       
   138 #define	ATF_PUBL	0x08	/* publish entry (respond for other host) */
       
   139 /**
       
   140 @internalComponent
       
   141 */
       
   142 #define	ATF_USETRAILERS	0x10	/* has requested trailers */
       
   143 
   103 
   144 #ifdef	__cplusplus
   104 #ifdef	__cplusplus
   145 }
   105 }
   146 #endif
   106 #endif
   147 
   107