Changes

Jump to navigation Jump to search
390 bytes added ,  22:15, 28 January 2018
no edit summary
Line 60: Line 60:  
| 26 || Close
 
| 26 || Close
 
|-
 
|-
| 27 || DuplicateSocket
+
| 27 || [[#DuplicateSocket]]
 
|-
 
|-
 
| 28 || GetResourceStatistics
 
| 28 || GetResourceStatistics
Line 124: Line 124:  
  struct bpf_program {
 
  struct bpf_program {
 
  u_int bf_len;
 
  u_int bf_len;
  struct bpf_insn bf_insns[BPF_MAXINSNS]; // [512]. This is normally a pointer
+
  struct bpf_insn bf_insns[BPF_MAXINSNS]; // [512]. This is a pointer in the official structure
 
  };
 
  };
   Line 162: Line 162:  
| 10 || ?
 
| 10 || ?
 
|-
 
|-
| 11 || ?
+
| 11 || [[#ClearDnsIpServerAddressArray]] (made-up name)
 
|}
 
|}
   −
=== GetAddrInfo ===
+
== GetAddrInfo ==
    
Takes three type 5 buffers (host, port, and hints), and a type 6 buffer (the output addrinfos). Also takes a u8 (padded to 4 bytes so the next raw parameter can align), a u32, and a u64. The u8 is a boolean for whether to enable "nsd resolve" (1) or not (0). Not sure what the u32 is. It seems to either come from a parameter to <tt>GetAddrInfo</tt> or be zero. The u64 is most likely a placeholder for the server to copy the PID into and should be zero. Both hints and the output buffer contain serialized addrinfo chains. The hints buffer is sized 0x400 bytes long by default, and the output buffer 0x1000 bytes.
 
Takes three type 5 buffers (host, port, and hints), and a type 6 buffer (the output addrinfos). Also takes a u8 (padded to 4 bytes so the next raw parameter can align), a u32, and a u64. The u8 is a boolean for whether to enable "nsd resolve" (1) or not (0). Not sure what the u32 is. It seems to either come from a parameter to <tt>GetAddrInfo</tt> or be zero. The u64 is most likely a placeholder for the server to copy the PID into and should be zero. Both hints and the output buffer contain serialized addrinfo chains. The hints buffer is sized 0x400 bytes long by default, and the output buffer 0x1000 bytes.
Line 206: Line 206:     
The list should be terminated with a sentinel four-byte zero value.
 
The list should be terminated with a sentinel four-byte zero value.
 +
 +
== ClearDnsIpServerAddressArray ==
 +
This function clears <code>nn::socket::resolver::g_DnsIpServerAddressArray</code>, setting its length to 0 as well. The array initially contains IPs filled by <code>bsdconfig</code>, a privileged service handling DHCP and such.
 +
 +
Takes no arguments, doesn't return anything, never fails.
    
= nsd:u / nsd:a =
 
= nsd:u / nsd:a =
88

edits

Navigation menu