aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ospf.c
AgeCommit message (Collapse)AuthorFilesLines
2003-12-21Compiling with -pedantic:jmayer1-2/+2
warning: comma at end of enumerator list git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9383 f5534014-38df-0310-8fa8-9805f1628bb7
2003-10-24From Taisuke Sasaki: fix offsets of metrics in Inter-Area-Prefix-LSAsguy1-4/+4
and Inter-Area-Router-LSAs. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@8773 f5534014-38df-0310-8fa8-9805f1628bb7
2003-10-07From Taisuke Sasaki: put in missing {} in an "if".guy1-2/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@8640 f5534014-38df-0310-8fa8-9805f1628bb7
2003-05-08The authentication data field in "simple password" authentication is 64guy1-3/+3
bits, or 8 bytes; that means that, if it's to be interpreted as a string, it should be extracted into an 8+1 byte buffer, leaving room for a trailing '\0', and that means the buffer size argument to "tvb_get_nstringz0()" should be 8+1 as well. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7652 f5534014-38df-0310-8fa8-9805f1628bb7
2003-01-21Reorder defines numerically within versionjmayer1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6961 f5534014-38df-0310-8fa8-9805f1628bb7
2002-12-02Don't cast away constness, and fix variable and structure memberguy1-3/+3
qualifiers as necessary to ensure that we don't have to. "strcmp()", "strcasecmp()", and "memcmp()" don't return booleans; don't test their results as if they did. Use "guint8", not "guchar", for a pointer to (one or more) 8-bit bytes. Update Michael Tuexen's e-mail address. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6726 f5534014-38df-0310-8fa8-9805f1628bb7
2002-11-27From Andreas Trauer:guy1-8/+31
In a Router-LSA in an OSPF LS Update packet it was difficult for the untrained to associate the informations in the link list to the single links. This patch adds a subtree for each link with a short summary in the tree "title". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6677 f5534014-38df-0310-8fa8-9805f1628bb7
2002-11-15From Taisuke Sasaki:guy1-4/+4
In OSPF(both OSPFv2 and OSPFv3), I think it is popular that 1) LS Sequence is represented in %0x08x format 2) External Route Tag is represented in %u format git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6638 f5534014-38df-0310-8fa8-9805f1628bb7
2002-08-28Removed trailing whitespaces from .h and .c files using thejmayer1-142/+142
winapi_cleanup tool written by Patrik Stridvall for the wine project. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6117 f5534014-38df-0310-8fa8-9805f1628bb7
2002-08-02Replace the types from sys/types.h and netinet/in.h by their glib.hjmayer1-11/+3
equivalents for the toplevel directory. The removal of winsock2.h will hopefully not cause any problems under MSVC++, as those files using struct timeval still include wtap.h, which still includes winsock2.h. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5932 f5534014-38df-0310-8fa8-9805f1628bb7
2002-05-30Don't pass "tvb_reported_length_remaining(tvb, offset)" as the fourthguy1-2/+3
argument to "tvb_new_subset()" - just use -1 if the subset tvbuff is to run to the end of the parent tvbuff. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5599 f5534014-38df-0310-8fa8-9805f1628bb7
2002-05-14Show the opaque type as a field and, if the opaque type is Trafficguy1-9/+35
Engineering LSA, show the rest of the LSA ID as a reserved field and an instance, as per draft-katz-yeung-ospf-traffic-06.txt. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5461 f5534014-38df-0310-8fa8-9805f1628bb7
2002-05-14Add some comments.guy1-1/+8
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5459 f5534014-38df-0310-8fa8-9805f1628bb7
2002-05-13From Motonori Shindo:guy1-8/+6
1) OSPF Link State Request packet in V2 has 4-octets LS type field whereas 2-octets MBZ and 2-octets LS type field in V3. 2) 6th argument to proto_tree_add_item() has to be boolean value. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5456 f5534014-38df-0310-8fa8-9805f1628bb7
2002-05-11Handle an LSA length <= the length of an LSA header.guy1-1/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5447 f5534014-38df-0310-8fa8-9805f1628bb7
2002-05-11Get rid of an unused variable.guy1-3/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5442 f5534014-38df-0310-8fa8-9805f1628bb7
2002-05-10- Added support for LMP draft versions -02 and -03 (selectable inashokn1-34/+205
protocol preferences) - Added OSPF display filtering support, including OSPF/TE extensions git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5437 f5534014-38df-0310-8fa8-9805f1628bb7
2002-04-25Use "%.10g", rather than "%f", for floating-point numbers. That willguy1-5/+5
display values that would fit in a 32-bit integer as integers, leaving out all trailing zeroes after the decimal point (and leaving out the decimal point if there are no digits left after the decimal point once trailing zeroes are removed), and will use scientific notation for small fractions or large numbers. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5248 f5534014-38df-0310-8fa8-9805f1628bb7
2002-04-24Use "tvb_get_ntohieee_float()" to fetch floating-point numbers.guy1-12/+11
Display those numbers as floating-point. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5241 f5534014-38df-0310-8fa8-9805f1628bb7
2002-04-14From Joerg Mayer:guy1-8/+3
Declares some variables static. Creates a new include file packet-rsvp.h, and make use of it (change some extern decls to #inlcude). Move the file packet-pgm.h into packet-pgm.c as it is not used by anything outside packet-pgm.c. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5162 f5534014-38df-0310-8fa8-9805f1628bb7
2002-02-19Fixed small bug in translation of IXCD in OSPF GMPLS LSA.ashokn1-3/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4759 f5534014-38df-0310-8fa8-9805f1628bb7
2002-02-14"tvb_ieee_to_long()" returns a "long", not a "long long", so you can'tguy1-5/+5
print it with "%lld". In any case, not all platforms on which Ethereal can be built support 64-bit integral data types, and, even on those that do, not all of them support "%ll[doux]" as the format for printing those types, so do the arithmetic in floating point by multiplying the bytes/s values by 8.0, and print with "%.0f" instead. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4731 f5534014-38df-0310-8fa8-9805f1628bb7
2002-02-14GMPLS extensions for OSPF Opaque LSAsashokn1-3/+58
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4730 f5534014-38df-0310-8fa8-9805f1628bb7
2002-01-24Replace a bunch of "tvb_length()" and "tvb_length_remaining()" calls inguy1-10/+4
arguments to "proto_tree_add_text()", and to "proto_tree_add_XXX()" calls that add FT_NONE or FT_PROTO items to the protocol tree, with -1. Replace some calls to "tvb_length()" or "tvb_length_remaining()" with calls to "tvb_reported_length()" and "tvb_reported_length_remaining()", as those give the actual length of the data in the packet, not just the data that happened to be captured. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4605 f5534014-38df-0310-8fa8-9805f1628bb7
2002-01-21Include files from the "epan" directory and subdirectories thereof withguy1-2/+2
"epan/..." pathnames, so as to avoid collisions with header files in any of the directories in which we look (e.g., "proto.h", as some other package has its own "proto.h" file which it installs in the top-level include directory). Don't add "-I" flags to search "epan", as that's no longer necessary (and we want includes of "epan" headers to fail if the "epan/" is left out, so that we don't re-introduce includes lacking "epan/"). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4586 f5534014-38df-0310-8fa8-9805f1628bb7
2001-12-10Move the pointer to the "column_info" structure in the "frame_data"guy1-7/+7
structure to the "packet_info" structure; only stuff that's permanently stored with each frame should be in the "frame_data" structure, and the "column_info" structure is not guaranteed to hold the column values for that frame at all times - it was only in the "frame_data" structure so that it could be passed to dissectors, and, as all dissectors are now passed a pointer to a "packet_info" structure, it could just as well be put in the "packet_info" structure. That saves memory, by shrinking the "frame_data" structure (there's one of those per frame), and also lets us clean up the code a bit. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4370 f5534014-38df-0310-8fa8-9805f1628bb7
2001-12-05From Taisuke Sasaki: fix the handling of the metric and referenced LSguy1-5/+5
type fields in OSPFv3 packets. Clean up white space. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4338 f5534014-38df-0310-8fa8-9805f1628bb7
2001-12-03Make "dissector_add()", "dissector_delete()", and "dissector_change()"guy1-2/+5
take a dissector handle as an argument, rather than a pointer to a dissector function and a protocol ID. Associate dissector handles with dissector table entries. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4308 f5534014-38df-0310-8fa8-9805f1628bb7
2001-11-28OSPFv3 checksum fix, from Taisuke Sasaki.guy1-19/+50
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4289 f5534014-38df-0310-8fa8-9805f1628bb7
2001-11-26Moved from using dissect_data() to using call_dissector()hagbard1-2/+5
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4269 f5534014-38df-0310-8fa8-9805f1628bb7
2001-11-21Get rid of some unused variables.guy1-13/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4241 f5534014-38df-0310-8fa8-9805f1628bb7
2001-10-27Section D.4.3 "Generating Cryptographic authentication" of RFC 2328 saysguy1-2/+6
that, when using cryptographic authentication, "The checksum field in the standard OSPF header is not calculated, but is instead set to 0"; treat a packet checksum value of 0 as meaning "no checksum present". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4090 f5534014-38df-0310-8fa8-9805f1628bb7
2001-09-14Get rid of a trailing blank.guy1-3/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3931 f5534014-38df-0310-8fa8-9805f1628bb7
2001-09-13Fixes to the OSPFv3 dissector, from Palle Lyckegaard.guy1-16/+14
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3928 f5534014-38df-0310-8fa8-9805f1628bb7
2001-09-11Fix some bugs (and some indentation).guy1-10/+8
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3918 f5534014-38df-0310-8fa8-9805f1628bb7
2001-09-05OSPFv3 support, from Palle Lyckegaard.guy1-191/+950
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3911 f5534014-38df-0310-8fa8-9805f1628bb7
2001-07-08Support for draft-rosen-vpn-ospf-bgp-mpls and for additional BGPguy1-1/+7
extended communities, from Aamer Akhter. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3667 f5534014-38df-0310-8fa8-9805f1628bb7
2001-07-03Use the "pinfo" argument, rather than the global "pi", to refer to theguy1-3/+2
packet information in tvbuffified dissectors. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3645 f5534014-38df-0310-8fa8-9805f1628bb7
2001-05-14Updates to OSPF for the changes between drafts 3 and 4 ofguy1-5/+7
draft-katz-yeung-ospf-traffic, from Michael Rozhavsky. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3412 f5534014-38df-0310-8fa8-9805f1628bb7
2001-05-02Additional OSPF LSA types and opaque-options flag, from Michaelguy1-7/+21
Rozhavsky. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3395 f5534014-38df-0310-8fa8-9805f1628bb7
2001-04-23Move the declarations of IP protocol numbers to "ipproto.h" fromguy1-3/+3
"packet-ip.h". Fix Gerald's address in some files while we're at it. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3366 f5534014-38df-0310-8fa8-9805f1628bb7
2001-02-04Tvbuffify the RSVP dissector.guy1-4/+4
Display the message checksum, and check it if possible. Fix some IPv6 entries to be 16 bytes long, not 4 bytes long. Make the routine to fetch an IEEE floating point number and turn it into a "long" take a tvbuff pointer and offset rather than a pointer to data. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2987 f5534014-38df-0310-8fa8-9805f1628bb7
2001-01-22Remove more "CHECK_DISPLAY_AS_DATA()" calls and "pinfo->current_proto ="guy1-6/+5
statements. Move the setting of the Protocol column in various dissectors before anything is fetched from the packet, and also clear the Info column at that point in those and some other dissectors, so that if an exception is thrown, the columns don't reflect the previous protocol. Make the IP dissector static, as it's called only via dissector tables or dissector handles. Also make the "dissect the TOS field as the DiffServ DS field" flag static, as it's not referred to outside of "packet-ip.c". In the NCP dissector, refer to the port type through "pinfo" rather than through the global "pi", as it's a tvbuffified dissector. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2929 f5534014-38df-0310-8fa8-9805f1628bb7
2001-01-09Add an additional "protocol index" argument to "{old_}dissector_add()",guy1-2/+2
"{old_}heur_dissector_add()", "{old_}conv_dissector_add()", and "register_dissector()", so that an entry in those tables has associated with it the protocol index of the protocol the dissector handles (or -1, if there is no protocol index for it). This is for future use in a number of places. (Arguably, "proto_register_protocol()" should take a dissector pointer as an argument, but 1) it'd have to handle both regular and heuristic dissectors; 2) making it take either a "dissector_t" or a union of that and a "heur_dissector_t" introduces some painful header-file interdependencies so I'm punting on that for now. As with other Ethereal internal APIs, these APIs are subject to change in the future, at least until Ethereal 1.0 comes out....) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2849 f5534014-38df-0310-8fa8-9805f1628bb7
2001-01-03Ensure that all value_string arrays end in {0, NULL}. Dissectors got awaygram1-1/+2
with not terminating their arrays because they knew the limits of the value used to look up strings in the value_string array, but the dfilter_expr_dlg does not know these limits and must rely on the terminating {0, NULL} record. Also, in SNA fixed a bug in which a field should have been defined as FT_UINT8 but was defined as FT_BOOLEAN. In WTP, fixed a value string which had duplicate keys. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2817 f5534014-38df-0310-8fa8-9805f1628bb7
2001-01-03Have "proto_register_protocol()" build a list of data structures forguy1-2/+3
protocols, in addition to adding structures to the list of filterable fields. Give it an extra argument that specifies a "short name" for the protocol, for use in such places as pinfo->current_proto; the dialog box for constructing filters; the preferences tab for the protocol; and so on (although we're not yet using it in all those places). Make the preference name that appears in the preferences file and the command line for the DIAMETER protocol "diameter", not "Diameter"; the convention is that the name in question be all-lower-case. Make some routines and variables that aren't exported static. Update a comment in the ICP dissector to make it clear that the dissector won't see fragments other than the first fragment of a fragmented datagram. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2810 f5534014-38df-0310-8fa8-9805f1628bb7
2000-12-28Always put the packet type in the Info column.guy1-4/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2789 f5534014-38df-0310-8fa8-9805f1628bb7
2000-12-27Tvbuffify the RIP and OSPF dissectors.guy1-645/+742
Change them to use facilities in Ethereal that were probably not present when they were originally written, e.g. routines to fetch 24-bit integers and to dump a bunch of raw bytes in hex. Redo them to extract data from the packet as they dissect it, rather than extracting an entire data structure at once; that way, it may be able to dissect a structure not all of which is in the packet. Dissect a bit more of the type-of-service metrics etc. in OSPF packets. Make "tvb_length_remaining()" return a "gint", not a "guint"; it returns -1 if the offset is past the end of the tvbuff. Add a "tvb_reported_length_remaining()" routine, similar to "tvb_length_remaining()". Use it instead of just subtracting an offset from "tvb_reported_length()". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2787 f5534014-38df-0310-8fa8-9805f1628bb7
2000-12-14Check the checksum on OSPF packets, if possible.guy1-3/+44
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2760 f5534014-38df-0310-8fa8-9805f1628bb7
2000-11-19For each column, have both a buffer into which strings for that columnguy1-2/+2
can be put, and a pointer to the string for the column, which might or might not point to that buffer. Add a routine "col_set_str()", which sets the string for the column to the string passed to it as an argument; it should only be handed a static string (a string constant would be ideal). It doesn't do any copying, so it's faster than "col_add_str()". Make the routines that append to columns check whether the pointer to the string for the column points to the buffer for the column and, if not, copy the string for the column to the buffer for the column so that you can append to it (so you can use "col_set_str()" and then use "col_append_str()" or "col_append_fstr()"). Convert a bunch of "col_add_str()" calls that take a string constant as an argument to "col_set_str()" calls. Convert some "col_add_fstr()" calls that take a string constant as the only argument - i.e., the format string doesn't have any "%" slots into which to put strings for subsequent arguments to "col_set_str()" calls (those calls are just like "col_add_str()" calls). Replace an END_OF_FRAME reference in a tvbuffified dissector with a "tvb_length(tvb)" call. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2670 f5534014-38df-0310-8fa8-9805f1628bb7