[Babel-users] how to set the pacing rate

Dave Taht dave at taht.net
Mon Nov 12 12:16:13 GMT 2018


Not that it's useful this way, or tested, but....

diff --git a/net.c b/net.c
index 3926f46..e7a18c2 100644
--- a/net.c
+++ b/net.c
@@ -84,6 +84,11 @@ babel_socket(int port)
     if(rc < 0)
         perror("Couldn't set traffic class");
 
+    const int rate = 8000; 
+    rc = setsockopt(s, SOL_SOCKET, SO_MAX_PACING_RATE, &rate, sizeof(rate));
+    if (rc < 0)
+       perror("setsockopt(SO_MAX_PACING_RATE) failed");
+
     rc = fcntl(s, F_GETFL, 0);
     if(rc < 0)
         goto fail;



More information about the Babel-users mailing list