mikroElektronika PIC Microcontrollers PIC12 User Manual page 188

Mikroc user's manual
Table of Contents

Advertisement

mikroC - C Compiler for Microchip PIC microcontrollers
Eth_Get_Udp_Source_Port
Prototype
unsigned Eth_Get_Udp_Source_Port(void);
Returns
Returns the source port (socket) of the received UDP packet.
Description
The function returns the source port (socket) of the received UDP packet. After the
reception of valid IP packet is detected and its type is determined to be UDP, the UDP
packet header must be interpreted. UDP source port is the first data in the UDP header.
Requires
This function must be called in a proper sequence, i.e. immediately after interpretation
of the IP packet header (at the very beginning of UDP packet header retrieval).
Example
udp_source_port = Eth_Get_Udp_Source_Port();
Eth_Get_Udp_Dest_Port
Prototype
unsigned Eth_Get_Udp_Dest_Port(void);
Returns
Returns the destination port of the received UDP packet.
Description
The function returns the destination port of the received UDP packet. The second
information contained in the UDP packet header is the destination port (socket) to which
the packet is targeted.
Requires
This function must be called in a proper sequence, i.e. immediately after calling the
Eth_Get_Udp_Source_Port
Example
udp_dest_port = Eth_Get_Udp_Dest_Port();
page
180
function.
MikroElektronika: Development tools - Books - Compilers
mikroC
making it simple...

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the PIC Microcontrollers PIC12 and is the answer not in the manual?

This manual is also suitable for:

Pic microcontrollers pic16Pic microcontrollers pic18

Table of Contents