I have 2 hosts, 192.168.1.1 and 192.168.1.2. Both send different custom protocols over UDP port 1234. So 192.168.1.1 sends my_proto1 over port 1234 and 192.168.1.2 sends my_proto2 over port 1234.
I'm now trying to use bind_layers to bind the correct host to the correct custom protocol and running into problems because the IP address is at the IP layer and the port number is at the UDP layer. I tried using 2 bind_layers like so:
bind_layers(IP, my_proto1, src="192.168.1.1")
bind_layers(UDP, my_proto1, sport=1234)
This works for mapping a single host to a single protocol, but doesn't work when I add the 2nd protocol
bind_layers(IP, my_proto1, src="192.168.1.1")
bind_layers(UDP, my_proto1, sport=1234)
bind_layers(IP, my_proto2, src="192.168.1.2")
bind_layers(UDP, my_proto2, sport=1234)
Anyone have any suggestion for how to either use a single bind_layers to bind by both IP address and port number or how to use a combination of bind_layers that works? Thanks