mirror of
https://github.com/GyulyVGC/sniffnet.git
synced 2026-10-25 08:31:35 +00:00
Update README.md
This commit is contained in:
parent
2bb1fa168a
commit
fcf7ecb2f2
1 changed files with 58 additions and 1 deletions
59
README.md
59
README.md
|
|
@ -174,10 +174,67 @@ Specifically, the transport layer protocols field is based on an Enum with only
|
|||
|
||||
## Error conditions
|
||||
|
||||
In this section are reported the errors that may occur due to command line options wrong specification or while the program is running.
|
||||
In this section are reported the errors that may occur while the application is running.
|
||||
|
||||
### Wrong command line options specification
|
||||
|
||||
|
||||
- **Not existing adapter name**
|
||||
|
||||
    If a non-existing adapter name is provided, the application raises an error and terminates.
|
||||
|
||||
    In this case the application will suggest to use the ```-d``` option to print on the standard output a list of the available devices.
|
||||
|
||||
    ```packet_sniffer -d``` prints a list of all the available network adapters names and addresses, as in the example that follows.
|
||||
|
||||
    
|
||||
|
||||
|
||||
- **Invalid highest port number**
|
||||
|
||||
    If the provided highest port number is not an integer in the range ```0..=65535``` the program raises an error and terminates.
|
||||
|
||||
    If also the lowest port number is specified and ```highest_port < lowest_port == true``` the program raises an error and terminates.
|
||||
|
||||
|
||||
- **Invalid interval value**
|
||||
|
||||
    If the provided interval value is not an integer in the range ```1..=u64::MAX``` the program raises an error and terminates.
|
||||
|
||||
|
||||
- **Invalid lowest port number**
|
||||
|
||||
    If the provided lowest port number is not an integer in the range ```0..=65535``` the program raises an error and terminates.
|
||||
|
||||
    If also the highest port number is specified and ```highest_port < lowest_port == true``` the program raises an error and terminates.
|
||||
|
||||
|
||||
- **Invalid minimum packets value**
|
||||
|
||||
    If the provided minimum packets value is not an integer in the range ```0..=u32::MAX``` the program raises an error and terminates.
|
||||
|
||||
|
||||
- **Invalid network layer protocol filter**
|
||||
|
||||
    If a string different from "IPv4", "IPv6" or "no filter" is provided (not case sensitive), the application raises an error and terminates.
|
||||
|
||||
    Note that not including the ```-n``` option is equal to provide ```-n "no filter"```.
|
||||
|
||||
|
||||
- **Invalid ouput file extension**
|
||||
|
||||
    There is no particular limitation on the output file name.
|
||||
|
||||
    However, if an invalid file extension is provided the file may result unreadable if the extension is not subsequently removed.
|
||||
|
||||
|
||||
- **Invalid transport layer protocol filter**
|
||||
|
||||
    If a string different from "TCP", "UDP" or "no filter" is provided (not case sensitive), the application raises an error and terminates.
|
||||
|
||||
    Note that not including the ```-t``` option is equal to provide ```-t "no filter"```.
|
||||
|
||||
|
||||
### Permissions errors
|
||||
|
||||
- **PcapError: Permission denied**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue