@CHIP-RTOS C Library V2.06 - BIOS API
BIOS_Install_UDP_Cfg_Callback
Install a UDP Config Server
user callback function. void BIOS_Install_UDP_Cfg_Callback ( UDP_CFG_CALLBACK callback ); Parameters
callback
- Vector to callback function
Return Value
- -- none --
Comments
- This function installs a user callback function for
the UDP Config Server. This function will be invoked when a UDP
configuration request with command number 06 is received.
This allows you to implement your own UDP Config sub protocol and
commands.
The UDP Cfg callback function must have the following form:
void huge MyUdpCfgSrvCB( struct UdpCfgSrv_UserCBInfo far *infoPtr );
The UDP Cfg callback function is passed an argument with
information about the UDP Cfg Request and its requester.
This data structure, defined in
BIOS_API.H header file, is repeated below. The
sockaddr_in
structure definition can be found in TCPIPAPI.H
If the callback function sets a pointer in the dataPtr
member of the UdpCfgSrv_UserCBInfo
structure, the UDP Config will
be sent the referenced data using the dataLength
member of the
structure for the byte count. If this pointer is set to null or
the dataLength
field is set to 0 then no data will be sent back to
the requester.
To remove an installed callback function, call this API function
with a null pointer.
For more information on the UDP Config Server and its protocol have
a look at the UDP Config Server description available on our website.
Note: The amount data sent and received is limited to 300 bytes maximum.
| typedef struct UdpCfgSrv_UserCBInfo
{
int length ; // Length of this structure
struct sockaddr_in far *fromAddrPtr; // Sender address pointer
int udpCfgSD; // Socket descriptor from UDP Config Server Socket
char far *dataPtr; // Data of Request package
unsigned dataLength; // Length of request package
} UDPCFGSRV_USERCBINFO ; |
RTOS API
- This library function invokes a RTOS software interrupt.
Refer to this RTOS API function's
documentation
for more details.
Supported since or modified in @CHIP-RTOS version-
SC12 | SC13 | SC11 | SC1x3 |
-
V1.03 | V1.00 | V1.00 | V0.90 |
This API List
List of C Libraries
@CHIP-RTOS Main Index
End of document
|