Problem about adding method "tcpdump"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I wanted to add a method "tcpdump" in networktest.py, but it did not
work. Attachment is the output. 

Is it because tcpdump needs root to run it? 

Here is the added code,

    def tcpdump(self, *args):
        return self.__run_command('/usr/sbin/netstat',
                                  self.__args_to_list(args))

    def register_method_args(self):
        """
        Implementing method getter part
        """

        return{

                'tcpdump':{
                    'args':{
                    'args':{
                        'type':'list*',
                        'optional':False,
                        'description':"Options for tcpdump command"
                            }},
                    'description':"The unix tcpdump command utility"
                    },

Another question, "register_method_args(self)" is included in a lot of
modules. What is it used for? I am a beginner of func & python...
---------------------------------------------------------------------------------------------------
Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) 
is intended only for the use of the intended recipient and may be confidential and/or privileged of 
Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is 
not the intended recipient, unauthorized use, forwarding, printing,  storing, disclosure or copying 
is strictly prohibited, and may be unlawful.If you have received this communication in error,please 
immediately notify the sender by return e-mail, and delete the original message and all copies from 
your system. Thank you. 
---------------------------------------------------------------------------------------------------

Attachment: erro_tcpdump.jpg
Description: JPEG image

_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list

[Index of Archives]     [Fedora Users]     [Linux Networking]     [Fedora Legacy List]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux