亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? iphelper.~pas

?? 統計網絡流量的DELPHI原程序代碼,for xp/2000/2003
?? ~PAS
?? 第 1 頁 / 共 3 頁
字號:
unit IPHelper;



//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *//
//                      Delphi IPHelper functions                            //
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *//
//     PLEASE NOTE:   REQUIRES  NT4/SP4 or higher, WIN98 or higher           //
//     Tested on   :  Delphi 4.03, Delphi 6.0 Enterprise,                    //
//               WIN2K, WIN-NT4/SP6, WIN98se                                 //
//                                                                           //
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *//
//                    This software is FREEWARE                              //
//                    -------------------------                              //
//  If this software works, it was surely written by Dirk Claessens          //
//                   <dirkCL@pandora.be>                                       //
//  (If it doesn't, I don't know anything about it.)                         //
//  Version: 1.5 2001-12-29                                                  //
//                                                                           //
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *//


interface

uses
  Windows, Messages, SysUtils, Classes, Dialogs, IpHlpApi;

const
  NULL_IP       = '  0.  0.  0.  0';

//------conversion of well-known port numbers to service names----------------

type
  TWellKnownPort = record
    Prt: DWORD;
    Srv: string[20];
  end;

  PTTcpConnStatus = ^TTcpConnStatus;
  TTcpConnStatus = record
    LocalIP      : string;
    LocalPort    : string;
    RemoteIP     : string;
    RemotePort   : string;
    Status       : string;
  end;


const
    // only most "popular" services...
  WellKnownPorts: array[1..29] of TWellKnownPort
  = (
    ( Prt: 0; Srv: 'LOOPBACK'),
    ( Prt: 7; Srv: 'ECHO' ),      {Ping    }
    ( Prt: 9; Srv: 'DISCRD' ),    { Discard}
    ( Prt: 13; Srv: 'DAYTIM' ),   {DayTime}
    ( Prt: 17; Srv: 'QOTD' ),     {Quote Of The Day}
    ( Prt: 19; Srv: 'CHARGEN' ),  {CharGen}
    ( Prt: 20; Srv: 'FTP ' ),     { File Transfer Protocol}
    ( Prt: 21; Srv: 'FTPC' ),     { File Transfer Control Protocol}
    ( Prt: 23; Srv: 'TELNET' ),   {TelNet}
    ( Prt: 25; Srv: 'SMTP' ),     { Simple Mail Transfer Protocol}
    ( Prt: 37; Srv: 'TIME' ),     { Time Protocol }
    ( Prt: 43; Srv: 'WHOIS'),     { WHO IS service  }
    ( Prt: 53; Srv: 'DNS ' ),     { Domain Name Service }
    ( Prt: 67; Srv: 'BOOTPS' ),   { BOOTP Server }
    ( Prt: 68; Srv: 'BOOTPC' ),   { BOOTP Client }
    ( Prt: 69; Srv: 'TFTP' ),     { Trivial FTP  }
    ( Prt: 70; Srv: 'GOPHER' ),   { Gopher       }
    ( Prt: 79; Srv: 'FING' ),     { Finger       }
    ( Prt: 80; Srv: 'HTTP' ),     { HTTP         }
    ( Prt: 88; Srv: 'KERB' ),     { Kerberos     }
    ( Prt: 109; Srv: 'POP2' ),    { Post Office Protocol Version 2 }
    ( Prt: 110; Srv: 'POP3' ),    { Post Office Protocol Version 3 }
    ( Prt: 119; Srv: 'NNTP' ),    { Network News Transfer Protocol }
    ( Prt: 123; Srv: 'NTP ' ),    { Network Time protocol          }
    ( Prt: 135; Srv: 'LOCSVC'),   { Location Service              }
    ( Prt: 137; Srv: 'NBNAME' ),  { NETBIOS Name service          }
    ( Prt: 138; Srv: 'NBDGRAM' ), { NETBIOS Datagram Service     }
    ( Prt: 139; Srv: 'NBSESS' ),  { NETBIOS Session Service        }
    ( Prt: 161; Srv: 'SNMP' )     { Simple Netw. Management Protocol }
    );


//-----------conversion of ICMP error codes to strings--------------------------
             {taken from www.sockets.com/ms_icmp.c }

