Пример #1
0
/** uIP TCP/IP network stack callback function for the processing of a given UDP connection. This routine dispatches
 *  to the appropriate UDP protocol application based on the connection's listen port number.
 */
void uIPManagement_UDPCallback(void)
{
	/* Call the correct UDP application based on the port number the connection is listening on */
	switch (uip_udp_conn->lport)
	{
		case HTONS(DHCPC_CLIENT_PORT):
			DHCPClientApp_Callback();
			break;
	}
}
Пример #2
0
/** uIP TCP/IP network stack callback function for the processing of a given UDP connection. This routine dispatches
 *  to the appropriate UDP protocol application based on the connection's listen port number.
 */
void uIPManagement_UDPCallback(void)
{
	/* Call the correct UDP application based on the port number the connection is listening on */
	switch (uip_udp_conn->lport)
	{
		#if defined(ENABLE_DHCP_CLIENT)
		case HTONS(DHCP_CLIENT_PORT):
			DHCPClientApp_Callback();
			break;
		#endif
		#if defined(ENABLE_DHCP_SERVER)
		case HTONS(DHCP_SERVER_PORT):
			DHCPServerApp_Callback();
			break;
		#endif
	}
}