Home |
Function xn_ipcp_want_compress Function xn_ipcp_want_dns_address |
Function xn_ipcp_want_dns_addressSets DNS addresses to negotiate for IPCP. int xn_ipcp_want_dns_address(int iface_no, int host, const BYTE * dns1_addr, const BYTE * dns2_addr, int negotiable); Parametersiface_noInterface number returned by xn_attach. hostSet negotiation flag for local or remote host (LOCAL_HOST or REMOTE_HOST). dns1_addrDNS primary address in network byte order to negotiate. Can be an IP address or ip_nulladdr if requesting address from remote host. dns2_addrDNS secondary address in network byte order to negotiate. Can be an IP address, ip_nulladdr if requesting address from remote host or NULL if you donÂt want to start negotiating secondary DNS address. negotiableSet to TRUE if the address is negotiable, i.e. if will accept what remote host says the address is; set to FALSE if the address is not negotiable, i.e. the remote host must accept this address. return valueReturns 0 if successful, otherwise SOCKET_ERROR. If an error occurred, call xn_getlasterror and xn_geterror_string to return the error value. Section Error Codes further describes each error. Possible values for this function are:
This function establishes that the IPCP DNS address option should be requested and the DNS addresses to request. In order to request local DNS addresses, call this routine with host set to LOCAL_HOST. The option will be dropped if the remote host rejects the IPCP address requested. If negotiable is set, an address suggested by the remote host in a NAK message will be used. If negotiable is set to FALSE, a NAK message with a different DNS address will be rejected. In order to request an alternative address for the remote host or to suggest an address if the remote host does not request the option, call this routine with host set to REMOTE_HOST. If negotiable is set to TRUE, the address sent in a REQUEST will be used (if it is not 0). If negotiable is set to FALSE, a NAK message will be sent if the address in the message does not match the address specified by calling xn_ipcp_want_dns_address. In either case, the address specified by xn_ipcp_want_dns_address will be sent in a NAK message if a REQUEST is received with a 0 address. Care should be taken to ensure this address is acceptable to the remote host if negotiation parameter is FALSE, otherwise, negotiation will never converge. The default is to not request the IPCP option. In order to request an address from the remote host, set the address to all zeros. If this routine is not called, the DNS addresses specified in xn_set_server_list will be sent to the other side if a message is received requesting these addresses, i.e. if a null address is received. Function xn_ipcp_want_compress
|