-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Quality of Service #42
Comments
This is quite tricky, and would be something the raw-socket module (also my module) would have to support. Are you enquiring specifically about QoS support for ICMP ping messages, or QoS for packets in general? |
Right now specifically for ICMP ping messages, but a general QoS support for the raw-socket module might open some possibilities for me to develop tools at my work. |
For Windows it's not simple, and would require using the QoS API specifically exposed to work with QoS, something that would not be done anytime soon I'm afraid because of work commitments. If you are working with Linux however, you could try the $ grep -R IP_TOS /usr/include/*
/usr/include/bits/in.h:#define IP_TOS 1 /* int; IP type of service and precedence. */
/usr/include/linux/in.h:#define IP_TOS 1
...
$ grep -R IPTOS_THROUGHPUT /usr/include/*
/usr/include/linux/ip.h:#define IPTOS_THROUGHPUT 0x08
/usr/include/netinet/ip.h:#define IPTOS_THROUGHPUT 0x08
... Then use this to set the socket option before you use the net-ping session (assumes latest version of net-ping): var ping = require("net-ping")
var raw = require("raw-socket")
var session = ping.createSession(...)
var level = raw.SocketLevel.IPPROTO_IP
var option = 1 // IP_TOS
var value = new Buffer([0x08]) // IPTOS_THROUGHPUT
session.getSocket().setOption(level, option, value, value.length)
// Then go on to session.pingHost() etc. See the raw-socket docs for more information on the Steve |
Just realised, we already expose the var ping = require("net-ping")
var raw = require("raw-socket")
var session = ping.createSession(...)
var level = raw.SocketLevel.IPPROTO_IP
var option = raw.SocketOption.IP_TOS
var value = new Buffer([0x08]) // IPTOS_THROUGHPUT
session.getSocket().setOption(level, option, value, value.length)
// Then go on to session.pingHost() etc. |
Sorry for the delay, I've been dragged with another things at work, I'll try it when I find time to code it, it looks really promising. Thanks for the help! |
Hi, I was looking for a package like this one, but what I was searching specifically was QoS support, do you have any plans to add it?
Thanks.
The text was updated successfully, but these errors were encountered: