Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Сети";
Текущий архив: 2004.04.11;
Скачать: [xml.tar.bz2];

Вниз

Как в сети по IP адресу узнать имя машины?   Найти похожие ветки 

 
moor38   (2004-03-12 18:23) [0]

Как в сети по IP адресу узнать имя машины?


 
moor38   (2004-03-12 18:23) [0]

Как в сети по IP адресу узнать имя машины?


 
ki11er   (2004-03-12 18:35) [1]

gethostbyaddr


 
ki11er   (2004-03-12 18:35) [1]

gethostbyaddr


 
moor38   (2004-03-12 18:39) [2]

нет не моей тачки, а удаленно другой находящейся в сети


 
moor38   (2004-03-12 18:39) [2]

нет не моей тачки, а удаленно другой находящейся в сети


 
ki11er   (2004-03-12 18:43) [3]

Ну так и дай на вход адрес той машины, для которой хочешь узнать


 
ki11er   (2004-03-12 18:43) [3]

Ну так и дай на вход адрес той машины, для которой хочешь узнать


 
moor38   (2004-03-12 18:46) [4]

не понял


 
moor38   (2004-03-12 18:46) [4]

не понял


 
ki11er   (2004-03-12 18:48) [5]

struct HOSTENT FAR * gethostbyaddr(
 const char FAR *addr,
 int len,
 int type
);

addr
[in] Pointer to an address in network byte order.
len
[in] Length of the address.
type
[in] Type of the address, such as the AF_INET address family type (defined as TCP, UDP, and other associated Internet protocols). Address family types and their corresponding values are defined in the Winsock2.h header file.


 
ki11er   (2004-03-12 18:48) [5]

struct HOSTENT FAR * gethostbyaddr(
 const char FAR *addr,
 int len,
 int type
);

addr
[in] Pointer to an address in network byte order.
len
[in] Length of the address.
type
[in] Type of the address, such as the AF_INET address family type (defined as TCP, UDP, and other associated Internet protocols). Address family types and their corresponding values are defined in the Winsock2.h header file.


 
moor38   (2004-03-12 19:47) [6]

что-то на эту структуру ма...ся delphi


 
moor38   (2004-03-12 19:47) [6]

что-то на эту структуру ма...ся delphi


 
Rouse_ ©   (2004-03-12 20:24) [7]

http://www.delphimaster.ru/cgi-bin/download.pl?look=1&id=1078646471&n=1


 
Rouse_ ©   (2004-03-12 20:24) [7]

http://www.delphimaster.ru/cgi-bin/download.pl?look=1&id=1078646471&n=1


 
Raptor   (2004-03-18 17:06) [8]

В приложении к Indy:

procedure TForm1.IdTCPServer1Connect(AThread: TIdPeerThread);
var IP         : string;
   SockAddrIn : TSockAddrIn;
   Size       : Integer;
   HostEnt    : PHostEnt;

begin
  IP:=AThread.Connection.Socket.Binding.PeerIP;

  Size:=SizeOf(SockAddrIn);
  getpeername(AThread.Connection.Socket.Binding.Handle, SockAddrIn, Size);
  HostEnt:=gethostbyaddr(@SockAddrIn.sin_addr.s_addr, 4, PF_INET);

  ListBox1.Items.Add(IP+" - "+HostEnt.h_name)
end;


 
Raptor   (2004-03-18 17:06) [8]

В приложении к Indy:

procedure TForm1.IdTCPServer1Connect(AThread: TIdPeerThread);
var IP         : string;
   SockAddrIn : TSockAddrIn;
   Size       : Integer;
   HostEnt    : PHostEnt;

begin
  IP:=AThread.Connection.Socket.Binding.PeerIP;

  Size:=SizeOf(SockAddrIn);
  getpeername(AThread.Connection.Socket.Binding.Handle, SockAddrIn, Size);
  HostEnt:=gethostbyaddr(@SockAddrIn.sin_addr.s_addr, 4, PF_INET);

  ListBox1.Items.Add(IP+" - "+HostEnt.h_name)
end;



Страницы: 1 вся ветка

Форум: "Сети";
Текущий архив: 2004.04.11;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.48 MB
Время: 0.034 c
1-1082210213
alsov1234
2004-04-17 17:56
2004.05.09
Медленный скролинг в гриде


1-1082898233
Nord
2004-04-25 17:03
2004.05.09
Поиск фалов по маскам


3-1081430589
Zn
2004-04-08 17:23
2004.05.09
Существует ли таблица с указанным именем в БД.


7-1079680526
Артур
2004-03-19 10:15
2004.05.09
Аутентификация в Windows.


14-1080850933
VMcL
2004-04-02 00:22
2004.05.09
Ваши оценки





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский