diff options
author | Guy Harris <guy@alum.mit.edu> | 2017-09-04 21:29:22 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2017-09-04 21:29:22 -0700 |
commit | 195c2e947cb599d16c77c18f6a4e810548beef3e (patch) | |
tree | 9ef3b89964143ea9e0367f336f383bc30badd038 /optimize.c | |
parent | 311a688dc4a8b68fe9a902ffea3658ffbd657e42 (diff) |
Redo the URL parsing.
Have a pcap_parse_source routine that attempts to parse a string that
might be a URL or might just be a device, and that allocates strings for
the various components.
Use that in pcap_parsesrcstr().
This avoids using sscanf() (which causes warnings when compiled with
newer versions of MSVC, and which is a bit of a hackish way to parse
strings in any case), and also fixes the parsing of IPv6address as the
host (yes, they *can* contain alphabetic characters - the text format of
IPv6 addresses is made up of hex strings, so you can get a through f).
So, while we're at it, fix pcap_createsrcstr() to properly recognize
IPv6 addresses - just look for something containing colons, rather than
looking for something not containing letters.
Diffstat (limited to 'optimize.c')
0 files changed, 0 insertions, 0 deletions