Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的应用程序使用 openldap 堆栈将请求发送到 LDAP 服务器,我想设置 DSCP (IP_TOS) 值有没有办法做到这一点?提前致谢
当然,只需在 LDAP 套接字上使用 setsockopt:
#include <sys/types.h> #include <sys/socket.h> int tos = IPTOS_LOWDELAY; if (setsockopt(sock, IPPROTO_IP, IP_TOS, (char *) &tos, sizeof(tos)) < 0 ) { printf("Failed setting TOS on socket"); abort(); }