README LibICMP is a small and simple API for sending and receiving ICMP packets from your application. Currently only IPv4 is supported, so any patches for adding support for IPv6 are most welcome! For some useful examples, see the included iping.c and example.c, the former makes use of more features and the latter is more bare bones. LibICMP was initally developed by Tim Lawless and later refactored and extended upon by Joachim Wiberg.
Copyright (c) 2000 Tim Lawless <tim.lawless@usm.edu> Copyright (c) 2011-2022 Joachim Wiberg <troglobit@gmail.com> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Contributing to libicmp
Thank you for considering contributing back to the community!
There are a few things we would like you to consider when filing an issue or making a pull request with this project:
-
If you are filing a bug report or feature request
Please take the time to check if an issue already has been filed matching your problem
-
What version are you running, have you tried the latest release?
UNIX distributions often package and test software for their particular brand. If you are using a pre-packaged version, then please file a bug with that distribution instead.
-
Coding Style
Lines are allowed to be longer than 72 characters these days, there is no enforced maximum line length.
Tip: Always submit code that follows the style of surrounding code!
The coding style itself is strictly Linux KNF, like GIT it is becoming a de facto standard for C programming
https://www.kernel.org/doc/Documentation/CodingStyle
-
Logical Change Sets
Changes should be broken down into logical units that add a feature or fix a bug. Keep changes separate from each other and do not mix a bug fix with a whitespace cleanup or a new feature addition.
This is important not only for readilibity, or for the possibility of maintainers to revert or isolate changes when bisecting for a bug. It also increases the chances of having your change accepted.
-
Commit messages
Commit messages exist to track why a change was made. Try to be as clear and concise as possible in your commit messages, and always, be proud of your work and set up a proper GIT identity for your commits:
git config --global user.name "J. Random Hacker" git config --global user.email random.j.hacker@example.comSee this helpful guide for how to write simple, readable commit messages, or have at least a look at the below example.
http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
Example
Example commit message from the Pro Git online book, notice
how git commit -s is used to automatically add a Signed-off-by:
Capitalized, short (50 chars or less) summary
More detailed explanatory text, if necessary. Wrap it to about 72
characters or so. In some contexts, the first line is treated as the
subject of an email and the rest of the text as the body. The blank
line separating the summary from the body is critical (unless you omit
the body entirely); tools like rebase can get confused if you run the
two together.
Write your commit message in the imperative: "Fix bug" and not "Fixed bug"
or "Fixes bug." This convention matches up with commit messages generated
by commands like git merge and git revert.
Further paragraphs come after blank lines.
- Bullet points are okay, too
- Typically a hyphen or asterisk is used for the bullet, followed by a
single space, with blank lines in between, but conventions vary here
- Use a hanging indent
Signed-off-by: J. Random Hacker <random.j.hacker@example.com>