Commit graph

12662 commits

Author SHA1 Message Date
Guy Harris
5da116d531 Throw in a cast to squelch an (unavoidable, and probably harmless -
GTK+'s function signatures aren't necessarily what they should be)
warning.

svn path=/trunk/; revision=12912
2005-01-01 12:32:28 +00:00
Guy Harris
87c98feed8 "address_to_str()" and "address_to_str_buf()" don't modify the "address"
structure pointed to them by reference, so make the argument a "const"
pointer.

svn path=/trunk/; revision=12911
2005-01-01 12:29:26 +00:00
Guy Harris
71217a8007 As we've made the tap_specific_data field of a tap_packet_t structure a
const pointer (so that we don't get complaints when we make the
tap-specific data argument to "tap_queue_packet()" a const pointer,
allowing dissectors to hand const data to a tap without a complaint), we
should make the tap per-packet function take a const pointer as an
argument as well.  Do so.

In some taps, use _U_, or actually use the argument, rather than
sticking in dummy "X = X" assignments to fake use of parameters.  (This
means that the tap functions in question no longer have the notion that
they act on a particular static structure wired in.)

svn path=/trunk/; revision=12910
2005-01-01 02:57:02 +00:00
Guy Harris
3f0d0ca5ea Note what Fibre Channel spec documents this protocol.
Don't assign the const pointers passed to hash routines to non-const
pointers.

In "zonenm_to_str()", don't assume there's a null terminator in the
packet - use "tvb_get_string()" so that the buffer into which it's
copied is explicitly null-terminated.

Put the Domain & Port into the protocol tree as a "0xXXXXXXXX" string,
rather than as a string with one blank in it.

svn path=/trunk/; revision=12909
2004-12-31 22:00:44 +00:00
Guy Harris
ed15a73962 Don't bother copying the switch name to a buffer - we can just use
"tvb_get_ptr()".

svn path=/trunk/; revision=12908
2004-12-31 21:40:22 +00:00
Guy Harris
e58a199e9a Fix a bug introduced in the previous checkin.
Make the names for list record types match the names used before the
previous checkin.

svn path=/trunk/; revision=12907
2004-12-31 21:36:08 +00:00
Guy Harris
43ee35425a FC-over-IP is now covered by RFCs; update the specification references.
Make the protcol/version information an array of 8 bytes, not 2 guints;
not all the world's a (little-endian) PC!

svn path=/trunk/; revision=12906
2004-12-31 21:20:46 +00:00
Guy Harris
21cd2e1603 Note what Fibre Channel spec documents this protocol.
Don't assign the const pointers passed to hash routines to non-const
pointers.

Don't use "tvb_get_ptr()" to get a pointer to a data structure, and
dereference that pointer - there's no guarantee that the structure in
question will be located on an appropriate boundary in the data from the
packet (regardless of whether it's properly aligned within the data for
the protocol being dissected).

Put the record length for an EFP request into the protocol tree.

Check the sanity of the payload length for that request.

In "zonenm_to_str()", don't assume there's a null terminator in the
packet - use "tvb_get_string()" so that the buffer into which it's
copied is explicitly null-terminated.

Put the Domain & Port into the protocol tree as a "0xXXXXXXXX" string,
rather than as a string with one blank in it.

svn path=/trunk/; revision=12905
2004-12-31 20:58:23 +00:00
Guy Harris
16a61cc9c0 Note what Fibre Channel spec documents this protocol.
Don't assign the const pointers passed to hash routines to non-const
pointers.

Don't assume that strings the spec says are null-terminated are
necessarily null-terminated in the packet - use "tvb_strsize()" to find
the length of the purported null-terminated string; it'll throw the
appropriate exception if no null is found.

svn path=/trunk/; revision=12904
2004-12-31 20:35:55 +00:00
Lars Roland
9e0391990e Update some function declarations in the plugin api
svn path=/trunk/; revision=12903
2004-12-31 14:53:17 +00:00
Lars Roland
2ce1e037f6 From Luis Ontanon for Mate:
- moved gop and gog indexes into gopcfgs, which is a propedeutic
change for upcoming changes in the way gops are to be grouped
-  changed the way gog-keys are kept in memory
- every gopkey attribute is copied into the gop->extras to avoid
redundancy in the configuration
- added timers to gogs mate.gog_type.StartTime and mate.gog_type.Time
- fixed a bug in scs_subscribe that mangled some strings
- minor interface improvement to scs propedeutic to having types avp
values in a future
- changed medium and large into mate_medium and mate_large in the
scs_collection
- fixed Mode=Replace in Transforms, now it works
- fixed a crash at reinit due to impropper initialization of mate_items

svn path=/trunk/; revision=12902
2004-12-31 14:27:38 +00:00
Lars Roland
fd39b4ddca Fix from Luis Ontanon:
Bring tap-h225counter.c in sync with newest revision of the h225 dissector

svn path=/trunk/; revision=12901
2004-12-31 14:14:44 +00:00
Guy Harris
43cf3c2480 Use "proto_tree_add_item()" to add a chunk of bytes to the protocol
tree.

svn path=/trunk/; revision=12900
2004-12-31 03:18:13 +00:00
Guy Harris
1d4bf3263b Don't assign const pointers to non-const pointers, especially if the
object pointed to by the non-const pointer won't be modified.

svn path=/trunk/; revision=12899
2004-12-31 03:17:00 +00:00
Guy Harris
018883dea9 "string_to_hex()" doesn't modify its first argument, so make it a
"const" pointer, and don't cast away the constness of "tvb_get_ptr()"s
result when passing it to "string_to_hex()".

svn path=/trunk/; revision=12898
2004-12-31 03:14:18 +00:00
Guy Harris
85f89615ea Don't cast away the constness of pointers passed to "ip_to_str()" -
"ip_to_str()" takes a "const guint8 *" argument.

svn path=/trunk/; revision=12897
2004-12-31 03:12:51 +00:00
Guy Harris
d9f4b6c9eb There are no guarantees that "strncasecmp()" works with
non-null-terminated strings, so be safe and fetch the metatag string
with "tvb_get_string()".

svn path=/trunk/; revision=12896
2004-12-31 03:10:11 +00:00
Guy Harris
29c1d25ddc Use "tvb_memeql()" to check whether specified bytes in a packet have a
specified value.

Make a constant array "const".

svn path=/trunk/; revision=12895
2004-12-31 02:48:53 +00:00
Guy Harris
9d9687dd5a Don't cast away the constness of argument pointers.
Don't supply our own definition of AF_INET or our own declaration of
"inet_pton()" - use the system ones if they're available.

"mkipv4_address()" doesn't modify the string passed to it - make it a
const pointer.

svn path=/trunk/; revision=12894
2004-12-31 02:16:05 +00:00
Guy Harris
8d80985ef7 Don't roll our own code to display IPv4 or IPv6 addresses, use
"ip_to_str()" and "ip6_to_str()".

Check the length of items for IPv4 and IPv6 addresses before displaying
them as such.

svn path=/trunk/; revision=12893
2004-12-31 02:13:42 +00:00
Guy Harris
31cbbecd00 Don't assign the const pointers passed to hash routines to non-const
pointers.

Now that "col_set_str()" takes a "const char *" as the second argument,
we don't have to cast away the constness of strings passed to it.

svn path=/trunk/; revision=12892
2004-12-31 02:11:13 +00:00
Guy Harris
b39dd4b7cc Don't assign a const pointer argument to a non-const pointer variable.
svn path=/trunk/; revision=12891
2004-12-31 02:09:48 +00:00
Guy Harris
caf46302c8 Don't assign the const pointers passed to hash routines to non-const
pointers.

svn path=/trunk/; revision=12890
2004-12-31 02:08:01 +00:00
Guy Harris
f2972f0925 Properly cast the pointer assigned to col_info->col_data.
svn path=/trunk/; revision=12889
2004-12-31 02:03:16 +00:00
Guy Harris
55465228b2 "proto_registrar_get_byname()" doesn't modify its argument, so make it
"const char *".

svn path=/trunk/; revision=12888
2004-12-31 02:02:19 +00:00
Guy Harris
ea4568dba5 Make arguments "const *" if the routine doesn't modify the object to
which they point.

svn path=/trunk/; revision=12887
2004-12-31 02:01:03 +00:00
Jörg Mayer
9522cf61c0 Make sure print_buff is \0-terminated
svn path=/trunk/; revision=12886
2004-12-31 01:56:22 +00:00
Jörg Mayer
22dad47c9a As pointed out by Guy: We should be able to filter on the original SSID,
so use a copy of the existing one for printing.

svn path=/trunk/; revision=12885
2004-12-31 01:37:54 +00:00
Guy Harris
e75910e7cb In column sort routines, make the row pointers "const" pointers, as the
arguments passed in corresponding to those pointers are gconstpointers.

svn path=/trunk/; revision=12884
2004-12-31 00:33:54 +00:00
Guy Harris
4c0f806dc9 As "get_persconffile_path()" doesn't return a "const char *", neither
does "get_plugins_pers_dir()" - and "get_plugins_global_dir()" doesn't
return one either.  Both of them return mallocated data, and making them
return a "const char *" just causes compiler whining when you try to
free them.

svn path=/trunk/; revision=12883
2004-12-31 00:32:00 +00:00
Guy Harris
1d182e4fcc "get_persconffile_path()" doesn't return a "const char *", it just
returns a "char *", so don't assign its return value to a "const char *".

svn path=/trunk/; revision=12882
2004-12-31 00:29:09 +00:00
Guy Harris
6e622fd24e "gtk_entry_get_text()" returns a "const char *" - assign the result to
one.

"get_basename()" doesn't modify its argument, and its callers don't
modify the substring pointed to by the result, so make it take a "const
char *" as an argument and return a "const char *". 

"find_last_pathname_separator()" doesn't modify its argument, so make it
a "const char *" - but some of its callers pass a non-"const" "char *"
and modify the result, so don't make its return value a "const char *".
And, as none of its callers are outside "filesystem.c", make it static.

