View network data
Hi – trying to access network data coming in to a program on my machine (OSX)
I know the port it receives the data on, but when i tell either ‘mxj net.rcv’ or ‘sadam.tcpReceiever’ to look at that port, i get:
‘can’t bind to port’
which i suspect is because the application on my mac is already using it.
any way to listen in on the network data coming in so my max patch can react to it?
any ideas? thanks!!
I gave a couple of days ago a very basic explanation of how ports etc. work in this thread: http://cycling74.com/forums/topic.php?id=42962 (just scroll down to approx. the middle of the thread). The thing is: you can’t have two different things listening on the same port. So, if there’s another software already using the port, you won’t be able to connect to the same port. You can still use tools like Wireshark to analyze the global network traffic and filter somehow the incoming messages, however, I don’t think that Wireshark had an option to forward specific data to a third-party application (although you never know).
If the other software supports changing the port, then you could also do the following (which might or might not work, depending on how the other software implements IP communication): you could do a proxy in Max, which would catch all incoming data on the specified port, and then forward the information to another port, which your other software could catch. However, this might be quite complex, if not impossible, to implement if your software is using bidirectional communication (I have a bidirectional client in my library called
[sadam.tcpClient], but I still didn’t finish the implementation for a server).
Hope that helps,
Aha – was afraid of that. Thanks for the info!
Maybe this will help. I don’t know how your processing skills are but you can use carnivore (the first link) to capture traffic in processing and send that to max via osc (i don’t know if that will interfere with the capturing though > feedbackloop?). Carnivore makes use of jpcap (the second link > java) which makes use of libpcap/tcpdump (the third link > c/c++) so you can go as deep as you want.
Thanks FRid! i’ll give it a look!
Lucky you :)
This prints incoming network traffic to the maxwindow. you do need winpcap (if on win), oscp5 and procssing to make this work but it works.
----------begin_max5_patcher---------- 1146.3ocuVs1bhhDE8yYpZ9OPwmLQCBn3iMYmp7ULFiw36GKakBgVrMR2XSi hlZ9uOMMpwjIYlL0lZ0BPN8412Se31W7ou9kSDmfC.dhB+kv+HbxIOwPNgiE hbxdfSDcLBLWX3wIJZhcb.HpXhcCRAAT9.PGWLgJfI1RDOaoEvIR2hsuPG8p ALMHH3JLAHc1QC5Ydu1w.H.cGfNpz9HtWSvjizLjdTPr6uCPKXYQ.ddBNaZC bvTvsXSCJDi3rWggVBd.puarSEdRGIH3A2BhopImfcb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.WAD3uo6srBkOcqfuGR QNyuyJTd+Rk+jxjHt71Eu9OOw0X3.ux77v9Dy8Ia21EgizoEaWEDwe62QjTe IoYPKK.5EOSsfdFSV.3l6uXK+GVVJeDYk5+jr14dFttq.DucybjhX0Xywjv6 yjH5dHJ59nYVj.VA2GRVFBeVYm9Q6todQ -----------end_max5_patcher-----------
Forums > MaxMSP