![]() |
Home |
|
Function xn_interface_openOpen an Ethernet or loopback interface. int xn_interface_open(int device_id, int minor_number); Parametersdevice_idDevice type (NE2000_DEVICE, SMC91C9X_DEVICE, LOOP_DEVICE, etc.). minor_numberMinor device number to distinguish multiple devices handled by the same driver. return valueReturns interface number if interface was opened successfully, otherwise SOCKET_ERROR. If an error occurred, call xn_getlasterror and xn_geterror_string to return the error value. Error Codes further describes each error. Possible values for this function are:
This routine must be called at start-up to open an Ethernet or loopback interface. The parameter device_id specifies the type of device which is being opened and the minor_number specifies which device of this type is being opened. The device number and minor number specified must match an entry in the Device Table. Refer to section Device Drivers for information about setting up default devices for Ethernet drivers. See xn_interface_open_config to open an interface with a different configuration than what is specified in the device table. xn_interface_open allocates and sets up an interface structure and calls the open routine for the specified interface.
|