206 uint16_t GetEphemeralPort(
void);
253 otError UpdateChecksum(
Message &aMessage, uint16_t aPseudoHeaderChecksum);
258 kDynamicPortMin = 49152,
259 kDynamicPortMax = 65535,
261 uint16_t mEphemeralPort;
269 uint16_t mDestination;
320 uint16_t
GetLength(
void)
const {
return HostSwap16(mLength); }
328 void SetLength(uint16_t aLength) { mLength = HostSwap16(aLength); }
336 uint16_t
GetChecksum(
void)
const {
return HostSwap16(mChecksum); }
344 void SetChecksum(uint16_t aChecksum) { mChecksum = HostSwap16(aChecksum); }
372 #endif // NET_UDP6_HPP_
This type represents all the static / global variables used by OpenThread allocated in one place...
Definition: openthread-instance.h:59
struct otUdpSocket * mNext
A pointer to the next UDP socket (internal use only).
Definition: udp.h:72
SockAddr & GetSockName(void)
This method returns the local socket address.
Definition: udp6.hpp:144
This file includes definitions for locator class for OpenThread objects.
otError Bind(const SockAddr &aSockAddr)
This method binds the UDP socket.
Definition: udp6.cpp:67
otError Close(void)
This method closes the UDP socket.
Definition: udp6.cpp:85
This class implements message information for an IPv6 message.
Definition: socket.hpp:57
UdpSocket(Udp &aUdp)
This constructor initializes the object.
Definition: udp6.cpp:47
IpProto
Internet Protocol Numbers.
Definition: ip6_headers.hpp:93
otSockAddr mSockName
The local IPv6 socket address.
Definition: udp.h:67
otError SendTo(Message &aMessage, const MessageInfo &aMessageInfo)
This method sends a UDP message.
Definition: udp6.cpp:97
This class implements a socket address.
Definition: socket.hpp:191
SockAddr & GetPeerName(void)
This method returns the peer's socket address.
Definition: udp6.hpp:152
This class represents a message.
Definition: message.hpp:195
otError Open(otUdpReceive aHandler, void *aContext)
This method opens the UDP socket.
Definition: udp6.cpp:57
otUdpReceive mHandler
A function pointer to the application callback.
Definition: udp.h:69
This class implements locator for otInstance object.
Definition: locator.hpp:63
This class implements core UDP message handling.
Definition: udp6.hpp:167
void(* otUdpReceive)(void *aContext, otMessage *aMessage, const otMessageInfo *aMessageInfo)
This callback allows OpenThread to inform the application of a received UDP message.
Definition: udp.h:59
This class implements a UDP/IPv6 socket.
Definition: udp6.hpp:63
otError Connect(const SockAddr &aSockAddr)
This method connects the UDP socket.
Definition: udp6.cpp:79
Message * NewMessage(uint16_t aReserved)
This method returns a new UDP message with sufficient header space reserved.
Definition: udp6.cpp:52
otSockAddr mPeerName
The peer IPv6 socket address.
Definition: udp.h:68
This structure represents a UDP socket.
Definition: udp.h:65
void * mContext
A pointer to application-specific context.
Definition: udp.h:70
otError
This enumeration represents error codes used throughout OpenThread.
Definition: types.h:107
This file includes compile-time configuration constants for OpenThread.
This file defines the OpenThread UDP API.