UDP Sink

From GNU Radio
Jump to navigation Jump to search

This block provides basic UDP data transmission capabilities with a few additional features for processing in custom receiving applications. A header can be added in various formats for tracking. For instance all headers also provide a sequence number that can be used to identify gaps in packets.

Note that payload size impacts the overall size of a single UDP packet. For a normal network, a payload size of 1472 (1500-28 for UDP headers) represents the max size for a standard UDP packet. For jumbo frames, 8972 can be used (9000-28). Be careful adjusting this parameter as you could inadvertently cause unnecessary packet fragmentation and reconstruction.


  • This block does support connecting to IPv6 addresses. If an IPv6 address is detected as the destination IP address, the block will automatically adjust for proper connection. Just make sure your IPv6 stack is enabled.
  • For best performance and to ensure UDP packets are not dropped, add the following lines to your /etc/sysctl.conf and reboot (the reboot is required).

IT IS HIGHLY RECOMMENDED that the example test_udp_source/sink flowgraphs be tested with the sequence number header enabled (the default in those flowgraphs) as a validation that no network or IP stack bottlenecks may cause dropped packets at the rates planned in your environment before using in production, especially if headers will not be used in your environment to track dropped packets.


For the version with 4 params depreciated in 3.9, see this page

IP address; default: (localhost)
Destination Port
default: 2000
options: [None, 64-bit Sequence Number, Sequence + 16-bit data size, CHDR
UDP Packet Data Size
default: 1472
Send Null Packet as EOF
options: [No, Yes]
Vec Length
vector length; default: 1

Example Flowgraph[edit]

This flowgraph can be found at [1]

Test udp sink fg.png

Source Files[edit]

C++ files
Header files
Public header files
Block definition