Skip to content
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

Code fix to handle IGMP packet #30

Open
GoogleCodeExporter opened this issue Mar 24, 2015 · 3 comments
Open

Code fix to handle IGMP packet #30

GoogleCodeExporter opened this issue Mar 24, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

Steps need to properly handle IGMP packet:

==ImpactDecoder.py==
add at line 91:
        elif i.get_ip_p() == ImpactPacket.IGMP.protocol:
            self.igmp_decoder = IGMPDecoder()
            packet = self.igmp_decoder.decode(aBuffer[off:])

add at line 171:
class IGMPDecoder(Decoder):
    def __init__(self):
        pass

    def decode(self, aBuffer):
        ig = ImpactPacket.IGMP(aBuffer)
        off = ig.get_header_size()
        self.data_decoder = DataDecoder()
        packet = self.data_decoder.decode(aBuffer[off:])
        ig.contains(packet)
        return ig

==ImpactPacket.py==
change line 1670:
answer = tmp_dict.get(aType, 'UNKNOWN TYPE OR VERSION ')

change line 1680:
tmp_str += 'Group: ' + socket.inet_ntoa(struct.pack('!L',self.get_igmp_group()))

Hope I haven't missed anything!

Original issue reported on code.google.com by andrewrw...@gmail.com on 1 Jul 2013 at 3:26

@GoogleCodeExporter
Copy link
Author

Hey andrew.. thanks for the fix!

Could you please, instead of specifing lines, send me a diff with the latest 
files in trunk so I can apply the patches and do some tests?.. That's way 
cleaner than changing the lines by numbers here.. 

thanks again!

beto

PS: or.. if it is a problem for you .. just send me the entire files

Original comment by bet...@gmail.com on 2 Jul 2013 at 8:53

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Hey, not a problem. I've never had to work with diffs before, but will if I
come across anything in the future.

Andrew

Original comment by andrewrw...@gmail.com on 3 Jul 2013 at 12:05

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Original comment by bet...@gmail.com on 11 Oct 2013 at 3:37

  • Changed state: Accepted
  • Added labels: ****
  • Removed labels: ****

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant