aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ospf.c
AgeCommit message (Collapse)AuthorFilesLines
2004-01-06Make some variables to which 16-bit values are assigned wide enough toGuy Harris1-5/+5
hold those values. svn path=/trunk/; revision=9571
2004-01-05removed some MSVC warnings (level 3)Ulf Lamping1-3/+3
svn path=/trunk/; revision=9561
2003-12-21Compiling with -pedantic:Jörg Mayer1-2/+2
warning: comma at end of enumerator list svn path=/trunk/; revision=9383
2003-10-24From Taisuke Sasaki: fix offsets of metrics in Inter-Area-Prefix-LSAsGuy Harris1-4/+4
and Inter-Area-Router-LSAs. svn path=/trunk/; revision=8773
2003-10-07From Taisuke Sasaki: put in missing {} in an "if".Guy Harris1-2/+3
svn path=/trunk/; revision=8640
2003-05-08The authentication data field in "simple password" authentication is 64Guy Harris1-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. svn path=/trunk/; revision=7652
2003-01-21Reorder defines numerically within versionJörg Mayer1-2/+2
svn path=/trunk/; revision=6961
2002-12-02Don't cast away constness, and fix variable and structure memberGuy Harris1-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. svn path=/trunk/; revision=6726
2002-11-27From Andreas Trauer:Guy Harris1-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". svn path=/trunk/; revision=6677
2002-11-15From Taisuke Sasaki:Guy Harris1-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 svn path=/trunk/; revision=6638
2002-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-142/+142
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6117
2002-08-02Replace the types from sys/types.h and netinet/in.h by their glib.hJörg Mayer1-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. svn path=/trunk/; revision=5932
2002-05-30Don't pass "tvb_reported_length_remaining(tvb, offset)" as the fourthGuy Harris1-2/+3
argument to "tvb_new_subset()" - just use -1 if the subset tvbuff is to run to the end of the parent tvbuff. svn path=/trunk/; revision=5599
2002-05-14Show the opaque type as a field and, if the opaque type is TrafficGuy Harris1-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. svn path=/trunk/; revision=5461
2002-05-14Add some comments.Guy Harris1-1/+8
svn path=/trunk/; revision=5459
2002-05-13From Motonori Shindo:Guy Harris1-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. svn path=/trunk/; revision=5456
2002-05-11Handle an LSA length <= the length of an LSA header.Guy Harris1-1/+3
svn path=/trunk/; revision=5447
2002-05-11Get rid of an unused variable.Guy Harris1-3/+1
svn path=/trunk/; revision=5442
2002-05-10- Added support for LMP draft versions -02 and -03 (selectable inAshok Narayanan1-34/+205
protocol preferences) - Added OSPF display filtering support, including OSPF/TE extensions svn path=/trunk/; revision=5437
2002-04-25Use "%.10g", rather than "%f", for floating-point numbers. That willGuy Harris1-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. svn path=/trunk/; revision=5248
2002-04-24Use "tvb_get_ntohieee_float()" to fetch floating-point numbers.Guy Harris1-12/+11
Display those numbers as floating-point. svn path=/trunk/; revision=5241
2002-04-14From Joerg Mayer:Guy Harris1-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. svn path=/trunk/; revision=5162
2002-02-19Fixed small bug in translation of IXCD in OSPF GMPLS LSA.Ashok Narayanan1-3/+3
svn path=/trunk/; revision=4759
2002-02-14"tvb_ieee_to_long()" returns a "long", not a "long long", so you can'tGuy Harris1-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. svn path=/trunk/; revision=4731
2002-02-14GMPLS extensions for OSPF Opaque LSAsAshok Narayanan1-3/+58
svn path=/trunk/; revision=4730
2002-01-24Replace a bunch of "tvb_length()" and "tvb_length_remaining()" calls inGuy Harris1-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. svn path=/trunk/; revision=4605
2002-01-21Include files from the "epan" directory and subdirectories thereof withGuy Harris1-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/"). svn path=/trunk/; revision=4586
2001-12-10Move the pointer to the "column_info" structure in the "frame_data"Guy Harris1-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. svn path=/trunk/; revision=4370
2001-12-05From Taisuke Sasaki: fix the handling of the metric and referenced LSGuy Harris1-5/+5
type fields in OSPFv3 packets. Clean up white space. svn path=/trunk/; revision=4338
2001-12-03Make "dissector_add()", "dissector_delete()", and "dissector_change()"Guy Harris1-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. svn path=/trunk/; revision=4308
2001-11-28OSPFv3 checksum fix, from Taisuke Sasaki.Guy Harris1-19/+50
svn path=/trunk/; revision=4289
2001-11-26Moved from using dissect_data() to using call_dissector()Ed Warnicke1-2/+5
svn path=/trunk/; revision=4269
2001-11-21Get rid of some unused variables.Guy Harris1-13/+1
svn path=/trunk/; revision=4241
2001-10-27Section D.4.3 "Generating Cryptographic authentication" of RFC 2328 saysGuy Harris1-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". svn path=/trunk/; revision=4090
2001-09-14Get rid of a trailing blank.Guy Harris1-3/+3
svn path=/trunk/; revision=3931
2001-09-13Fixes to the OSPFv3 dissector, from Palle Lyckegaard.Guy Harris1-16/+14
svn path=/trunk/; revision=3928
2001-09-11Fix some bugs (and some indentation).Guy Harris1-10/+8
svn path=/trunk/; revision=3918
2001-09-05OSPFv3 support, from Palle Lyckegaard.Guy Harris1-191/+950
svn path=/trunk/; revision=3911
2001-07-08Support for draft-rosen-vpn-ospf-bgp-mpls and for additional BGPGuy Harris1-1/+7
extended communities, from Aamer Akhter. svn path=/trunk/; revision=3667
2001-07-03Use the "pinfo" argument, rather than the global "pi", to refer to theGuy Harris1-3/+2
packet information in tvbuffified dissectors. svn path=/trunk/; revision=3645
2001-05-14Updates to OSPF for the changes between drafts 3 and 4 ofGuy Harris1-5/+7
draft-katz-yeung-ospf-traffic, from Michael Rozhavsky. svn path=/trunk/; revision=3412
2001-05-02Additional OSPF LSA types and opaque-options flag, from MichaelGuy Harris1-7/+21
Rozhavsky. svn path=/trunk/; revision=3395
2001-04-23Move the declarations of IP protocol numbers to "ipproto.h" fromGuy Harris1-3/+3
"packet-ip.h". Fix Gerald's address in some files while we're at it. svn path=/trunk/; revision=3366
2001-02-04Tvbuffify the RSVP dissector.Guy Harris1-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. svn path=/trunk/; revision=2987
2001-01-22Remove more "CHECK_DISPLAY_AS_DATA()" calls and "pinfo->current_proto ="Guy Harris1-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. svn path=/trunk/; revision=2929
2001-01-09Add an additional "protocol index" argument to "{old_}dissector_add()",Guy Harris1-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....) svn path=/trunk/; revision=2849
2001-01-03Ensure that all value_string arrays end in {0, NULL}. Dissectors got awayGilbert Ramirez1-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. svn path=/trunk/; revision=2817
2001-01-03Have "proto_register_protocol()" build a list of data structures forGuy Harris1-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. svn path=/trunk/; revision=2810
2000-12-28Always put the packet type in the Info column.Guy Harris1-4/+3
svn path=/trunk/; revision=2789
2000-12-27Tvbuffify the RIP and OSPF dissectors.Guy Harris1-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()". svn path=/trunk/; revision=2787