summaryrefslogtreecommitdiff
path: root/astraceroute.c
AgeCommit message (Collapse)AuthorFilesLines
2014-05-27geoip: Pass struct sockaddr_in{,6} as pointer instead of by valueTobias Klauser1-8/+8
Change the interface to the geoip_* functions to take a pointer to a struct sockaddr_in{,6} instead of the struct itself. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2014-05-09ring: Merge common ring_{rx,tx} initialization into own functionTobias Klauser1-2/+2
Instead of having to perform the individual steps to initialize a ring and open coding them in multiple places, provide convenience functions to do all at once. This has the nice side effect of allowing to make most of these *_{rx,tx}_ring() functions static in their respective module. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2014-03-16Typo: longitudeKartik Mistry1-1/+1
Fixed typo in astraceroute.* files. Signed-off-by: Kartik Mistry <kartik.mistry@gmail.com>
2014-02-22astraceroute: Exit gracefully for all possible termination signalsTobias Klauser1-0/+4
Handle all termination signals that we're allowed to handle (SIGKILL can't be handled) in order to exit gracefully in any regular termination case. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-08-21astraceroute: Support binding to a specific IP address.Oliver Smith1-4/+28
In a situation where the IP that you wish to use as the source address differs from the interface it needs to be sent from, it is now possible to manually specify an address to bind to whilst still being able to specify the physical interface to send from. [Fixed up whitespace, minor coding style and added man-page entry --DB] Signed-off-by: Oliver Smith <oliver@zerolag.com> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-08-08astraceroute: Fix compiler warnings with "-W -Wall -Wextra"Tobias Klauser1-13/+17
Fix the following compiler warnings that occur when building with "-W -Wall -Wextra": astraceroute.c: In function ‘__assemble_data’: astraceroute.c:255:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] astraceroute.c:262:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] astraceroute.c: In function ‘check_ipv4’: astraceroute.c:425:56: warning: unused parameter ‘ttl’ [-Wunused-parameter] astraceroute.c: In function ‘handle_ipv4’: astraceroute.c:451:49: warning: unused parameter ‘len’ [-Wunused-parameter] astraceroute.c: In function ‘check_ipv6’: astraceroute.c:511:49: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] astraceroute.c:491:56: warning: unused parameter ‘ttl’ [-Wunused-parameter] astraceroute.c: In function ‘handle_ipv6’: astraceroute.c:517:49: warning: unused parameter ‘len’ [-Wunused-parameter] astraceroute.c: In function ‘__process_node’: astraceroute.c:690:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] astraceroute.c: In function ‘__process_time’: astraceroute.c:738:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] astraceroute.c:755:9: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] astraceroute.c:765:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] astraceroute.c: In function ‘__process_ttl’: astraceroute.c:846:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] astraceroute.c: In function ‘main’: astraceroute.c:1060:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-08-08astraceroute: Use size_t for struct members storing packet lengthsTobias Klauser1-5/+6
Packet lengths are strictly positive and the functions dealing with them (sendto(), recvfrom() etc.) take size_t, thus use size_t. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-07-09all: show git id in --version informationDaniel Borkmann1-2/+4
In order to be able to better track regressions or to give support, let us track the Git id as well in version information. This makes the ``--version'' switch actually useful. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-06-04xutils: eliminate xutils, move rest to epoll2Daniel Borkmann1-1/+0
Finally eliminate xutils.{c,h} and move the rest to epoll2. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-06-04sig: add signal handling functionsDaniel Borkmann1-0/+1
Add an extra file for signal handling functions. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-06-04sock: add socket management functionsDaniel Borkmann1-0/+1
Remove them from xutils, and add them to socket management. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-06-04xutils: move device management functions out of xutilsDaniel Borkmann1-0/+1
Move those functions out so that they can be more easily maintained in its separate file. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-06-04xio: rename xio to ioops and reduce its includesDaniel Borkmann1-1/+1
Rename xio to ioops (io-ops) and boil its include files down to a minimum. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-06-04xio: add ioexact operationsDaniel Borkmann1-1/+1
Break this out so that we only need to have sigint non-static where it is really needed. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-05-23make: include build nameDaniel Borkmann1-1/+1
Include long version string into tools when called with --version. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-05-17astraceroute: Add __noreturn attribute to exiting functionsTobias Klauser1-2/+2
Add the __noreturn attribute to all functions which wont return but call die() themselves to exit(). Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-05-16astraceroute: Mention exit after printing information in built-in helpTobias Klauser1-2/+2
Mention the fact that astraceroute exits after printing either the help of the version information. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-03-16misc: remove dead/unreachable code from switch statementsDaniel Borkmann1-2/+0
Remove various unreachable sections from the switch statements. This was detected by the coverty scanner. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16astraceroute: fix getnameinfo argumentsDaniel Borkmann1-4/+4
Coverty detected a misuse of the getnameinfo API, thus, we need to fix the length parameter. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-15all: import netsniff-ng 0.5.8-rc0 sourceDaniel Borkmann1-0/+1077
We decided to get rid of the old Git history and start a new one for several reasons: *) Allow / enforce only high-quality commits (which was not the case for many commits in the history), have a policy that is more close to the one from the Linux kernel. With high quality commits, we mean code that is logically split into commits and commit messages that are signed-off and have a proper subject and message body. We do not allow automatic Github merges anymore, since they are total bullshit. However, we will either cherry-pick your patches or pull them manually. *) The old archive was about ~27MB for no particular good reason. This basically derived from the bad decision that also some PDF files where stored there. From this moment onwards, no binary objects are allowed to be stored in this repository anymore. The old archive is not wiped away from the Internet. You will still be able to find it, e.g. on git.cryptoism.org etc. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>