Code Monkey home page Code Monkey logo

mcjoin's Issues

Debian package

Hi there,

Would be possible to make mcjoin an official Debian package?
Looks like it is already possible to create a package, what would be needed to make it available over apt?

Seperate listen port per group ?

Would it be possible to add a way to have mcjoin use a differnet listen port per group when joining multiple groups ? Maybe use the stnadard syntax group:port or group+num:port

Thanks for a great tool.

Issue with dots in debug mode

Hey @troglobit,

first I want to say that mcjoin is a great program for testing multicast.
Especially with the new interface it looks really sleek.

We are using the program to test our network setup with multiple clients joining in different locations.
For these tests we run the program 'headless' and we use the debug flag to save the stdout of each of the clients.
However the following line:

groups[id].status[STATUS_POS] = '.'; /* XXX: Use increasing dot size for more hits? */

gives weird (backspace?) characters in the saved redirected output, on my machine it shows up as ^H

e.g.

Count     0, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 850, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 850, freq: 100
group seq 0 vs seq 850
Count     1, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 850, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 850, freq: 100
group seq 851 vs seq 850
Count     2, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 851, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 851, freq: 100
Count     3, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 851, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 851, freq: 100
group seq 852 vs seq 851
Count     4, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 852, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 852, freq: 100
Count     5, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 852, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 852, freq: 100
group seq 853 vs seq 852
Count     6, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 853, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 853, freq: 100
Count     7, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 853, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 853, freq: 100
group seq 854 vs seq 853
Count     8, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 854, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 854, freq: 100
Count     9, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 854, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 854, freq: 100
group seq 855 vs seq 854
Count    10, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 855, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 855, freq: 100
Count    11, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 855, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 855, freq: 100
group seq 856 vs seq 855
Count    12, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 856, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 856, freq: 100
Count    13, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 856, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 856, freq: 100
group seq 857 vs seq 856
Count    14, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 857, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 857, freq: 100
Count    15, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 857, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 857, freq: 100
group seq 858 vs seq 857
Count    16, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 858, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 858, freq: 100
Count    17, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 858, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 858, freq: 100
group seq 859 vs seq 858
Count    18, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 859, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 859, freq: 100
Count    19, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 859, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 859, freq: 100
group seq 860 vs seq 859
..�Count    20, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 860, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 860, freq: 100
Count    21, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 860, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 860, freq: 100
group seq 861 vs seq 860
o�Count    22, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 861, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 861, freq: 100
Count    23, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 861, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 861, freq: 100
group seq 862 vs seq 861
O�Count    24, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 862, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 862, freq: 100
Count    25, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 862, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 862, freq: 100
group seq 863 vs seq 862
O�Count    26, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 863, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 863, freq: 100
Count    27, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 863, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 863, freq: 100
group seq 864 vs seq 863
o�Count    28, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 864, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 864, freq: 100
Count    29, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 864, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 864, freq: 100
group seq 865 vs seq 864
.�Count    30, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 865, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 865, freq: 100
Count    31, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 865, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 865, freq: 100
group seq 866 vs seq 865
..�Count    32, our PID 283957, sender PID 80618, group 225.1.2.3, seq: 866, msg: Sender PID 80618, MC group 225.1.2.3 ... count: 866, freq: 100


It happens from around count 20 upwards.
Compiled without that line gives us the consistent output we use.

p.s.:
Would you consider adding a 'timeout' flag that stops the program after x seconds?
Because we are testing link failures and in these cases the numbers of counts don't get hit in which case the program never quits.

Receiver does not stop after count received packets

Hi Nilsson,

Many thanks for your sharing, that's a great util for mcast testing!

After doing fork the branch, I found -c parameter doesn't work on my local setup, I changed the code and move a size_t total = count * group_num to the top of loop() function as below commit.

chenxy1988@f729596

Thanks!
Xiangyu

Enhance mcjoin to ease integration into test automation

I'd like to use mcjoin in my automated tests, and as such wanted to ask whether the following enhancements are possible?

  1. Have JSON output at the end of a run (such as iperf3 has).
  2. Have no-output mode (no progress bar at all).
  3. Compile mcjoin as library for integration into test software (e.g. into a robot-framework test library).
  4. Support explicit IGMP/MLD version . I know this can be done through sysctl, the question is can it be done through the application?

I'm opening this as one ticket as to not flood you with many new ticket suddenly :) If accepted, I can open separate tickets, and even try to contribute some of the code changes.

100% cpu usage in daemon mode

mcjoin -s -d results in 100 cpu usage. A quick ptrace shows mainly:

pselect6(5, [0 4], NULL, NULL, NULL, NULL) = 1 (in [0])
read(0, "", 1) = 0

IGMP/MLD monitoring

Hi,

I need to know if I could do a monitoring of IGMP/MLD messages (joins/leaves to groups) using the mcjoin tool. Or if I can do this with another tool. My objective is to start/stop some scripts based on the group state.

Thank you.

Source/group parser cuts of group addresses when using IPv6 SSM

Groups are cut off when the argument exceeds 49 characters:

mcjoin fd6f:7b5e:3918:9728:d8fa:2afd:d864:e944,ff3e::f2ce:7765 results in joining group ff3e::f2c instead of ff3e::f2ce:7765

The issue is caused at the following line:

char buf[INET_ADDRSTR_LEN + 1];

buf size has to be at least: 2 addresses, 3 delimiters, 2 brackets, 5 port digits and 1 zero terminator to support mcjoin source,[group0]:port+num

suggested change:
char buf[2 * INET_ADDRSTR_LEN + 11];

mcjoin (receiver) not receiving the multicast packet

Hi,

I'm trying to run the mcjoin on RHEL 7.4 in GNS3 and from the RHEL, I run tcpdump and can see the udp packet from the sender. However the mcjoin program shows 0 packets. Is there anything I missed?

Sender: mcjoin -s -t 100 -p 50500
Receiver: mcjoin -p 50500

Publish docker image

It's useful in container environments to have mcjoin for testing. I've created a PR #2 to build mcjoin in docker and package it in an image based on debian:stretch. This could be published to https://hub.docker.com/u/troglobit with DockerHub automated builds.

Thank you for a great tool and suggestion for improvement.

I have been looking for and testing tools for testing multicast for years and this is simply the very best I have come across. Keep up the good work,

Especially I really like the newer animated view.

I would like to suggest making it possible to view packet and byte throughput numbers (not just counter) for each joined group. Looks like some throughput information is already calculated to control the speed of the "spinner".

Maybe add an option to control sampling interval and scale of the byte throughput numbers.

No feedback in receiver mode when mcjoin is used as sender

When running two instances of mcjoin the receiver sometimes doesn't print feedback for each packet it receives from the sender mcjoin. Unclear atm. why and for what use-cases this happens. Should be fixed before v2.7.

Receiving multiple groups could also be illustrated better, but might need some other type of output (ncurses?)

Calculate and show gaps in summary output

We could do quite a bit of statistical analysis, but at least increment a counter every time we don't receive the next expected sequence number (counter).

Like this, for example:

root@n2:/usr/src/mcjoin# ./src/mcjoin -j 225.1.2.4 225.4.3.2
joined group 225.1.2.4 on eth0 ...
joined group 225.4.3.2 on eth0 ...
..................^C
Group 225.1.2.4 received 54 packets, gaps: 0
Group 225.4.3.2 received 54 packets, gaps: 30

Received total: 108 packets

Receiving multicast on docker

Have you successfully received the multicast stream on docker? Is there anything to do to allow it? I'm running on EVE-NG.

Doesn't send IPv4 packets if IPv6 is not available

I have Ubuntu 20.04 with disabled Ipv6 and no Ipv6 address on interfaces. In that cast sender just can't send ipv4 packets with error like: No interface enp2s0, or no IPv6 address yet...
My simple workaround was just comment these:

mcjoin/src/mcjoin.c

Lines 254 to 255 in 0e287ee

if (sd4 == -1)
return;

and these

mcjoin/src/mcjoin.c

Lines 260 to 261 in 0e287ee

if (sd6 == -1)
return;

lines, and make appropriate check after this line:
int sd = groups[i].grp.ss_family == AF_INET ? sd4 : sd6;

mcjoin -s in docker container fails with: No interface (eth0), or no IPv6 address yet, rc 0: No error information

Hi

When I run mcjoin -s in a container it reports: No interface (eth0), or no IPv6 address yet, rc 0: No error information

Do I need to give special rights to the container?

Reproduction:

  1. git pull
  2. docker build .
  3. docker run -it xxx sh
  4. run it in the container
mcjoin -s -l debug
Found default intefaces eth0
NOFILE: current 1048576 max 1048576
NOFILE: set new current 2058 max 1048576
Found eth0 addr 172.17.0.2
Valid iface eth0, ifindex 118, addr 172.17.0.2
Sending on iface eth0 addr 172.17.0.2 ifindex 118
No interface (eth0), or no IPv6 address yet, rc 0: No error information
No interface (eth0), or no IPv6 address yet, rc 0: Interrupted system call
No interface (eth0), or no IPv6 address yet, rc 0: Interrupted system call
No interface (eth0), or no IPv6 address yet, rc 0: Interrupted system call
...

I've tried it on an Ubuntu 18.04 host and a Fedora 30 host.

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.