In "about_folders_page_new()", have separate variables for pathnames
returned as "const char *" (which are cached by the routine that returns
them, so you can't modify them - and can't free them, so get rid of the
commented-out "g_free()" calls for them) and pathnames returned as "char
*" (which are allocated anew for each call, and can be modified, but
have to be freed).

Clean up white space.

svn path=/trunk/; revision=12881
2004-12-31 00:26:36 +00:00
Guy Harris
6d24b27606 Make the "col_data" field in a "column_info" structure a pointer to an
array of "const char *" rather than to an array of "char *", and make
the second argument of "col_set_str()" a "const char *" - there's no
guarantee that "col_data" points to something you're allowed to modify.

svn path=/trunk/; revision=12880
2004-12-31 00:12:25 +00:00
Guy Harris
3ae6f28d3f Add a "tvb_bytes_to_str_punct()" routine, which wraps
"bytes_to_str_punct()", and use it instead of extracting the bytes and
formatting them by hand.

Also, export "bytes_to_str_punct()".

svn path=/trunk/; revision=12879
2004-12-31 00:05:22 +00:00
Guy Harris
0b21e2bcab Make the "col_data" field in a "column_info" structure a pointer to an
array of "const char *" rather than to an array of "char *", and make
the second argument of "col_set_str()" a "const char *" - there's no
guarantee that "col_data" points to something you're allowed to modify.

svn path=/trunk/; revision=12878
2004-12-30 23:57:29 +00:00
Guy Harris
df2c4d7e69 The first argument to "adler32_bytes()" is only passed on to
"update_adler32()", and the corresponding argument is a "const unsigned
char *", so that argument can be a "const unsigned char *".

svn path=/trunk/; revision=12877
2004-12-30 23:56:12 +00:00
Guy Harris
a0de9d34c7 Add a "tvb_bytes_to_str_punct()" routine, which wraps
"bytes_to_str_punct()", and use it instead of extracting the bytes and
formatting them by hand.

svn path=/trunk/; revision=12876
2004-12-30 23:47:52 +00:00
Guy Harris
467e33d1b1 Make the "col_data" field in a "column_info" structure a pointer to an
array of "const char *" rather than to an array of "char *", and make
the second argument of "col_set_str()" a "const char *" - there's no
guarantee that "col_data" points to something you're allowed to modify.

svn path=/trunk/; revision=12875
2004-12-30 23:42:02 +00:00
Guy Harris
28bdc16f36 We now require gint64/guint64 support to build Ethereal, so get rid of
the #ifdefs.

Don't use "%ll[doux]" - not all platforms use "ll" as the length
specifier for 64-bit integers in formats.  Use PRI[doux]64 instead, to
handle platforms where some other length specifier is used.

svn path=/trunk/; revision=12874
2004-12-30 23:19:17 +00:00
Anders Broman
d7bda80c71 Change a function name in preparation for genereating H.245 and H.225 dissectors with asn2etrh
svn path=/trunk/; revision=12873
2004-12-30 22:40:21 +00:00
Anders Broman
4fd11546ed Change a function name in preparation for genereating H.245 and H.225 dissectors with asn2etrh
svn path=/trunk/; revision=12872
2004-12-30 22:39:28 +00:00
Anders Broman
430b659469 Change a function name in preparation for genereating H.245 and H.225 dissectors with asn2etrh
svn path=/trunk/; revision=12871
2004-12-30 22:38:59 +00:00
Guy Harris
27db7b5c30 Regenerate.
svn path=/trunk/; revision=12870
2004-12-30 18:34:11 +00:00
Guy Harris
cd4a738b63 Fix the declaration of "tap_queue_packet()" to match its new signature.
svn path=/trunk/; revision=12869
2004-12-30 18:33:14 +00:00
Gerald Combs
3969acf046 From Vincent Jardin: Fix the dissection of relayed messages.
svn path=/trunk/; revision=12868
2004-12-30 16:45:37 +00:00
Guy Harris
eaa41c0480 Add "get_addr_name()" to the list of items exported by libethereal.
svn path=/trunk/; revision=12867
2004-12-30 03:32:38 +00:00
Guy Harris
5be2b9f9e7 Fix some cut-and-pasteos.
svn path=/trunk/; revision=12866
2004-12-30 02:28:50 +00:00
Guy Harris
d1fd7820b4 In the "capture_null()" routine, handle IPv6.
svn path=/trunk/; revision=12865
2004-12-30 02:27:00 +00:00
Guy Harris
7e7d12b446 Update a URL.
svn path=/trunk/; revision=12864
2004-12-30 02:21:33 +00:00
Guy Harris
0ccf418724 Add a "get_addr_name()" routine that takes an "address *" and attempts
to resolve it to a name.

Fix up some const-pointer-to-non-const-pointer, and
function-pointer-to-void-*, conversions.

Fix some comments.

svn path=/trunk/; revision=12863
2004-12-30 02:10:24 +00:00