Author Topic: addrinfo structure  (Read 305 times)

six_L

  • Member
  • **
  • Posts: 144
addrinfo structure
« on: August 23, 2018, 05:31:07 PM »
is it right for this translated?
Code: [Select]
typedef struct addrinfo {
  int             ai_flags;
  int             ai_family;
  int             ai_socktype;
  int             ai_protocol;
  size_t          ai_addrlen;
  char            *ai_canonname;
  struct sockaddr  *ai_addr;
  struct addrinfo  *ai_next;
} ADDRINFOA, *PADDRINFOA;
Quote
ADDRINFO struct
   ai_flags   dd   ?
   ai_family   dd   ?
   ai_socktype   dd   ?
   ai_protocol   dd   ?
   ai_addrlen   dq   ?
   ai_canonname   dq   ?
   ai_addr      sockaddr_in <?> ;or sockaddr_in6
   ai_next      dq   ?
ADDRINFO ENDS
typedef struct sockaddr_in6 {
  ADDRESS_FAMILY sin6_family;
  USHORT         sin6_port;
  ULONG          sin6_flowinfo;
  IN6_ADDR       sin6_addr;
  union {
    ULONG    sin6_scope_id;
    SCOPE_ID sin6_scope_struct;
  };
} SOCKADDR_IN6_LH, *PSOCKADDR_IN6_LH, *LPSOCKADDR_IN6_LH;
« Last Edit: August 23, 2018, 08:48:16 PM by six_L »

AW

  • Member
  • *****
  • Posts: 1561
  • Let's Make ASM Great Again!
Re: addrinfo structure
« Reply #1 on: August 24, 2018, 12:12:55 AM »
Probably this:
SOCKADDR_IN6 STRUCT
 sin6_family   WORD ?
 sin6_port    WORD ?
 sin6_flowinfo   DWORD ?
 sin6_addr    BYTE 16 DUP (?)
 sin6_scope_id   DWORD ?
SOCKADDR_IN6 ENDS

jj2007

  • Member
  • *****
  • Posts: 8822
  • Assembler is fun ;-)
    • MasmBasic
Re: addrinfo structure
« Reply #2 on: August 24, 2018, 12:19:16 AM »

six_L

  • Member
  • **
  • Posts: 144
Re: addrinfo structure
« Reply #3 on: August 24, 2018, 02:10:01 AM »
HI,AW and jj2007
thanks you.
The right addrinfo structure is following:
Code: [Select]
ADDRINFO struct
ai_flags DWORD ?
ai_family DWORD ?
ai_socktype DWORD ?
ai_protocol DWORD ?
ai_addrlen QWORD ?
ai_canonname LPVOID ?
ai_addr LPVOID ?
ai_next LPVOID ?
ADDRINFO ENDS
tested by me,The MASM Forum ipaddr=111.118.160.178, www.facebook.com = 67.228.235.91
@jj2007  :t
i'v forgotten the old thread which you called attention to.
thank you very much.
« Last Edit: August 24, 2018, 05:50:23 PM by six_L »