const
  ICMP_ERROR_BASE = 11000;
  IcmpErr : array[1..22] of string =
  (
   'IP_BUFFER_TOO_SMALL','IP_DEST_NET_UNREACHABLE', 'IP_DEST_HOST_UNREACHABLE',
   'IP_PROTOCOL_UNREACHABLE', 'IP_DEST_PORT_UNREACHABLE', 'IP_NO_RESOURCES',
   'IP_BAD_OPTION','IP_HARDWARE_ERROR', 'IP_PACKET_TOO_BIG', 'IP_REQUEST_TIMED_OUT',
   'IP_BAD_REQUEST','IP_BAD_ROUTE', 'IP_TTL_EXPIRED_TRANSIT',
   'IP_TTL_EXPIRED_REASSEM','IP_PARAMETER_PROBLEM', 'IP_SOURCE_QUENCH',
   'IP_OPTION_TOO_BIG', 'IP_BAD_DESTINATION','IP_ADDRESS_DELETED',
   'IP_SPEC_MTU_CHANGE', 'IP_MTU_CHANGE', 'IP_UNLOAD'
  );


//----------conversion of various enumerated values to strings----------------//

  ARPEntryType  : array[1..4] of string = ( 'Other', 'Invalid',
    'Dynamic', 'Static'
    );

  TCPConnState  :      // TCP connection states
    array[1..12] of string =
    ( 'closed', 'listening', 'syn_sent',
    'syn_rcvd', 'established', 'fin_wait1',
    'fin_wait2', 'close_wait', 'closing',
    'last_ack', 'time_wait', 'delete_tcb'
    );

  TCPToAlgo     : array[1..4] of string =  // TCP time out algorithms
    ( 'Const.Timeout', 'MIL-STD-1778',
    'Van Jacobson', 'Other' );

  IPForwTypes   : array[1..4] of string =   // IP forwarding methods
    ( 'other', 'invalid', 'local', 'remote' );

  IPForwProtos  : array[1..18] of string =  // IP forwarding protocols
    ( 'OTHER', 'LOCAL', 'NETMGMT', 'ICMP', 'EGP',
    'GGP', 'HELO', 'RIP', 'IS_IS', 'ES_IS',
    'CISCO', 'BBN', 'OSPF', 'BGP', 'BOOTP',
    'AUTO_STAT', 'STATIC', 'NOT_DOD' );


//---------------exported stuff-----------------------------------------------

// data output to Tstrings for display purposes
procedure Get_AdaptersInfo( List: TStrings );
procedure Get_NetworkParams( List: TStrings );
procedure Get_ARPTable( List: TStrings );
procedure Get_TCPTable( List: TStrings );
procedure Get_TCPStatistics( List: TStrings );
procedure Get_UDPTable( List: TStrings );
procedure Get_UDPStatistics( List: TStrings );
procedure Get_IPAddrTable( List: TStrings );
procedure Get_IPForwardTable( List: TStrings );
procedure Get_IPStatistics( List: TStrings );
function Get_RTTAndHopCount( IPAddr: DWORD; MaxHops: Longint;
  var RTT: longint; var HopCount: longint ): integer;
procedure Get_ICMPStats( ICMPIn, ICMPOut: TStrings );
procedure Get_IfTable( NameList, ItemList: TStrings );

// output as structured array
procedure Get_IfTableMIB( var MIBIfArray: TMIBIfArray );
procedure Get_IPAddrTableMIB( var IPAddrTable:TMibIPAddrArray  );


procedure Get_RecentDestIPs( List: TStrings );

// added functions
procedure Get_OpenConnections( List: TList );



// conversion utils
function MacAddr2Str( MacAddr: TMacAddress; size: integer ): string;
function IpAddr2Str( IPAddr: DWORD ): string;
function Str2IpAddr( IPStr: string ): DWORD;
function Port2Str( nwoPort: DWORD ): string;
function Port2Wrd( nwoPort: DWORD ): DWORD;
function Port2Svc( Port: DWORD ): string;
function ICMPErr2Str( ICMPErrCode: DWORD) : string;

implementation

var
  RecentIPs     : TStringList;

//--------------General utilities-----------------------------------------------

{ extracts next "token" from string, then eats string }
function NextToken( var s: string; Separator: char ): string;
var
  Sep_Pos       : byte;
begin
  Result := '';
  if length( s ) > 0 then begin
    Sep_Pos := pos( Separator, s );
    if Sep_Pos > 0 then begin
      Result := copy( s, 1, Pred( Sep_Pos ) );
      Delete( s, 1, Sep_Pos );
    end
    else begin
      Result := s;
      s := '';
    end;
  end;
end;

//------------------------------------------------------------------------------
{ converts numerical MAC-address to ww-xx-yy-zz string }
function MacAddr2Str( MacAddr: TMacAddress; size: integer ): string;
var
    i   : integer;
begin
    if Size = 0 then
    begin
        Result := '00-00-00-00-00-00';
        EXIT;
    end
    else Result := '';
    for i := 1 to Size do
    Result := Result + IntToHex( MacAddr[i], 2 ) + '-';
    Delete( Result, Length( Result ), 1 );
end;

//------------------------------------------------------------------------------
{ converts IP-address in network byte order DWORD to dotted decimal string}
function IpAddr2Str( IPAddr: DWORD ): string;
var
    i: integer;
begin
    Result := '';
    for i := 1 to 4 do
    begin
        Result := Result + Format( '%3d.', [IPAddr and $FF] );
        IPAddr := IPAddr shr 8;
    end;
    Delete( Result, Length( Result ), 1 );
end;

//------------------------------------------------------------------------------
{ converts dotted decimal IP-address to network byte order DWORD}
function Str2IpAddr( IPStr: string ): DWORD;
var
  i             : integer;
  Num           : DWORD;
begin
  Result := 0;
  for i := 1 to 4 do
  try
    Num := ( StrToInt( NextToken( IPStr, '.' ) ) ) shl 24;
    Result := ( Result shr 8 ) or Num;
  except
    Result := 0;
  end;

end;

//------------------------------------------------------------------------------
{ converts port number in network byte order to DWORD }
function Port2Wrd( nwoPort: DWORD ): DWORD;
begin
  Result := Swap( WORD( nwoPort ) );
end;

//------------------------------------------------------------------------------
{ converts port number in network byte order to string }
function Port2Str( nwoPort: DWORD ): string;
begin
  Result := IntToStr( Port2Wrd( nwoPort ) );
end;

//------------------------------------------------------------------------------
{ converts well-known port numbers to service ID }
function Port2Svc( Port: DWORD ): string;
var
  i             : integer;
begin
  Result := Format( '%4d', [Port] ); // in case port not found
  for i := Low( WellKnownPorts ) to High( WellKnownPorts ) do
    if Port = WellKnownPorts[i].Prt then
    begin
      Result := WellKnownPorts[i].Srv;
      BREAK;
    end;
end;

//-----------------------------------------------------------------------------
{ general,  fixed network parameters }
procedure Get_NetworkParams( List: TStrings );
var
  InfoSize      : Longint;
  ErrorCode     : DWORD;
  pBuf          : PChar;
begin
  if not Assigned( List ) then EXIT;
  List.Clear;
  InfoSize := 0;
  ErrorCode := GetNetworkParams( PTFixedInfo(pBuf), @InfoSize );
  GetMem( pBuf, InfoSize );
  ErrorCode := GetNetworkParams( PTFixedInfo(pBuf), @InfoSize );
  if ErrorCode = ERROR_SUCCESS then
    with PTFixedinfo(pBuf)^ do
    begin
      List.Add( 'HOSTNAME          : ' + string( HostName ) );
      List.Add( 'DOMAIN            : ' + string( DomainName ) );
      List.Add( 'SCOPE             : ' + string( ScopeID ) );
      List.Add( 'NETBIOS NODE TYPE : ' + NETBIOSTypes[NodeType] );
      List.Add( 'ROUTING ENABLED   :' + IntToStr( EnableRouting ) );
      List.Add( 'PROXY   ENABLED   :' + IntToStr( EnableProxy ) );
      List.Add( 'DNS     ENABLED   :' + IntToHex( EnableDNS,8 ) );
    end
  else
    List.Add( SysErrorMessage( ErrorCode ) );
  FreeMem(pBuf);
end;

//------------------------------------------------------------------------------
function ICMPErr2Str( ICMPErrCode: DWORD) : string;
var
 i : integer;
