Home |
Function xn_ipcp_want_address Function xn_ipcp_want_compress Function xn_ipcp_want_dns_address |
Function xn_ipcp_want_addressSets IP address for IPCP to negotiate. int xn_ipcp_want_address(int iface_no, int host, BYTE * ip_address, int negotiable); Parametersiface_noInterface number returned by xn_attach. hostSet negotiation flag for local or remote host (LOCAL_HOST or REMOTE_HOST). ip_addressIP address to negotiate. negotiableSpecifies whether IP address value is negotiable. 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 IP address option should be requested and establishes which IP address to request. Call this routine with host set to LOCAL_HOST to request a local IP address. 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 IP address will be rejected. Call this routine with host set to REMOTE_HOST to request an alternative address for the remote host, supply the remote host with an IP address if requested, or to suggest an address if the remote host does not request the option. Call this routine with host set to REMOTE_HOST to suggest an address if the remote host does not request the option. 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_address. In either case, the address specified by xn_ipcp_want_address will be sent in a NAK message if a REQUEST is received with a 0 address. If xn_ipcp_set_option is called to turn off negotiation, care should be taken to ensure that this address is acceptable to the remote host, otherwise negotiation might never converge. The default is to not request the IPCP option. Call this function with parameter ip_address set to the NULL address (i.e. all zeros) to request an address from the remote host. If this routine is not called, the local IP addresses specified in xn_set_ip and the remote IP addresses specified in xn_attach will be sent to the other side if a message is received requesting these addresses, i.e. if a null address (i.e. all zeros) is received. Call xn_interface_info after calling xn_lcp_open to extract the IP addresses negotiated. Function xn_ipcp_want_compress
|