aboutsummaryrefslogtreecommitdiffstats
path: root/packet-dns.c
AgeCommit message (Collapse)AuthorFilesLines
2004-01-23From David Fort: NSEC RRs aren't the same as NXT RRs - dissect themGuy Harris1-2/+49
differently. Remove a redundant "break" statement. svn path=/trunk/; revision=9811
2004-01-23From David Fort: add support for RFC2535bis records.Guy Harris1-6/+27
svn path=/trunk/; revision=9793
2004-01-20From David Fort: use the checksum algorithm when computing the key IDGuy Harris1-15/+8
for all algorithms other than RSAMD5. Make "compute_key_id()" return a "guint16", as the key IDs are 16-bit and as it can no longer return -1 meaning "I don't know how to compute the key ID for that algorithm". svn path=/trunk/; revision=9746
2004-01-05removed some MSVC warnings (level 3)Ulf Lamping1-3/+3
svn path=/trunk/; revision=9561
2003-12-19From David Fort: update some comments now that RFC 3658 is out, and fixGuy Harris1-4/+4
a typo in the AUTHORS file. svn path=/trunk/; revision=9363
2003-12-17Only dissect the key in TKEY RRs if it's present (i.e., has a non-zeroGuy Harris1-35/+42
length) - zero-length keys "shouldn't happen", but what the heck.... svn path=/trunk/; revision=9328
2003-12-17For unknown key IDs, show the algorithm symbolically if possible.Guy Harris1-2/+3
svn path=/trunk/; revision=9317
2003-12-17Update a comment.Guy Harris1-8/+5
svn path=/trunk/; revision=9316
2003-12-17Give the key and other lengths and data names that match the names inGuy Harris1-5/+5
RFC 2930. svn path=/trunk/; revision=9315
2003-12-17Put the key and other lengths into the protocol tree for TKEY RRs.Guy Harris1-1/+5
svn path=/trunk/; revision=9314
2003-12-12Add some checks to make sure we're not running past the end of the RRGuy Harris1-41/+144
we're dissecting. (Some RR's still don't do that check, as they don't maintain an "rr_len" variable, and as "get_dns_name()" doesn't do any length checking.) That obviates the need for having "compute_key_id()" check the length, as we won't even get to calling it if the RR is too short. Have it still do a check for sanity, but just abort if the check fails, and have it return -1 if the algorithm is unsupported. Don't bother processing T_CERT RRs if we're not building a protocol tree, don't fetch data from a T_CERT RR until we put it into the tree, and fix the bug that change found, namely that we were using the wrong variable in the "val_to_str()" call for the certificate type. svn path=/trunk/; revision=9250
2003-12-11Have "compute_key_id()" return different values for different errors,Guy Harris1-6/+11
and have its caller put an entry into the tree for "we don't support the algorithm" (the "RR too short" error is a "can't happen"). svn path=/trunk/; revision=9243
2003-12-11replaced type u_int32_t by glib's guint32 (to satisfy MSVC)Ulf Lamping1-2/+2
svn path=/trunk/; revision=9241
2003-12-10From David Fort: compute and display the key ID in a DNS KEY RR, ifGuy Harris1-4/+45
possible. svn path=/trunk/; revision=9232
2003-11-27From David Fort: fix to previous patch.Guy Harris1-2/+2
svn path=/trunk/; revision=9101
2003-11-26From David Fort: DNS DSS RR support.Guy Harris1-3/+49
svn path=/trunk/; revision=9096
2003-10-05Fix warning about strict-aliasingJörg Mayer1-7/+8
svn path=/trunk/; revision=8613
2003-05-24Convert the WKS bitnames variable to a GString, on the (way, way)Gerald Combs1-11/+12
off chance that someone has amazingly long service names defined on their system. Discovered by Timo Sirainen. svn path=/trunk/; revision=7734
2003-05-24Fix instances where the return value of snprintf() was being checked for -1,Gerald Combs1-7/+7
but not for <buf_size> or greater. Discovered by Timo Sirainen. svn path=/trunk/; revision=7731
2003-05-07From Yaniv Kaul: show MBZ flags as either OK if 0 or incorrect if not 0.Guy Harris1-1/+16
svn path=/trunk/; revision=7645
2003-05-05From Yaniv Kaul: handle DNSSEC DO/OK bit in OPT pseudo-RR.Guy Harris1-3/+9
svn path=/trunk/; revision=7643
2003-01-31Update a comment.Guy Harris1-4/+10
svn path=/trunk/; revision=7065
2003-01-31Fix up some field lengths.Guy Harris1-5/+13
Put in a note about one capture I've seen. svn path=/trunk/; revision=7059
2003-01-26Call the GSSAPI dissector when disecting GSSAPI transaction keys. The TKEYTim Potter1-10/+47
request works quite nicely but I'm not sure what to call for the response. Currently it just displays "Unknown header: (cls=2, cons=1, tag=1) which looks like it's some more ASN.1 data. svn path=/trunk/; revision=7002
2002-12-02"ip6_to_str()" takes a const pointer as an argument, so you don't haveGuy Harris1-4/+4
to cast away the constness of pointers passed to it. svn path=/trunk/; revision=6718
2002-12-01From Brad Hards:Guy Harris1-6/+27
Support for mDNS/LLMNR "cache flush" bit Label mDNS and DNS differently in the Protocol column Clean up summary line for PTR records svn path=/trunk/; revision=6709
2002-08-30Print RR number as unsigned.Jörg Mayer1-3/+4
svn path=/trunk/; revision=6145
2002-08-30More fixes from Albert ChinRichard Sharpe1-5/+5
svn path=/trunk/; revision=6135
2002-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-62/+62
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6117
2002-08-19dissect LLMNR (formerly known as mDNS) on tcp/udp port 5353.Jun-ichiro itojun Hagino1-1/+5
svn path=/trunk/; revision=6022
2002-08-02Replace the types from sys/types.h and netinet/in.h by their glib.hJörg Mayer1-11/+7
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-07-16From Joerg Mayer: add #includes of "snprintf.h" in modules that usedGuy Harris1-1/+5
"snprintf()" but weren't including "snprintf.h". svn path=/trunk/; revision=5887
2002-06-15Put bounds checking into the code in "get_dns_name()" to handle RFC 2673Guy Harris1-4/+42
extended labels. svn path=/trunk/; revision=5672
2002-05-15Use registered fields for the subfields of the Flags field in DNS andGuy Harris1-89/+134
NBNS. svn path=/trunk/; revision=5475
2002-05-11From Graeme Hewson: add some sanity checks to DNS dissector to avoidGuy Harris1-4/+15
loops. svn path=/trunk/; revision=5443
2002-05-05Make a "tcp_dissect_pdus()" with the standard loop for a TCP segment,Guy Harris1-113/+30
extracting PDUs from it and possibly doing reassembly. Make the COPS, DNS, DSI, Gryphon, and SCCP dissectors use it. Add "set_actual_length()", "tcp_dissect_pdus()", "decode_boolean_bitfield()", "decode_numeric_bitfield()", and "decode_enumerated_bitfield()" to the list of routines available to dissectors on platforms where routines in the main program aren't available to dynamically-loaded code. Declare routines in "to_str.h" as "extern"; as I remember, that's necessary to allow the "decode_XXX_bitfield()" routines declared therein to be made available to plugins as per the above. Note that new exported routines should be added to the end of the table if that's the only change being made to the table. Create a new "plugin_api_decls.h" header file, used to declare both the "p_" variables and the "p_" structure members in the routine-exporting mechanism; this reduces the number of places you have to change to change the list of exported routines. svn path=/trunk/; revision=5394
2002-03-19Fix some comments.Guy Harris1-4/+4
svn path=/trunk/; revision=4979
2002-02-22Add some necessary "volatile" declarations.Guy Harris1-2/+2
svn path=/trunk/; revision=4788
2002-02-22Catch the ReportedBoundsError exception in the DNS and TPKT dissectorsGuy Harris1-2/+33
when dissecting messages over TCP, so that an error in one message doesn't stop us from dissecting the next message in the segment, if any. Put an XXX comment before the code that constructs the tvbuff for each message inside a TCP segment, noting that we really want tvbuffs to have three lengths and to have a new type of exception thrown if you go past the second length but not past the reported length. svn path=/trunk/; revision=4782
2002-02-22Redo the DNS-over-TCP code to handle the DNS-over-TCP header being splitGuy Harris1-32/+59
across segment boundaries and to, for each DNS-over-TCP PDU, create a tvbuff containing the header and the body of the PDU, handing that to the DNS PDU dissector. svn path=/trunk/; revision=4776
2002-01-21Include files from the "epan" directory and subdirectories thereof withGuy Harris1-3/+3
"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
2002-01-20Allow a length of -1 to be specified when adding FT_NONE and FT_PROTOCOLGuy Harris1-3/+3
items to the protocol tree; it's interpreted as "the rest of the data in the tvbuff". This can be used if 1) the item covers the entire packet or the remaining payload in the packet or 2) the item's length won't be known until it's dissected, and will be then set with "proto_item_set_len()" - if an exception is thrown in the dissection, it means the item ran *past* the end of the tvbuff, so saying it runs to the end of the tvbuff is reasonable. Convert a number of "proto_tree_add_XXX()" calls using "tvb_length_remaining()", values derived from the result of "tvb_length()", or 0 (in the case of items whose length is unknown) to use -1 instead (using 0 means that if an exception is thrown, selecting the item highlights nothing; using -1 means it highlights all the data for that item that's available). In some places where "tvb_length()" or "tvb_length_remaining()" was used to determine how large a packet is, use "tvb_reported_length()" or "tvb_reported_length_remaining()", instead - the first two calls indicate how much captured data was in the packet, the latter two calls indicate how large the packet actually was (and the fact that using the latter could cause BoundsError exceptions to be thrown is a feature - if such an exception is thrown, the frame really *was* short, and it should be tagged as such). Replace some "proto_tree_add_XXX()" calls with equivalent "proto_tree_add_item()" calls. Fix some indentation. svn path=/trunk/; revision=4578
2002-01-19We no longer do explicit checks in low-level routines for running pastGuy Harris1-13/+1
the end of the data in the packet, so we don't need to do those checks in the callers of those routines - and thus don't need to do those checks in the callers of *those* routines. svn path=/trunk/; revision=4574
2001-12-10Move the pointer to the "column_info" structure in the "frame_data"Guy Harris1-54/+54
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-03Make "dissector_add()", "dissector_delete()", and "dissector_change()"Guy Harris1-3/+8
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-09-17Add support for desegmentation of DNS messages.Guy Harris1-1/+40
Make the default for NBSS and ONC RPC-over-TCP desegmentation "on", rather than "off"; the default for desegmentation in general is "off", so this won't change the default behavior, but it lets you turn desegmentation on by flipping only one switch (and turn it off for particular protocols if you desire). svn path=/trunk/; revision=3943
2001-09-17Fix the handling of DNS-over-TCP.Guy Harris1-22/+25
Rename the "cap_len" argument to "dissect_dns_common()" to "msg_len", as it's just the length of the DNS message being dissected. svn path=/trunk/; revision=3941
2001-09-14Make the resolution for time values be nanoseconds rather thanGuy Harris1-19/+19
microseconds. Fix some "signed vs. unsigned" comparison warnings. svn path=/trunk/; revision=3934
2001-08-29Add a "proto_item_append_text()" routine, which is likeGuy Harris1-65/+24
"proto_item_set_text()" except that it appends the result of the formatting to the item's current text, rather than replacing the item's current text. Use it in the DNS dissector. svn path=/trunk/; revision=3880
2001-08-28Get rid of "proto_tree_add_notext()" - if you create a subtree using it,Guy Harris1-3/+5
but, before you set the text, you throw an exception while putting stuff under the subtree, you end up with an absolutely blank protocol tree item, which is really gross. Instead of calling "proto_tree_add_notext()", call "proto_tree_add_text()" with at least a minimal label - yes, it does mean you do some work that will probably be unnecessary, but, absent a scheme to arrange to do that work if it *is* necessary (e.g., catching exceptions), the alternative is an ugly protocol tree display. svn path=/trunk/; revision=3879