Age | Commit message (Collapse) | Author | Files | Lines |
|
Change-Id: I01ec87ff4181afb5b2de487fd5f5200f8d62f17d
Reviewed-on: https://code.wireshark.org/review/1088
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
|
|
Add an FT_STRINGZPAD type, for null-padded strings (typically
fixed-length fields, where the string can be up to the length of the
field, and is null-padded if it's shorter than that), and use it. Use
IS_FT_STRING() in more cases, so that less code needs to know what types
are string types.
Add a tvb_get_stringzpad() routine, which gets null-padded strings.
Currently, it does the same thing that tvb_get_string_enc() does, but
that might change if we don't store string values as null-terminated
strings.
Change-Id: I46f56e130de8f419a19b56ded914e24cc7518a66
Reviewed-on: https://code.wireshark.org/review/1082
Reviewed-by: Guy Harris <guy@alum.mit.edu>
|
|
Change-Id: Ib96f2cf4ea71cd0cc2c703d58b9d254bf4c1248a
Reviewed-on: https://code.wireshark.org/review/1077
Reviewed-by: Guy Harris <guy@alum.mit.edu>
|
|
Change-Id: Ie32a140e49140a92c69cb6fa84cdc55402516830
Reviewed-on: https://code.wireshark.org/review/935
Reviewed-by: Anders Broman <a.broman58@gmail.com>
|
|
tvb_captured_length() -> tvb->length
tvb_captured_length_remaining(tvb, offset) -> (Inline) _tvb_captured_length_remaining()
tvb_get_ptr() -> ensure_contiguous()
Change-Id: I3540854c9b51ca9c3319b030c7d91b4aff976a26
Reviewed-on: https://code.wireshark.org/review/922
Reviewed-by: Anders Broman <a.broman58@gmail.com>
|
|
insted get the ptr and read
directly avoiding the overhead of calling fast_ensure_contiguous()
repeatibly.
Change-Id: Ib5eee87ef9d49cb4e46b3b9c3d3db0134d3c4a32
Reviewed-on: https://code.wireshark.org/review/889
Reviewed-by: Anders Broman <a.broman58@gmail.com>
|
|
valgrind.
Change-Id: I7881f8c1407d422a3f1ad5bc17e975b45703db74
Reviewed-on: https://code.wireshark.org/review/909
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
|
|
Change-Id: I385345cfafc7e7b4d3e66713fb0fe570b39f438d
Reviewed-on: https://code.wireshark.org/review/865
Reviewed-by: Guy Harris <guy@alum.mit.edu>
|
|
We rarely know exactly how long a string will be, but we frequently have a good
lower bound (that's better than the default strbuf size of 16). Starting at that
size probably reduces the amount of allocation/copying needed.
Also make use of the new _finalize() method to save memory and avoid constness
problems.
Change-Id: I3f043bd12c1ccfce5990168fb6531ecd287bec5b
Reviewed-on: https://code.wireshark.org/review/856
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Evan Huus <eapache@gmail.com>
|
|
by the editor modelines.
Change-Id: I6d4ad3675ec9099913c8a32ad1f2758316158f68
Reviewed-on: https://code.wireshark.org/review/587
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
|
|
(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>
|
|
Do with tvb_get_stringz() what was done with tvb_get_string().
Redo the comments for the string get routines to try to give more detail
in a fashion that's a bit less hard to read.
Warn, in comments, of the problems with using
tvb_get_string()/tvb_get_stringz() (i.e., if your strings are non-ASCII,
all bytes with the 8th bit set are going be replaced by the Unicode
REPLACEMENT CHARACTER, and displayed as such).
Warn, in a comment, of the problems with tvb_get_const_stringz() (i.e.,
it gives you raw bytes, rather than guaranteed-to-be-valid UTF-8).
Update documentation and release notes appropriately.
Change-Id: Ibd3efb92a203861f507ce71bc8d04d19d9d38a93
Reviewed-on: https://code.wireshark.org/review/327
Reviewed-by: Guy Harris <guy@alum.mit.edu>
|
|
Change-Id: I8116f63ff88687c8db3fd6e8e23b22ab2f759af0
Reviewed-on: https://code.wireshark.org/review/385
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
|
|
- rename tvb_length and similar to tvb_captured_length and similar; leave
#defines in place for backwards-compat, but mark them clearly as deprecated in
code comments and in checkAPI
- remove tvb_get_string as C code and just leave a #define in place for
backwards-compat; mark it clearly as deprecated in code comment and checkAPI
- update READMEs and sample dissector for all of the above
- while in the neighbourhood, make checkAPI skip (and warn) for missing files
instead of bailing on the whole check, so subsequent files still get checked
Change-Id: I32fc437896ca86ca73e9b49d5f50400adf8ec5ad
Reviewed-on: https://code.wireshark.org/review/311
Reviewed-by: Evan Huus <eapache@gmail.com>
|
|
better.
We don't need eventlog_get_unicode_string_length() in the eventlog
dissector, either - tvb_unicode_strsize() does the job just as well.
svn path=/trunk/; revision=54874
|
|
UTF-8 strings.
Add that mapping for null-terminated ASCII strings.
Factor out some common parts of comments about string routines, and
clean up some other comments.
svn path=/trunk/; revision=54868
|
|
svn path=/trunk/; revision=54865
|
|
svn path=/trunk/; revision=54864
|
|
svn path=/trunk/; revision=54816
|
|
tvbuff version was moved, but with 'or' optimization from packet-json.
svn path=/trunk/; revision=54632
|
|
svn path=/trunk/; revision=54594
|
|
functions and update dissectors to use it.
Remove gsm_sms_char_7bit_unpack() / gsm_sms_chars_to_utf8() functions.
Update documentation a bit.
svn path=/trunk/; revision=54534
|
|
svn path=/trunk/; revision=54505
|
|
unassigned code points in some other character sets.
svn path=/trunk/; revision=54477
|
|
string, they should just cause TRUE to be returned - it's the *next*
code point that gets treated specially and, after mapping, added to the
string.
svn path=/trunk/; revision=54431
|
|
that it's a weird (undefined?) case.
svn path=/trunk/; revision=54430
|
|
svn path=/trunk/; revision=54429
|
|
bit-packed string, and use it in some places.
svn path=/trunk/; revision=54428
|
|
svn path=/trunk/; revision=54375
|
|
Expand a bunch of comments, discussing what various routines do and
should perhaps do.
Pull the core of tvb_get_ucs_2_string()/tvb_get_ucs_2_stringz() and
tvb_get_ucs_4_string()/tvb_get_ucs_4_stringz() into common routines, as
we did for tvb_get_utf_16_string()/tvb_get_utf_16_stringz().
svn path=/trunk/; revision=54374
|
|
- Minor whitespace changes;
- Fix a typo;
- Add editor modelines to tnbuff_subset.c
svn path=/trunk/; revision=54364
|
|
Fix a typo in a comment.
svn path=/trunk/; revision=54357
|
|
copy&paste of tvb_get_ucs_2_string?
svn path=/trunk/; revision=54353
|
|
Shuffle the character ENC_ values around a bit, keeping the Unicode
encodings together, moving the Windows code pages (only one for now)
after the ISO 8859 encodings, and putting "I can't believe it's not
ASCII!" at the end.
Fix some comment typoes, and update another comment, while we're at it.
svn path=/trunk/; revision=54351
|
|
program.
Put the character-encoding cases in order.
svn path=/trunk/; revision=54344
|
|
instead, have static routines to get UCS-2 (no surrogate pairs) and
UTF-16 (with surrogate pairs) strings, with the routines to handle
UTF-16 actually handling surrogate pairs.
Update some out-of-date comments while we're at it.
svn path=/trunk/; revision=54318
|
|
obvious that the returned string is ephemeral, and opens up the original names
in the API for versions that take a wmem pool (and thus can work in any scope).
svn path=/trunk/; revision=54249
|
|
svn path=/trunk/; revision=54239
|
|
decoding corrupt bytes. Some of these digit sets could probably be
deduplicated...
svn path=/trunk/; revision=54224
|
|
svn path=/trunk/; revision=54197
|
|
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8454)
svn path=/trunk/; revision=54183
|
|
svn path=/trunk/; revision=54132
|
|
byte. (We should perhaps add an expert info indication in those cases.)
svn path=/trunk/; revision=54074
|
|
Move the Wikipedia links for the code page layouts in front of the
tables whose contents reflect the code page layouts.
svn path=/trunk/; revision=53837
|
|
svn path=/trunk/; revision=53826
|
|
- Move windows-1250 to unicode encoding table to charset.c
- Add tvb_get_string_unichar2, tvb_get_stringz_unichar2 functions which recode tvb-string to UTF-8.
svn path=/trunk/; revision=53819
|
|
It was only used by tvb_get_bits_buf (removed in r53183).
svn path=/trunk/; revision=53818
|
|
svn path=/trunk/; revision=53815
|
|
pntohs -> pntoh16
pntohl -> pntoh32
pletohs -> pletoh16
pletohl -> pletoh32
phtons -> phton16
phtonl -> phton32
svn path=/trunk/; revision=53652
|
|
svn path=/trunk/; revision=53512
|