Home |
Function xn_add_host_table_entry Function xn_delete_host_table_entry Function xn_interface_open_config Function xn_interface_ethernet_statistics Function xn_interface_statistics Function xn_autologin Function xn_send_ethernet_frame Function cb_wr_screen_string_fnc Function cb_rs232_connection_lost_fnc |
Function xn_autologinxn_autologin calls xn_scriptlogin with a default script to log into a remote host over a modem. int xn_autologin(int iface_no, char * setupstr, char * phonenum, char * username, char * passwd, char * term_str); Parametersiface_noInterface number returned by xn_attach. setupstrThe modem initialization string (e.g. "ATZ0"). phonenumPointer to a string containing the phone number to dial. usernamePointer to the user name to log on. Set to NULL if the remote host does not prompt for a user name. passwdPointer to the password for username. Set to NULL if the remote host does not prompt for a password. term_strLine termination string for sending modem commands (usually "\r"). return valueReturns 0 if successful, otherwise -1. 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 automates login to a remote server via a Hayes compatible modem. This routine is simply a high-level interface to the routine xn_scriptlogin. It waits for the string "OK" to come in from the modem after the initialization string specified by setupst has been sent. If username is specified, it waits for "ogin:" before sending the username and waits for the string "ssword:" before sending the password. This function waits 5 seconds for "OK", 70 seconds for "ogin:", and 10 seconds for "ssword:". If the username parameter is empty or NULL, xn_autologin returns immediately after "CONNECT" is received from the modem, i.e. it does not wait for the login prompt.
|