taskEtherDogs - Tasks: task #12400, Modify the main function to get...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

task #12400: Modify the main function to get parameters from the command line.

Submitted by:  Jose Maria Micoli <crashdump>
Submitted on:  Wed 09 Jan 2013 10:12:38 AM UTC  
 
Should Start On:  Wed 09 Jan 2013 12:00:00 AM UTC Should be Finished on:  Mon 21 Jan 2013 12:00:00 AM UTC
Category:  None Priority:  5 - Normal
Status:  In Progress Privacy:  Public
Percent Complete:  80% Assigned to:  Shanka Perera <shankap>
Open/Closed:  Open Effort:  5.00

Thu 10 Jan 2013 11:23:13 AM UTC, comment #2:

Shankap

I have made the inclusion of the parameter "-h" to invoke the module help.

I have taken the policy of pre processing #include <string.h> in the file main.c because she is already on file common.h. Includes all libraries are taking over the file common.h to centralize everything so a single place so he could climb easily our software.

I will post here when the other modules were made that needed your help to include arguments like "-n" <number of packets> "p" <protocol filter> but wait for now.

Jose Maria Micoli <crashdump>
Project Administrator
Thu 10 Jan 2013 09:49:36 AM UTC, comment #1:

Very good Shankap! good job, I liked the "-d" parameter to select the network interface <"device"> now I will create a help module that will be accessed by the parameter "-h" and subsequently we create a packet filter module type ex. "-p" <"protocol">.

Just one question: why use the "goto"? the goto command is against the rules of structured programming. We could try to use another command? only use the goto if indispensable.

Again good job I congratulate Shankap.

thank you

Jose Maria Micoli

Jose Maria Micoli <crashdump>
Project Administrator
Wed 09 Jan 2013 10:12:38 AM UTC, original submission:

This will be an easy task for any C programmer that already the modification will not be abrupt however this task is very important for the evolution of the project.

Any questions please email me.

Jose Maria Micoli

Jose Maria Micoli <crashdump>
Project Administrator

 

Attached Files
file #27229:  main.c added by shankap (3KiB - text/x-csrc - I started with the easiest task. I'm not sure what you expect to pass as parameters, so I modified the main program to get the device name as parameter. ex: etherdog -d eth0)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by deepankar (Updated the item)
  • -email is unavailable- added by shankap (Updated the item)
  • -email is unavailable- added by crashdump (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-01-14 deepankar Percent Complete60% => 80%
    2013-01-10 crashdump Percent Complete40% => 60%
    2013-01-10 crashdump StatusNone => In Progress
        Percent Complete0% => 40%
        Assigned toNone => shankap
    2013-01-09 shankap Attached File- => Added main.c, #27229

    Back to the top


    Powered by Savane 3.3