tfUseBootp
Table of Contents >> Optional Protocols >> BOOTP Automatic Configuration
| #include <trsocket.h> |
| int tfUseBootp | ( |
| ttUserInterface interfaceHandle, | |
| ttDevNotifyFuncPtr notifyFuncPtr | |
| ); |
Function Description
This function is used to initialize the BOOTP client interface, and should be called between tfAddInterface() and tfOpenInterface(), to allow configuration using the BOOTP client protocol. If the second parameter is non-null, then upon completion of tfOpenInterface() the function that it points to will be called.
Function prototype for the user supplied notify function:
| void devNotifyFunc | ( |
| ttUserInterface interfaceHandle, | |
| int mHomeIndex, | |
| int errorCode | |
| ); |
| The 'mHomeIndex' parameter is only available if TM_DHCP_CB_WITH_MHOME is defined in trsystem.h. |
This function will be called with the 'interfaceHandle' passed to tfOpenInterface() and with an error code value which is TM_ENOERROR on success.
Parameters
- interfaceHandle
- The device entry as returned by tfAddInterface().
- notifyFuncPtr
- A pointer to a function that will be called upon completion of tfOpenInterface() for a BOOTP configuration.
Returns
- TM_ENOERROR
- Success.
- TM_EINVAL
- Invalid 'interfaceHandle'.
- TM_EMFILE
- Not enough sockets available to open the BOOTP client UDP socket.
- TM_ADDRINUSE
- Another socket is already bound to the BOOTP client UDP port.
Table of Contents >> Optional Protocols >> BOOTP Automatic Configuration