begin
   Result := 'UnknownError : ' + IntToStr( ICMPErrCode );
   dec( ICMPErrCode, ICMP_ERROR_BASE );
   if ICMPErrCode in [Low(ICMpErr)..High(ICMPErr)] then
     Result := ICMPErr[ ICMPErrCode];
end;




//------------------------------------------------------------------------------
procedure Get_IfTable( NameList, ItemList: TStrings );
var
  IfRow         : TMibIfRow;
  i,
    Error,
    TableSize   : integer;
  pBuf          : PChar;
  NumEntries    : DWORD;
  sDescr,
    Temp        : string;
begin
  if (not Assigned( NameList ))
  or (not Assigned( ItemList ))  then EXIT;
  NameList.Clear;
  ItemList.Clear;
  TableSize := 0;
   // first call: get memsize needed
  Error := GetIfTable( PTMibIfTable( pBuf ), @TableSize, false );
  if Error <> ERROR_INSUFFICIENT_BUFFER then
    EXIT;
  GetMem( pBuf, TableSize );

   // get table pointer
  Error := GetIfTable( PTMibIfTable( pBuf ), @TableSize, false );
  if Error = NO_ERROR then
  begin
    NumEntries := PTMibIfTable( pBuf )^.dwNumEntries;
    if NumEntries > 0 then
    begin
      inc( pBuf, SizeOf( NumEntries ) );
      for i := 1 to NumEntries do
      begin
        IfRow := PTMibIfRow( pBuf )^;
        with IfRow do
        begin
          SetLength( sDescr, dwDescrLen );
          move( bDescr, sDescr[1], Length( sDescr ) );

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美在线高清视频| 国产一区高清在线| 777午夜精品免费视频| 亚洲一级二级三级在线免费观看| 91福利在线观看| 亚洲成人午夜电影| 精品国产凹凸成av人网站| 精品综合久久久久久8888| 国产女人18水真多18精品一级做| 成人高清伦理免费影院在线观看| 亚洲人成网站精品片在线观看| 92国产精品观看| 日韩高清不卡一区二区三区| 精品久久久影院| 99国产精品视频免费观看| 午夜精品久久一牛影视| 精品欧美一区二区在线观看| 成人av免费在线观看| 亚洲成人中文在线| 国产日产欧产精品推荐色| 精品国产1区二区| 99热在这里有精品免费| 日本在线不卡视频一二三区| 国产欧美日韩另类一区| 91久久精品午夜一区二区| 青青草国产精品97视觉盛宴| 中文子幕无线码一区tr| 欧美三电影在线| 东方欧美亚洲色图在线| 香蕉乱码成人久久天堂爱免费| 国产日产欧美一区二区三区| 欧美色视频在线观看| 成人一级片在线观看| 奇米影视一区二区三区| 亚洲免费高清视频在线| 久久亚洲捆绑美女| 欧美精品v日韩精品v韩国精品v| 国产成人午夜99999| 性欧美疯狂xxxxbbbb| 国产精品第一页第二页第三页 | 激情综合色综合久久综合| 国产精品久久久久久户外露出| 91精品国产麻豆| 色综合色狠狠综合色| 国产伦精品一区二区三区免费| 亚洲成人午夜电影| 亚洲欧美一区二区三区极速播放| 久久综合av免费| 欧美日韩国产一二三| 一道本成人在线| 99国产精品国产精品毛片| 看电视剧不卡顿的网站| 亚洲另类在线一区| 国产精品激情偷乱一区二区∴| 日韩欧美资源站| 欧美唯美清纯偷拍| 色综合中文综合网| 777午夜精品免费视频| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | www.欧美.com| 成人中文字幕在线| 国产在线看一区| 麻豆国产欧美日韩综合精品二区| 亚洲国产精品麻豆| 亚洲自拍都市欧美小说| 依依成人综合视频| 亚洲欧美日韩中文字幕一区二区三区 | 久久免费看少妇高潮| 日韩精品一区二区三区中文不卡 | 五月婷婷综合激情| 亚洲一区二区精品久久av| 亚洲精品国产成人久久av盗摄| 国产精品美女久久久久aⅴ| 久久久777精品电影网影网| 久久久久国产精品麻豆ai换脸 | 亚洲欧美激情一区二区| 国产精品久久午夜| 国产精品电影一区二区| 亚洲另类在线制服丝袜| 亚洲午夜免费福利视频| 亚洲国产成人av| 日韩电影在线看| 日本女优在线视频一区二区| 蜜臀av一级做a爰片久久| 无吗不卡中文字幕| 人人精品人人爱| 国产自产视频一区二区三区| 国产精品996| 99久久精品国产一区| 在线观看欧美日本| 欧美精品色一区二区三区| 91麻豆精品国产91| 欧美大片一区二区三区| 精品电影一区二区三区| 国产精品另类一区| 亚洲综合视频在线观看| 日产国产高清一区二区三区| 久久精品99国产精品| 成人免费视频视频| 色婷婷久久久综合中文字幕| 欧美挠脚心视频网站| 欧美一个色资源| 日本一二三四高清不卡| 亚洲综合男人的天堂| 免播放器亚洲一区| 99re热视频这里只精品| 欧美一区二区三区在线观看视频| 久久网站最新地址| 亚洲精品国产一区二区三区四区在线| 日本欧美肥老太交大片| 国产91高潮流白浆在线麻豆 | 日韩国产欧美在线视频| 国产成人免费在线视频| 欧美无砖砖区免费| 久久免费视频一区| 午夜av区久久| 成人黄色大片在线观看| 91精品国产综合久久精品麻豆| 欧美激情在线一区二区| 视频一区中文字幕国产| 成人性视频网站| 欧美色图天堂网| 国产欧美精品国产国产专区| 亚洲午夜在线视频| 成人免费视频网站在线观看| 欧美一级高清片在线观看| 亚洲人妖av一区二区| 国产在线精品一区二区不卡了| 91免费国产在线观看| 久久免费美女视频| 免费成人av在线播放| 在线观看日产精品| 中文字幕一区二区三区不卡在线| 日韩一区精品字幕| 日本二三区不卡| 国产精品丝袜在线| 韩国午夜理伦三级不卡影院| 欧美日韩精品是欧美日韩精品| 国产精品久久久久三级| 国产乱一区二区| 精品国产成人在线影院| 免费在线看一区| 欧美午夜一区二区三区免费大片| 国产精品国产自产拍高清av王其| 国产揄拍国内精品对白| 欧美一级片在线看| 视频一区在线视频| 欧美中文字幕一区| 一区二区三区四区中文字幕| 国产成人免费在线| 国产日韩欧美电影| 韩国成人精品a∨在线观看| 欧美一区2区视频在线观看| 亚洲一二三四久久| 91麻豆免费看| 亚洲欧美日韩国产一区二区三区 | 久久国产精品一区二区| 欧美高清视频在线高清观看mv色露露十八| 国产精品久久午夜夜伦鲁鲁| 国产91色综合久久免费分享| 国产日韩欧美综合在线| 国产电影一区在线| 国产女同互慰高潮91漫画| 国产精品资源在线观看| 国产拍欧美日韩视频二区| 国产成人综合自拍| 国产欧美精品一区二区色综合 | 成人开心网精品视频| 中文字幕av一区二区三区免费看| 国产精品 欧美精品| 国产精品午夜免费| 91麻豆精品秘密| 亚洲一区二区三区四区的| 精品视频一区二区三区免费| 首页国产丝袜综合| 日韩视频在线永久播放| 国产在线精品一区二区| 国产精品卡一卡二| 色久综合一二码| 日本女优在线视频一区二区| 日韩欧美国产小视频| 国产综合久久久久影院| 国产精品久久毛片av大全日韩| av成人免费在线| 亚洲国产日韩a在线播放性色| 欧美视频精品在线观看| 日本视频一区二区三区| 国产午夜亚洲精品理论片色戒| 成人久久久精品乱码一区二区三区| 亚洲欧美偷拍卡通变态| 欧美久久婷婷综合色| 国模娜娜一区二区三区| 亚洲欧洲精品一区二区精品久久久| 在线观看亚洲专区| 久久成人免费网站| 中文字幕亚洲欧美在线不卡| 色女孩综合影院| 极品美女销魂一区二区三区免费| 国产日韩精品视频一区| 欧美手机在线视频|