⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jwaipexport.pas

📁 比较全面的win32api开发包
💻 PAS
📖 第 1 页 / 共 2 页
字号:
{******************************************************************************}
{                                                       	               }
{ Internet Protocol Helper API interface Unit for Object Pascal                }
{                                                       	               }
{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft          }
{ Corporation. All Rights Reserved.                                            }
{ 								               }
{ The original file is: ipexport.h, released August 2001. The original Pascal  }
{ code is: IpExport.pas, released September 2000. The initial developer of the }
{ Pascal code is Marcel van Brakel (brakelm@chello.nl).                        }
{                                                                              }
{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001            }
{ Marcel van Brakel. All Rights Reserved.                                      }
{ 								               }
{ Contributor(s): John C. Penman (jcp@craiglockhart.com)                       }
{                 Vladimir Vassiliev (voldemarv@hotpop.com)                    }
{ 								               }
{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI)        }
{								               }
{ You may retrieve the latest version of this file at the Project JEDI home    }
{ page, located at http://delphi-jedi.org or my personal homepage located at   }
{ http://members.chello.nl/m.vanbrakel2                                        }
{								               }
{ The contents of this file are used with permission, subject to the Mozilla   }
{ Public License Version 1.1 (the "License"); you may not use this file except }
{ in compliance with the License. You may obtain a copy of the License at      }
{ http://www.mozilla.org/MPL/MPL-1.1.html                                      }
{                                                                              }
{ Software distributed under the License is distributed on an "AS IS" basis,   }
{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
{ the specific language governing rights and limitations under the License.    }
{                                                                              }
{ Alternatively, the contents of this file may be used under the terms of the  }
{ GNU Lesser General Public License (the  "LGPL License"), in which case the   }
{ provisions of the LGPL License are applicable instead of those above.        }
{ If you wish to allow use of your version of this file only under the terms   }
{ of the LGPL License and not to allow others to use your version of this file }
{ under the MPL, indicate your decision by deleting  the provisions above and  }
{ replace  them with the notice and other provisions required by the LGPL      }
{ License.  If you do not delete the provisions above, a recipient may use     }
{ your version of this file under either the MPL or the LGPL License.          }
{ 								               }
{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
{ 								               }
{******************************************************************************}

unit JwaIpExport;

{$WEAKPACKAGEUNIT}

{$HPPEMIT ''}
{$HPPEMIT '#include "ipexport.h"'}
{$HPPEMIT ''}

{$I WINDEFINES.INC}

interface

uses
  JwaWinType;

//
// IP type definitions.
//

type
  IPAddr = ULONG;     // An IP address.
  {$EXTERNALSYM IPAddr}
  IPMask = ULONG;     // An IP subnet mask.
  {$EXTERNALSYM IPMask}
  IP_STATUS = ULONG;  // Status code returned from IP APIs.
  {$EXTERNALSYM IP_STATUS}

{$IFNDEF s6_addr}

//
// Duplicate these definitions here so that this file can be included by
// kernel-mode components which cannot include ws2tcpip.h, as well as
// by user-mode components which do.
//

type
  IN6_ADDR = record
    case Integer of
      0: (Byte: array [0..15] of UCHAR);
      1: (Word: array [0..7] of USHORT);
  end;
  {$EXTERNALSYM IN6_ADDR}
  TIn6Addr = IN6_ADDR;
  PIn6Addr = ^IN6_ADDR;

  in_addr6 = in6_addr;
  {$EXTERNALSYM in_addr6}
  TInAddr6 = in_addr6;
  PInAddr6 = ^in_addr6;

{$ENDIF}

type
  IPv6Addr = in6_addr;
  {$EXTERNALSYM IPv6Addr}
  TIPv6Addr = IPv6Addr;
  PIPv6Addr = ^IPv6Addr;

//#ifndef s_addr

  in_addr = record
    case Integer of
      0: (
        s_b1, s_b2, s_b3, s_b4: UCHAR;
        );
      1: (
        s_w1, s_w2: USHORT
        );
      2: (
        S_addr: ULONG
        );
  end;
  {$EXTERNALSYM in_addr}

//#define s_addr  S_un.S_addr /* can be used for most tcp & ip code */

//#endif

//
// The ip_option_information structure describes the options to be
// included in the header of an IP packet. The TTL, TOS, and Flags
// values are carried in specific fields in the header. The OptionsData
// bytes are carried in the options area following the standard IP header.
// With the exception of source route options, this data must be in the
// format to be transmitted on the wire as specified in RFC 791. A source
// route option should contain the full route - first hop thru final
// destination - in the route data. The first hop will be pulled out of the
// data and the option will be reformatted accordingly. Otherwise, the route
// option should be formatted as specified in RFC 791.
//

type
  IP_OPTION_INFORMATION = record
    Ttl: UCHAR;          // Time To Live
    Tos: UCHAR;          // Type Of Service
    Flags: UCHAR;        // IP header flags
    OptionsSize: UCHAR;  // Size in bytes of options data
    OptionsData: PUCHAR; // Pointer to options data
  end;
  {$EXTERNALSYM IP_OPTION_INFORMATION}
  PIP_OPTION_INFORMATION = ^IP_OPTION_INFORMATION;
  {$EXTERNALSYM PIP_OPTION_INFORMATION}
  TIpOptionInformation = IP_OPTION_INFORMATION;
  PIpOptionInformation = PIP_OPTION_INFORMATION;

//
// The icmp_echo_reply structure describes the data returned in response
// to an echo request.
//

  ICMP_ECHO_REPLY = record
    Address: IPAddr;      // Replying address
    Status: ULONG;        // Reply IP_STATUS
    RoundTripTime: ULONG; // RTT in milliseconds
    DataSize: USHORT;     // Reply data size in bytes
    Reserved: USHORT;     // Reserved for system use
    Data: LPVOID;         // Pointer to the reply data
    Options: ip_option_information; // Reply options
  end;
  {$EXTERNALSYM ICMP_ECHO_REPLY}
  PICMP_ECHO_REPLY = ^ICMP_ECHO_REPLY;
  {$EXTERNALSYM PICMP_ECHO_REPLY}
  TIcmpEchoReply = ICMP_ECHO_REPLY;
  PIcmpEchoReply = PICMP_ECHO_REPLY;

  ARP_SEND_REPLY = record
    DestAddress: IPAddr;
    SrcAddress: IPAddr;
  end;
  {$EXTERNALSYM ARP_SEND_REPLY}
  PARP_SEND_REPLY = ^ARP_SEND_REPLY;
  {$EXTERNALSYM PARP_SEND_REPLY}
  TArpSendReply = ARP_SEND_REPLY;
  PArpSendReply = PARP_SEND_REPLY;

  TCP_RESERVE_PORT_RANGE = record
    UpperRange: USHORT;
    LowerRange: USHORT;
  end;
  {$EXTERNALSYM TCP_RESERVE_PORT_RANGE}
  PTCP_RESERVE_PORT_RANGE = ^TCP_RESERVE_PORT_RANGE;
  {$EXTERNALSYM PTCP_RESERVE_PORT_RANGE}
  TTcpReservePortRange = TCP_RESERVE_PORT_RANGE;
  PTcpReservePortRange = PTCP_RESERVE_PORT_RANGE;
  
const
  MAX_ADAPTER_NAME = 128;
  {$EXTERNALSYM MAX_ADAPTER_NAME}

type
  PIP_ADAPTER_INDEX_MAP = ^IP_ADAPTER_INDEX_MAP;
  {$EXTERNALSYM PIP_ADAPTER_INDEX_MAP}
  _IP_ADAPTER_INDEX_MAP = record
    Index: ULONG;
    Name: array [0..MAX_ADAPTER_NAME - 1] of WCHAR;
  end;
  {$EXTERNALSYM _IP_ADAPTER_INDEX_MAP}
  IP_ADAPTER_INDEX_MAP = _IP_ADAPTER_INDEX_MAP;
  {$EXTERNALSYM IP_ADAPTER_INDEX_MAP}
  TIpAdapterIndexMap = IP_ADAPTER_INDEX_MAP;
  PIpAdapterIndexMap = PIP_ADAPTER_INDEX_MAP;

  PIP_INTERFACE_INFO = ^IP_INTERFACE_INFO;
  {$EXTERNALSYM PIP_INTERFACE_INFO}
  _IP_INTERFACE_INFO = record
    NumAdapters: Longint;
    Adapter: array [0..0] of IP_ADAPTER_INDEX_MAP;
  end;
  {$EXTERNALSYM _IP_INTERFACE_INFO}
  IP_INTERFACE_INFO = _IP_INTERFACE_INFO;
  {$EXTERNALSYM IP_INTERFACE_INFO}
  TIpInterfaceInfo = IP_INTERFACE_INFO;
  PIpInterfaceInfo = PIP_INTERFACE_INFO;

  PIP_UNIDIRECTIONAL_ADAPTER_ADDRESS = ^IP_UNIDIRECTIONAL_ADAPTER_ADDRESS;
  {$EXTERNALSYM PIP_UNIDIRECTIONAL_ADAPTER_ADDRESS}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -