aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ip.h
AgeCommit message (Collapse)AuthorFilesLines
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