Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages

IPExport.h

Go to the documentation of this file.
00001 /********************************************************************/
00002 /**                     Microsoft LAN Manager                      **/
00003 /**               Copyright(c) Microsoft Corp., 1990-1999          **/
00004 /********************************************************************/
00005 /* :ts=4 */
00006 
00007 //** IPEXPORT.H - IP public definitions.
00008 //
00009 //  This file contains public definitions exported to transport layer and
00010 //  application software.
00011 //
00012 
00013 #ifndef IP_EXPORT_INCLUDED
00014 #define IP_EXPORT_INCLUDED  1
00015 
00016 #if _MSC_VER > 1000
00017 #pragma once
00018 #endif
00019 
00020 //#include <windef.h> // for FAR decl
00021 #undef FAR
00022 #define FAR
00023 
00024 //
00025 // IP type definitions.
00026 //
00027 typedef unsigned long   IPAddr;     // An IP address.
00028 typedef unsigned long   IPMask;     // An IP subnet mask.
00029 typedef unsigned long   IP_STATUS;  // Status code returned from IP APIs.
00030 
00031 
00032 /*INC*/
00033 
00034 //
00035 // The ip_option_information structure describes the options to be
00036 // included in the header of an IP packet. The TTL, TOS, and Flags
00037 // values are carried in specific fields in the header. The OptionsData
00038 // bytes are carried in the options area following the standard IP header.
00039 // With the exception of source route options, this data must be in the
00040 // format to be transmitted on the wire as specified in RFC 791. A source
00041 // route option should contain the full route - first hop thru final
00042 // destination - in the route data. The first hop will be pulled out of the
00043 // data and the option will be reformatted accordingly. Otherwise, the route
00044 // option should be formatted as specified in RFC 791.
00045 //
00046 struct ip_option_information {
00047     unsigned char      Ttl;             // Time To Live
00048     unsigned char      Tos;             // Type Of Service
00049     unsigned char      Flags;           // IP header flags
00050     unsigned char      OptionsSize;     // Size in bytes of options data
00051     unsigned char FAR *OptionsData;     // Pointer to options data
00052 }; /* ip_option_information */
00053 
00054 //
00055 // The icmp_echo_reply structure describes the data returned in response
00056 // to an echo request.
00057 //
00058 struct icmp_echo_reply {
00059     IPAddr                         Address;         // Replying address
00060     unsigned long                  Status;          // Reply IP_STATUS
00061     unsigned long                  RoundTripTime;   // RTT in milliseconds
00062     unsigned short                 DataSize;        // Reply data size in bytes
00063     unsigned short                 Reserved;        // Reserved for system use
00064     void FAR                      *Data;            // Pointer to the reply data
00065     struct ip_option_information   Options;         // Reply options
00066 }; /* icmp_echo_reply */
00067 
00068 
00069 /*NOINC*/
00070 
00071 typedef struct ip_option_information IP_OPTION_INFORMATION,
00072                                      FAR *PIP_OPTION_INFORMATION;
00073 
00074 typedef struct icmp_echo_reply ICMP_ECHO_REPLY,
00075                                FAR *PICMP_ECHO_REPLY;
00076 
00077 /*INC*/
00078 
00079 
00080 
00081 struct ArpRequestBuffer {
00082    IPAddr DestAddress;
00083    IPAddr SrcAddress;
00084 }; /* ArpRequestBuffer */
00085 
00086 /*NOINC*/
00087 
00088 typedef struct ArpRequestBuffer ARP_SEND_REPLY,
00089                                FAR *PARP_SEND_REPLY;
00090 
00091 typedef struct _TCP_RESERVE_PORT_RANGE
00092 {
00093 
00094    USHORT  UpperRange;
00095    USHORT  LowerRange;
00096 }TCP_RESERVE_PORT_RANGE, *PTCP_RESERVE_PORT_RANGE;
00097 
00098 #define MAX_ADAPTER_NAME 128
00099 
00100 typedef struct _IP_ADAPTER_INDEX_MAP
00101 {
00102    ULONG Index;
00103    WCHAR  Name[MAX_ADAPTER_NAME];
00104 }IP_ADAPTER_INDEX_MAP, *PIP_ADAPTER_INDEX_MAP;
00105 
00106 typedef struct _IP_INTERFACE_INFO
00107 {
00108      LONG    NumAdapters;
00109      IP_ADAPTER_INDEX_MAP Adapter[1];
00110 } IP_INTERFACE_INFO,*PIP_INTERFACE_INFO;
00111 
00112 typedef struct _IP_UNIDIRECTIONAL_ADAPTER_ADDRESS
00113 {
00114      ULONG    NumAdapters;
00115      IPAddr  Address[1];
00116 } IP_UNIDIRECTIONAL_ADAPTER_ADDRESS, *PIP_UNIDIRECTIONAL_ADAPTER_ADDRESS;
00117 
00118 typedef struct _IP_ADAPTER_ORDER_MAP
00119 {
00120     ULONG NumAdapters;
00121     ULONG AdapterOrder[1];
00122 } IP_ADAPTER_ORDER_MAP, *PIP_ADAPTER_ORDER_MAP;
00123 
00124 //
00125 // IP_STATUS codes returned from IP APIs
00126 //
00127 
00128 #define IP_STATUS_BASE              11000
00129 
00130 #define IP_SUCCESS                  0
00131 #define IP_BUF_TOO_SMALL            (IP_STATUS_BASE + 1)
00132 #define IP_DEST_NET_UNREACHABLE     (IP_STATUS_BASE + 2)
00133 #define IP_DEST_HOST_UNREACHABLE    (IP_STATUS_BASE + 3)
00134 #define IP_DEST_PROT_UNREACHABLE    (IP_STATUS_BASE + 4)
00135 #define IP_DEST_PORT_UNREACHABLE    (IP_STATUS_BASE + 5)
00136 #define IP_NO_RESOURCES             (IP_STATUS_BASE + 6)
00137 #define IP_BAD_OPTION               (IP_STATUS_BASE + 7)
00138 #define IP_HW_ERROR                 (IP_STATUS_BASE + 8)
00139 #define IP_PACKET_TOO_BIG           (IP_STATUS_BASE + 9)
00140 #define IP_REQ_TIMED_OUT            (IP_STATUS_BASE + 10)
00141 #define IP_BAD_REQ                  (IP_STATUS_BASE + 11)
00142 #define IP_BAD_ROUTE                (IP_STATUS_BASE + 12)
00143 #define IP_TTL_EXPIRED_TRANSIT      (IP_STATUS_BASE + 13)
00144 #define IP_TTL_EXPIRED_REASSEM      (IP_STATUS_BASE + 14)
00145 #define IP_PARAM_PROBLEM            (IP_STATUS_BASE + 15)
00146 #define IP_SOURCE_QUENCH            (IP_STATUS_BASE + 16)
00147 #define IP_OPTION_TOO_BIG           (IP_STATUS_BASE + 17)
00148 #define IP_BAD_DESTINATION          (IP_STATUS_BASE + 18)
00149 
00150 
00151 //
00152 // The next group are status codes passed up on status indications to
00153 // transport layer protocols.
00154 //
00155 #define IP_ADDR_DELETED             (IP_STATUS_BASE + 19)
00156 #define IP_SPEC_MTU_CHANGE          (IP_STATUS_BASE + 20)
00157 #define IP_MTU_CHANGE               (IP_STATUS_BASE + 21)
00158 #define IP_UNLOAD                   (IP_STATUS_BASE + 22)
00159 #define IP_ADDR_ADDED               (IP_STATUS_BASE + 23)
00160 #define IP_MEDIA_CONNECT            (IP_STATUS_BASE + 24)
00161 #define IP_MEDIA_DISCONNECT         (IP_STATUS_BASE + 25)
00162 #define IP_BIND_ADAPTER             (IP_STATUS_BASE + 26)
00163 #define IP_UNBIND_ADAPTER           (IP_STATUS_BASE + 27)
00164 #define IP_DEVICE_DOES_NOT_EXIST    (IP_STATUS_BASE + 28)
00165 #define IP_DUPLICATE_ADDRESS        (IP_STATUS_BASE + 29)
00166 #define IP_INTERFACE_METRIC_CHANGE  (IP_STATUS_BASE + 30)
00167 #define IP_RECONFIG_SECFLTR         (IP_STATUS_BASE + 31)
00168 #define IP_NEGOTIATING_IPSEC        (IP_STATUS_BASE + 32)
00169 #define IP_INTERFACE_WOL_CAPABILITY_CHANGE  (IP_STATUS_BASE + 33)
00170 #define IP_DUPLICATE_IPADD          (IP_STATUS_BASE + 34)
00171 
00172 #define IP_GENERAL_FAILURE          (IP_STATUS_BASE + 50)
00173 #define MAX_IP_STATUS               IP_GENERAL_FAILURE
00174 #define IP_PENDING                  (IP_STATUS_BASE + 255)
00175 
00176 
00177 //
00178 // Values used in the IP header Flags field.
00179 //
00180 #define IP_FLAG_DF      0x2         // Don't fragment this packet.
00181 
00182 //
00183 // Supported IP Option Types.
00184 //
00185 // These types define the options which may be used in the OptionsData field
00186 // of the ip_option_information structure.  See RFC 791 for a complete
00187 // description of each.
00188 //
00189 #define IP_OPT_EOL      0          // End of list option
00190 #define IP_OPT_NOP      1          // No operation
00191 #define IP_OPT_SECURITY 0x82       // Security option
00192 #define IP_OPT_LSRR     0x83       // Loose source route
00193 #define IP_OPT_SSRR     0x89       // Strict source route
00194 #define IP_OPT_RR       0x7        // Record route
00195 #define IP_OPT_TS       0x44       // Timestamp
00196 #define IP_OPT_SID      0x88       // Stream ID (obsolete)
00197 #define IP_OPT_ROUTER_ALERT 0x94  // Router Alert Option
00198 
00199 #define MAX_OPT_SIZE    40         // Maximum length of IP options in bytes
00200 
00201 #ifdef CHICAGO
00202 
00203 // Ioctls code exposed by Memphis tcpip stack.
00204 // For NT these ioctls are define in ntddip.h  (private\inc)
00205 
00206 #define IOCTL_IP_RTCHANGE_NOTIFY_REQUEST   101
00207 #define IOCTL_IP_ADDCHANGE_NOTIFY_REQUEST  102
00208 #define IOCTL_ARP_SEND_REQUEST             103
00209 #define IOCTL_IP_INTERFACE_INFO            104
00210 #define IOCTL_IP_GET_BEST_INTERFACE        105
00211 #define IOCTL_IP_UNIDIRECTIONAL_ADAPTER_ADDRESS        106
00212 
00213 #endif
00214 
00215 
00216 #endif // IP_EXPORT_INCLUDED
00217 
00218 

Generated on Sun May 14 14:51:19 2006 by  doxygen 1.4.2