• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • Carey Brown
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • fred rosenberger
  • salvin francis

What's wrong with this python code? It doesn't work

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I'm trying to use the following code to produce traffic on a mininet network (with a pox controller, one switch and four hosts). The sourceIPgen() function produces random source IP addresses,and the gendest(start, end) function produces dst IPs. Destination IPs start with 10.0.0. ,and the last value is entered by the user. This is the command to get the last value from the command line:


my question is that: What is the format of entering the values in command line?
Is this correct?(to send the packets to hosts: 10.0.0.1 to 10.0.0.4 ): python filename.py -1 -4

This is the code:




But it does'nt work for me!I know that the two sourceIPgen() and gendest(start, end) functions work properly, because i tested them in another script. when i try to run the script with the " python filename.py -1 -4 " command, no thing happens!no traffic is generated,no thing is printed, no thing!
Could you please tell me what's wrong with the code?
Am i typing the execution command in a wrong way?

Thank you for your kind help.
 
reply
    Bookmark Topic Watch Topic
  • New Topic