News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

addrinfo structure

Started by six_L, August 23, 2018, 05:31:07 PM

Previous topic - Next topic

six_L

is it right for this translated?
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;

QuoteADDRINFO 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;
Say you, Say me, Say the codes together for ever.

aw27

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


six_L

#3
HI,AW and jj2007
thanks you.
The right addrinfo structure is following:
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.
Say you, Say me, Say the codes together for ever.