aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ip.h
AgeCommit message (Collapse)AuthorFilesLines
2024-02-15IPv6: Implementation of conversations with stream identifiersEugène Adell1-0/+1
2023-12-05IPv4: Implementation of conversations with stream identifiersEugène Adell1-0/+14
2023-10-31IPv6: Move IPv6 header definitions to epan/dissectorsJoão Valverde1-1/+2
2019-07-26HTTPS (almost) everywhere.Guy Harris1-1/+1
Change all wireshark.org URLs to use https. Fix some broken links while we're at it. Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c Reviewed-on: https://code.wireshark.org/review/34089 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-08-29IPv6: Add comment explaining frag_plenJoão Valverde1-2/+14
Change-Id: Id1a7e667c1a31901422e13f632c6ccb21a48fa99 Reviewed-on: https://code.wireshark.org/review/29343 Reviewed-by: João Valverde <j@v6e.pt>
2018-02-12dissectors: use SPDX identifiers.Dario Lombardo1-13/+1
Change-Id: I92c94448e6641716d03158a5f332c8b53709423a Reviewed-on: https://code.wireshark.org/review/25756 Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-09-03IPv6: Add routing extension header dissector tableJoão Valverde1-0/+7
Change-Id: I1cf462179f8c6cf8c8c881d2cbda8ebe667d9055 Reviewed-on: https://code.wireshark.org/review/23362 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2017-09-02IPv6: Split p_update_ipv6_pinfo() into partsJoão Valverde1-1/+3
For better flexibility when dissecting. Change-Id: I7bd7644d1b466510d670e3f19ee88f28a14b4ed3 Reviewed-on: https://code.wireshark.org/review/23361 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2017-09-02Have a single IPv6 tapJoão Valverde1-12/+59
Optimize code and open possibility for enriching IPv6 tap data. Change-Id: I5a204d7464cde32123d5bfe664cc9b6bcf08dbe1 Reviewed-on: https://code.wireshark.org/review/23340 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2017-09-01Avoid use of global protocol variablesJoão Valverde1-2/+0
Change-Id: I006d872a83649e72a6c83abac68cbae064457162 Reviewed-on: https://code.wireshark.org/review/23346 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-07-29Add initial RFC2780 IP Version lookup supportArjen Zonneveld1-0/+15
Add support for https://www.iana.org/assignments/version-numbers/version-numbers.xhtml IP Version lookups. Change-Id: I58a330ab9acba17356344df3ffeb94cc1b2b1443 Reviewed-on: https://code.wireshark.org/review/22821 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-28Implement registration of capture dissectors by nameJoão Valverde1-2/+0
Mirror it after protocol dissector API. Change-Id: I7985bcfa9e07654c7cf005efec94efc205d7a304 Reviewed-on: https://code.wireshark.org/review/18496 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-25IPv6: Use ipv6_pinfo_t instead of ws_ip to keep some stateJoão Valverde1-1/+1
To perform IPv6 defragmentation we need to compute the IPv6 fragment header payload length by subtracting the length of intermediate extension headers from the IPv6 payload length. Add a new frag_plen field to ipv6_pinfo_t to do that instead of (ab)using struct ws_ip. Note: The RFC 2460 rules for fragment header order are stricter than the code suggests but that shouldn't be a problem here. Change-Id: I76f3cb3a1a29d96b080d3d53c0f493f9d0b2786c Reviewed-on: https://code.wireshark.org/review/16637 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-07-24Pass the next protocol value to ip_try_dissect() as an argument.Guy Harris1-1/+1
That way, we don't rely on the ws_ip pointer being non-null. Based on changes from Ib73410fd8575ad6c836311bbda87a0580e5640ac. Change-Id: If8c437572c725481ac4148c8095a1a479b4fb0f8 Reviewed-on: https://code.wireshark.org/review/16617 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-07-23Update struct ws_ip with flow label and commentsJoão Valverde1-10/+11
Change field ip_v_hl to version. Change-Id: Ic7ce8d6d083f6413284a7b9ba91a2387b11b29fb Reviewed-on: https://code.wireshark.org/review/16555 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-07-18IPv6: Dissect as much as possible in case of errorsJoão Valverde1-1/+1
Don't require 40 bytes upfront, do it by field. Miscellaneous cleanups. Change-Id: Ib40b43eb3cf9aa52aa490cdabc6de26b0e977483 Reviewed-on: https://code.wireshark.org/review/16522 Reviewed-by: João Valverde <j@v6e.pt>
2016-07-18Rename iph->ip_p to iph->ip_nxtJoão Valverde1-1/+1
struct ws_ip is IP version agnostic. "ip_p" is too terse and less appropriate. Change-Id: I06b8740ab420e20781bf7b9efcf5dce19ad22ab2 Reviewed-on: https://code.wireshark.org/review/16519 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2015-12-17Create capture dissector "info" structure (capture_packet_info_t)Michael Mann1-1/+1
While it currently only contains packet_counts, it will hopefully stabilize the capture function signature if more fields are added. Change-Id: I003552c58043c7c2d67aec458187b12b233057e2 Reviewed-on: https://code.wireshark.org/review/12690 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-14Create capture dissector tables.Michael Mann1-1/+1
They are modeled after dissection dissector tables, but for the moment, don't have/need the flexibility. They are intended to be much simpler/faster than full dissection. The two most used/needed are "wtap_encap" and "ethertype", so they were the basis of starting to use and test capture dissector table API. Others may be added in the future. The "capture dissector" function signature needed a bit of tweeking to handling "claiming" of a packet. The current application of this is capture functions returning TRUE if they affected a "type" of packet count. Returning FALSE ends up considering the packet an "other" type. Change-Id: I81d06a6ccb2c03665f087258a46b9d78d513d6cd Reviewed-on: https://code.wireshark.org/review/12607 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-13Standardize the capture dissector function signature.Michael Mann1-1/+1
This will make it easier to mold into (capture) dissector tables. Change-Id: Iad63f2c2869782977992a3a072adb020be4b1818 Reviewed-on: https://code.wireshark.org/review/12587 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-18Make IPv4/IPv6 DiffServ fields uniformJoão Valverde1-2/+13
Replace DSCP/ECT/CE with DSCP/ECN for IPv6. Introduce short descriptions for DSCP/ECN values. Formating changes: - Make IPv4 and IPv6 as similar as possible. - Display short abbreviations only for "Differentiated Services Field". - Display DiffServ field as hex for IPv4. - Elide leading zeros from hex representation from DiffServ field for IPv6. - Display DSCP/ECN as decimal in subtree (same as "IP DSCP" column format). Change-Id: Ia69d11dc9c1d752eb2e269314287c885506b5353 Reviewed-on: https://code.wireshark.org/review/10360 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-15Add a newline for readabilityJoão Valverde1-0/+1
Change-Id: I7dbfa8f82454bd93ca5a66f22c29982923803918 Reviewed-on: https://code.wireshark.org/review/10043 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-05-03Add support for IPv6 heuristic dissectors.Jesse Gross1-0/+2
This adds limited support for heuristic subdissectors with IPv6. The initial motivation is STT but it should transparently work for other protocols using IP heuristic dissectors in a manner similar to the non-heuristic dissectors. The limitation is in regards to IPv6 extension headers. IPv6 has multiple checks against the next protocol table when determining when the protocol is an unknown extension header or not. This assumes that the check is cheap and has no side effects, neither of which is true for heuristic dissectors. As a compromise, this assumes that the next protocol is registered as protocol, even if is not the one that is ultimately dissected. Although not strictly correct, in practice this is true for existing protocols and likely future ones because the heuristic dissectors are overriding non-heuristic ones. Change-Id: Iff8cfc148ced5ca16191cc2b1879ad87e38d23cd Reviewed-on: https://code.wireshark.org/review/8197 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-09-29Add editor modelines; fix indentation as needed.Bill Meier1-0/+13
Change-Id: I1ad94654343e5a018a0b3159481d45ffb3a91263 Reviewed-on: https://code.wireshark.org/review/4363 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-08-09Clean up Internet checksum handling.Guy Harris1-1/+0
Add macros to set entries of a vec_t, one for use when you have a pointer to private data, and one for use when you have data in a tvbuff. The latter wraps the use of tvb_get_ptr(), so that you're not directly calling it in a dissector. Move ip_checksum() to epan/in_cksum.c, and add an ip_checksum_tvb() that wraps the use of tvb_get_ptr(). In the CARP dissector, give the length variable an unsigned type - there's no benefit to it being signed, and that requires some casts to be thrown around. In the DCCP dissector, check only against the coverage length to see if we have enough data, combine the "should we check the checksum?" check with the "*can* we check the checksum?" check in a single if, and throw a dissector assertion if the source network address type isn't IPv4 or IPv6. Get rid of inclues of <epan/in_cksum.h> in dissectors that don't use any of the Internet checksum routines. In the HIP dissector, make sure we have the data to calculate the checksum before doing so. Change-Id: I2f9674775dbb54c533d33082632809f7d32ec8ae Reviewed-on: https://code.wireshark.org/review/3517 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2013-11-05Replace pinfo->layer_names as a string with pinfo->layers as a wmem_list ofEvan Huus1-0/+2
protocol IDs. This is substantially more efficient, which means we can build it all the time rather than only if tree (in my benchmarks the extra time taken is not large enough to be statistically significant even over tens of thousands of packets). This fixes what was probably a bug in btobex that relied on layer_names for non-tree dissection. It also enables a much simpler fix for https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9303 svn path=/trunk/; revision=53089
2013-03-01Export libwireshark symbols using WS_DLL_PUBLIC defineBalint Reczey1-1/+3
Also remove old WS_VAR_IMPORT define and related Makefile magic everywhere in the project. svn path=/trunk/; revision=47992
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-06-18Integrate r43221 and 43222 with 43211. (Revert back to having onlyGerald Combs1-1/+0
dscp_vals_ext.) svn path=/trunk/; revision=43335
2012-06-12Revert r41952Jörg Mayer1-2/+0
BACKPORT to 1.8 svn path=/trunk/; revision=43222
2012-06-12Manually revert r41953Jörg Mayer1-1/+1
BACKPORT to 1.8 svn path=/trunk/; revision=43221
2012-06-11Use dscp_vals_ext everyplace (instead of dscp_vals);Bill Meier1-2/+1
(dscp_vals is now a static array in packet-ip.c) svn path=/trunk/; revision=43211
2012-06-11Create dscp_vals_ext value_str_ext (based upon dscp_vals); Use it as ↵Bill Meier1-0/+1
appropriate. Also: - use val_to_str_const() [instead of val_to_str()] in a few cases; - do some trivial formatting cleanup. svn path=/trunk/; revision=43204
2012-04-05Use common code to have the same hf field for DSCP in IPv4 and IPv6.Anders Broman1-0/+1
svn path=/trunk/; revision=41953
2012-04-05Use common code to add ip version to the tree.Anders Broman1-0/+2
svn path=/trunk/; revision=41952
2009-07-09Split packet-ip into packet-ip and packet-icmp.Stig Bjørlykke1-1/+2
Some cleanup in handles and ett entries. svn path=/trunk/; revision=29035
2009-05-20From Jakub Zawadzki via bug 3421:Gerald Combs1-2/+2
e_ip->ip_ttl is currently always set to 0, in attachment fix. I also (in same patch, sorry) submit cleanup to use ep_alloc() instead of static e_ip buffers, I didn't test it, but I hope it's ok. There's note about static buffers in doc/README.tapping, which should also be updated, but I don't feel so good with my English :) From me: Rename e_ip to ws_ip. Update the static buffers note in README.tapping. svn path=/trunk/; revision=28425
2006-12-19Correct a problem with media parameter dissection and add inforamtion about ↵Anders Broman1-1/+1
a number of packages. svn path=/trunk/; revision=20166
2006-05-21change a whole bunch of ethereal into wiresharkRonnie Sahlberg1-2/+2
svn path=/trunk/; revision=18196
2004-07-18Move dissectors to epan/dissectors directory.Gilbert Ramirez1-0/+48
Also move ncp222.py, x11-fields, process-x11-fields.pl, make-reg-dotc, and make-reg-dotc.py. Adjust #include lines in files that include packet-*.h files. svn path=/trunk/; revision=11410