Skip to content

Commit

Permalink
Merge pull request #14 from insomniacslk/getopt
Browse files Browse the repository at this point in the history
Replaced docopt with getopt
  • Loading branch information
insomniacslk authored Oct 2, 2016
2 parents 294aaa0 + 7da9870 commit ef968c4
Show file tree
Hide file tree
Showing 9 changed files with 88 additions and 1,953 deletions.
13 changes: 3 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
cmake_minimum_required (VERSION 2.8)
project (dublin-traceroute)

# TODO sync this with VERSION in include/dublintraceroute/common.h
set (dublin-traceroute_VERSION_MAJOR_0)
set (dublin-traceroute_VERSION_MINOR_3)
set (dublin-traceroute_VERSION_PATCH_2)
set (dublin-traceroute_VERSION_PATCH_3)

# ensure that /usr/local is used to find dependencies. This is especially
# necessary for brew on OSX and for libraries installed manually under
Expand All @@ -12,7 +13,6 @@ list(APPEND CMAKE_PREFIX_PATH /usr/local)

include_directories(
"${PROJECT_SOURCE_DIR}/include"
"${PROJECT_SOURCE_DIR}/include/docopt"
)

add_library(dublintraceroute SHARED
Expand Down Expand Up @@ -40,14 +40,7 @@ endif (${libtins_FOUND})

pkg_search_module(JSONCPP REQUIRED jsoncpp)

add_executable(dublin-traceroute
src/main.cc
src/docopt/docopt.cpp
include/docopt/docopt.h
include/docopt/docopt_private.h
include/docopt/docopt_util.h
include/docopt/docopt_value.h
)
add_executable(dublin-traceroute src/main.cc)
target_link_libraries(dublintraceroute ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(dublin-traceroute dublintraceroute)
target_link_libraries(dublintraceroute tins)
Expand Down
10 changes: 8 additions & 2 deletions documentation/readme/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,31 +214,37 @@ CXX=clang++ make

## Running

`dublin-traceroute` requires raw sockets. This means that you either have to run it as `root` (via `sudo` or setuid on the executable) or by using the `CAP_NET_RAW` capability.
`dublin-traceroute` requires raw sockets. This means that you should need the CAP_NET_RAW capability set (see `setcap(8)`). Alternatively you can run it as root, but this is not recommended, and `dublin-traceroute` will print a warning.

The usage is very simple, and explained in the help message:

```bash
$ ./dublin-traceroute --help
Dublin Traceroute
Written by Andrea Barberio - https://insomniac.slackware.it

Usage:
dublin-traceroute <target> [--sport=SRC_PORT]
[--dport=dest_base_port]
[--npaths=num_paths]
[--max-ttl=max_ttl]
[--broken-nat]
[--help]
[--version]

Options:
-h --help this help
-v --version print the version of Dublin Traceroute
-s SRC_PORT --sport=SRC_PORT the source port to send packets from
-d DST_PORT --dport=DST_PORT the base destination port to send packets to
-n NPATHS --npaths=NPATHS the number of paths to probe
-t MAX_TTL --max-ttl=MAX_TTL the maximum TTL to probe
-b --broken-nat the network has a broken NAT configuration (e.g. no payload fixup). May help when you see only a few hops
-b --broken-nat the network has a broken NAT configuration (e.g. no payload fixup). Try this if you see less hops than expected


See documentation at https://dublin-traceroute.net
Please report bugs at https://github.com/insomniacslk/dublin-traceroute
Additional features in the Python module at https://github.com/insomniacslk/python-dublin-traceroute
```
## What is missing?
Expand Down
88 changes: 0 additions & 88 deletions include/docopt/docopt.h

This file was deleted.

Loading

0 comments on commit ef968c4

Please sign in to comment.