Skip to content

Commit aa5c6c0

Browse files
Cloudefalexrp
authored andcommitted
linux: add UDP socket options
1 parent bbd13ab commit aa5c6c0

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

lib/std/os/linux.zig

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3622,6 +3622,30 @@ pub const TCP = struct {
36223622
pub const REPAIR_OFF_NO_WP = -1;
36233623
};
36243624

3625+
pub const UDP = struct {
3626+
/// Never send partially complete segments
3627+
pub const CORK = 1;
3628+
/// Set the socket to accept encapsulated packets
3629+
pub const ENCAP = 100;
3630+
/// Disable sending checksum for UDP6X
3631+
pub const NO_CHECK6_TX = 101;
3632+
/// Disable accepting checksum for UDP6
3633+
pub const NO_CHECK6_RX = 102;
3634+
/// Set GSO segmentation size
3635+
pub const SEGMENT = 103;
3636+
/// This socket can receive UDP GRO packets
3637+
pub const GRO = 104;
3638+
};
3639+
3640+
pub const UDP_ENCAP = struct {
3641+
pub const ESPINUDP_NON_IKE = 1;
3642+
pub const ESPINUDP = 2;
3643+
pub const L2TPINUDP = 3;
3644+
pub const GTP0 = 4;
3645+
pub const GTP1U = 5;
3646+
pub const RXRPC = 6;
3647+
};
3648+
36253649
pub const PF = struct {
36263650
pub const UNSPEC = 0;
36273651
pub const LOCAL = 1;

0 commit comments

Comments
 (0)