To probe network adapter properties in IPv4, we can use SIOCGIFONF, SIOCGIFNETMASK etc.
On HP-UX and Solaris, the IPv6 equivalents are SIOCGLIFONF, SIOCGLIFNETMASK.
Does AIX support these ioctls (perhaps with an APAR) or are they called something different?
A pointer to a standards document would be helpful - I googled but didn't find anything.
IBM's website implies the standard SIOCGIFCONF on AIX like Linux is IP family independent as it uses struct sockaddr.
http://www.ibm.com/developerworks/aix/library/au-ioctl-socket.html
Looks like there is a separate SIOCGIFCONF6 that was added to support IPv6. Not sure how to tell what version of AIX may have it.
Related
The command ip tcp_metrics on Linux systems can be very helpful e.g. for analyzing historic network connections of the server without having access to log files.
Is something similar to this command available on Windows based systems?
It seems like netsh interface {ipv4|ipv6} show destinationcache will do the job I was looking for, although there are not as many details available as in ip tcp_metrics.
I'm trying to do basically this in Go:
netstat -an | grep 2375 -c
I need to count the number of connections to the Docker daemon in my regression test for a connection leak bug. However, because I run this in multiple places in different OS (local dev box, CI, etc), I cannot rely on the "netstat" tool, so I wonder how can I do this in a more programmatic way in Go?
I looked around the net package and could not find anything that would help. There are some libraries that basically replace netstat:
https://github.com/drael/GOnetstat
https://github.com/dominikh/netstat-nat
But they are not cross-platform compliant (Mac and *nix). Any idea how can I achieve this?
In linux this info is exposed in the /proc filesystem.
Use os.Getpid and query the info in /proc/<pid>/fd. Most likely a simple count is good here, if you need more see the proc man page.
Cross platform compatibility for this kind of thing is going to be roll your own, as the ways of identifying open fd's for a process are very per platform. If you simply need to compile, and pass some tests for this on non linux platforms you can use Go's per platform support to make this a no-op on other platforms, or implement an appropriate solution.
I'm interested in getting the "rtmpt" and "rtmpts" protocol working
on a an embedded linux device (like a capture camera)
where the embedded linux device acts a standalone rtmpt/rtmpts server.
So, I already have nginx rtmp module compiled (which is leightweight enough)
and installed the linux device and verified plain old "rtmp" protocol
streams fine with nginx as the server.
However, it wasn't clear to me if nginx supports "rtmpt" and "rtmpts". If it does, is there some sample nginx.conf config for this?
If it does not, what other software do you think I can consider to add
to get that to work on the embedded device?
Thanks for any ideas.
Henry
As per the author, no.
https://github.com/arut/nginx-rtmp-module/issues/279
It's from Oct 2013, but I can't find anything else to contradict this.
I am trying to use Boost for some IPv6 and multicast network communication. I need to construct an IPv6 multicast socket that uses a specific network interface index.
I was able to find the correct multicast option to set the network interface index in boost/asio/ip/detail/socket_option.hpp:
explicit multicast_request(const boost::asio::ip::address_v6& multicast_address, unsigned long network_interface = 0)
The problem is, I don't know how to find the correct value for the "network_interface" parameter. Is there a way to get the network_interface value using a local IPv6 address that I can provide? I looked in the documentation and examples, but couldn't find anything.
-- Dylan
Each platform provides APIs to enumerate the network interfaces, e.g. getifaddrs for many Unixes and GetAdaptersAddresses for Windows. Note on Windows there is a separate numerical space for IPv4 and IPv6 adapters which makes the API call if_nametoindex quite confusing.
You may wish to inspect the methods I employed in OpenPGM for portability, considering Windows doesn't really have useful adapter names:
http://code.google.com/p/openpgm/source/browse/trunk/openpgm/pgm/getifaddrs.c
http://code.google.com/p/openpgm/source/browse/trunk/openpgm/pgm/nametoindex.c
http://code.google.com/p/openpgm/source/browse/trunk/openpgm/pgm/indextoaddr.c
http://code.google.com/p/openpgm/source/browse/trunk/openpgm/pgm/indextoname.c
I don't think there's a platform-independent way to figure this out, just as there is no portable solution to enumerating the local addresses.
On Linux, you can find what you want in the second column of /proc/net/if_inet6, which is also available more robustly through the rtnetlink(7) interface.
Im trying to understand the virtual terminal access. I was wondering if anyone know any sources for the Virtual Terminal Access protocol. And other sources like ftp, http, and remote procedure calls.
The RFC Sourcebook...
I'm not sure about the 'Virtual Terminal Access Protocol' though. That's a new one to me. Usually, if you're looking to communicate with a terminal you have to know the model of the specific terminal because there are so many different terminal specifications.
The RFC sourcebook, at the least, will give you a great resource to help implement FTP, HTTP,and RPC.
If you want to see a great example of a virtual terminal check out PuTTY
I suspect you meant the Virtual Terminal Protocol that was part of the ISO protocol stack. It was never widely deployed. The logical Internet equivalent was telnet, which, while extremely useful in its day, was insecure and has since been replaced by ssh.