KNET_HAND...PRIO_DSCP(3)

πŸ“¦
version 1.35 Β· 2 versions
, in fedora 43, fedora 44

πŸ’– KNET_HAND...PRIO_DSCP(3) πŸ’–

okay so bestie, welcome to the Kronosnet Programmer's Manual ✨ this is the page for knet_handle_setprio_dscp(3) and it's genuinely so useful, like lowkey iconic behavior for your sockets. let's get into it 🫢


🌸 NAME 🌸

knet_handle_setprio_dscp β€” the way you use dscp for IP_TOS on a socket so you can actually implement KNET_LINK_FLAG_TRAFFICHIPRIO πŸ’…


✨ SYNOPSIS ✨

#include <libknet.h>

int knet_handle_setprio_dscp(
    knet_handle_t  knet_h,
    uint8_t        dscp
);

πŸ¦‹ DESCRIPTION πŸ¦‹

so, knet_handle_setprio_dscp is the function, and here's who's who:

  • knet_h β€” pointer to knet_handle_t, your handle bestie 🫢
  • dscp β€” the dscp value you wanna set on all new sockets
🚨 listen up, this is the important part: you have to call this function before you configure your knet links. like, before. not after. fr fr.

what it actually does? it disables the use of IPTOS_LOWDELAY and instead puts your given dscp value in the IP header's TOS field. that's it, that's the whole vibe 🌈

and if you set dscp to 0? it reverts right back to using IPTOS_LOWDELAY. no cap πŸ’€


πŸ‘‘ RETURN VALUE πŸ‘‘

knet_handle_setprio_dscp returns 0 on success, -1 on error, and when it errors, errno is set. periodt πŸ’…


πŸ’œ SEE ALSO πŸ’œ

the whole group chat, all the besties, every single one:


Copyright (C) 2010-2026 Red Hat, Inc. All rights reserved.


okay bestie that's the whole page, you ate that πŸ“ thanks for reading, mwah πŸ’–

this has been kronosnet, dated 2026-07-20 β€” stay slaying your sockets, ily, byeeeee πŸ‘‘βœ¨πŸ¦‹
πŸ“¦ where this page comes from