<commit_before>! Copyright (C) 2010 <NAME>.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors alien alien.c-types alien.data alien.syntax
classes.struct combinators combinators.smart destructors
io.encodings.string io.encodings.utf8 io.sockets.private kernel
libc make sequences windows.errors windows.kernel32
windows.types windows.winsock ;
IN: windows.iphlpapi

LIBRARY: iphlpapi

<<
CONSTANT: DEFAULT_MINIMUM_ENTITIES 32
CONSTANT: MAX_ADAPTER_ADDRESS_LENGTH 8
CONSTANT: MAX_ADAPTER_DESCRIPTION_LENGTH 128
CONSTANT: MAX_ADAPTER_NAME_LENGTH 256
CONSTANT: MAX_DOMAIN_NAME_LEN 128
CONSTANT: MAX_HOSTNAME_LEN 128
CONSTANT: MAX_SCOPE_ID_LEN 256
CONSTANT: BROADCAST_NODETYPE 1
CONSTANT: PEER_TO_PEER_NODETYPE 2
CONSTANT: MIXED_NODETYPE 4
CONSTANT: HYBRID_NODETYPE 8
CONSTANT: IF_OTHER_ADAPTERTYPE 0
CONSTANT: IF_ETHERNET_ADAPTERTYPE 1
CONSTANT: IF_TOKEN_RING_ADAPTERTYPE 2
CONSTANT: IF_FDDI_ADAPTERTYPE 3
CONSTANT: IF_PPP_ADAPTERTYPE 4
CONSTANT: IF_LOOPBACK_ADAPTERTYPE 5
>>

CONSTANT: MAX_DOMAIN_NAME_LEN+4 132
CONSTANT: MAX_HOSTNAME_LEN+4 132
CONSTANT: MAX_SCOPE_ID_LEN+4 260
CONSTANT: MAX_ADAPTER_NAME_LENGTH+4 264
CONSTANT: MAX_ADAPTER_DESCRIPTION_LENGTH+4 136
CONSTANT: ERROR_BUFFER_OVERFLOW 111
CONSTANT: MIB_IF_TYPE_ETHERNET 6
CONSTANT: MIB_IF_TYPE_TOKENRING 9
CONSTANT: MIB_IF_TYPE_FDDI 15
CONSTANT: MIB_IF_TYPE_PPP 23
CONSTANT: MIB_IF_TYPE_LOOPBACK 24
CONSTANT: MIB_IF_TYPE_SLIP 28
CONSTANT: MAX_DNS_SUFFIX_STRING_LENGTH 256 ! 246?
CONSTANT: MAX_DHCPV6_DUID_LENGTH 130
CONSTANT: MAX_ADAPTER_NAME 128

STRUCT: IP_ADDRESS_STRING
    { String char[16] } ;

TYPEDEF: IP_ADDRESS_STRING* PIP_ADDRESS_STRING
TYPEDEF: IP_ADDRESS_STRING IP_MASK_STRING
TYPEDEF: IP_MASK_STRING* PIP_MASK_STRING

STRUCT: IP_ADDR_STRING
    { Next IP_ADDR_STRING* }
    { IpAddress IP_ADDRESS_STRING }
    { IpMask IP_MASK_STRING }
    { Context DWORD } ;

TYPEDEF: IP_ADDR_STRING* PIP_ADDR_STRING

STRUCT: FIXED_INFO
    { HostName char[MAX_HOSTNAME_LEN+4] }
    { DomainName char[MAX_DOMAIN_NAME_LEN+4] }
    { CurrentDnsServer PIP_ADDR_STRING }
    { DnsServerList IP_ADDR_STRING }
    { NodeType UINT }
    { ScopeId char[MAX_SCOPE_ID_LEN+4] }
    { EnableRouting UINT }
    { EnableProxy UINT }
    { EnableDns UINT }
    { ExtraSpace char[4096] } ;

DEFER: IP_ADAPTER_INFO

TYPEDEF: ulong time_t<commit_msg>windows.iphlpapi: Fix load from struct changes<commit_after>! Copyright (C) 2010 <NAME>.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors alien alien.c-types alien.data alien.syntax
classes.struct combinators combinators.smart destructors
io.encodings.string io.encodings.utf8 io.sockets.private kernel
libc make sequences windows.errors windows.kernel32
windows.types windows.winsock ;
IN: windows.iphlpapi

LIBRARY: iphlpapi

<<
CONSTANT: DEFAULT_MINIMUM_ENTITIES 32
CONSTANT: MAX_ADAPTER_ADDRESS_LENGTH 8
CONSTANT: MAX_ADAPTER_DESCRIPTION_LENGTH 128
CONSTANT: MAX_ADAPTER_NAME_LENGTH 256
CONSTANT: MAX_DOMAIN_NAME_LEN 128
CONSTANT: MAX_HOSTNAME_LEN 128
CONSTANT: MAX_SCOPE_ID_LEN 256
CONSTANT: BROADCAST_NODETYPE 1
CONSTANT: PEER_TO_PEER_NODETYPE 2
CONSTANT: MIXED_NODETYPE 4
CONSTANT: HYBRID_NODETYPE 8
CONSTANT: IF_OTHER_ADAPTERTYPE 0
CONSTANT: IF_ETHERNET_ADAPTERTYPE 1
CONSTANT: IF_TOKEN_RING_ADAPTERTYPE 2
CONSTANT: IF_FDDI_ADAPTERTYPE 3
CONSTANT: IF_PPP_ADAPTERTYPE 4
CONSTANT: IF_LOOPBACK_ADAPTERTYPE 5
>>

CONSTANT: MAX_DOMAIN_NAME_LEN+4 132
CONSTANT: MAX_HOSTNAME_LEN+4 132
CONSTANT: MAX_SCOPE_ID_LEN+4 260
CONSTANT: MAX_ADAPTER_NAME_LENGTH+4 264
CONSTANT: MAX_ADAPTER_DESCRIPTION_LENGTH+4 136
CONSTANT: ERROR_BUFFER_OVERFLOW 111
CONSTANT: MIB_IF_TYPE_ETHERNET 6
CONSTANT: MIB_IF_TYPE_TOKENRING 9
CONSTANT: MIB_IF_TYPE_FDDI 15
CONSTANT: MIB_IF_TYPE_PPP 23
CONSTANT: MIB_IF_TYPE_LOOPBACK 24
CONSTANT: MIB_IF_TYPE_SLIP 28
CONSTANT: MAX_DNS_SUFFIX_STRING_LENGTH 256 ! 246?
CONSTANT: MAX_DHCPV6_DUID_LENGTH 130
CONSTANT: MAX_ADAPTER_NAME 128

<<
STRUCT: IP_ADDRESS_STRING
    { String char[16] } ;
>>

TYPEDEF: IP_ADDRESS_STRING* PIP_ADDRESS_STRING
TYPEDEF: IP_ADDRESS_STRING IP_MASK_STRING
TYPEDEF: IP_MASK_STRING* PIP_MASK_STRING

<<
STRUCT: IP_ADDR_STRING
    { Next IP_ADDR_STRING* }
    { IpAddress IP_ADDRESS_STRING }
    { IpMask IP_MASK_STRING }
    { Context DWORD } ;
>>
TYPEDEF: IP_ADDR_STRING* PIP_ADDR_STRING

STRUCT: FIXED_INFO
    { HostName char[MAX_HOSTNAME_LEN+4] }
    { DomainName char[MAX_DOMAIN_NAME_LEN+4] }
    { CurrentDnsServer PIP_ADDR_STRING }
    { DnsServerList IP_ADDR_STRING }
    { NodeType UINT }
    { ScopeId char[MAX_SCOPE_ID_LEN+4] }
    { EnableRouting UINT }
    { EnableProxy UINT }
    { EnableDns UINT }
    { ExtraSpace char[4096] } ;

DEFER: IP_ADAPTER_INFO

TYPEDEF: ulong time_t
{'fraction_non_alphanumeric': 0.062071917808219176, 'fraction_numerical': 0.038527397260273974, 'mean_word_length': 6.278816199376947, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1067132', 'n_tokens_mistral': 1919, 'n_tokens_neox': 1782, 'n_words': 374}