You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Refactor IPv6 address parsing to fix shorten notation handling and improve robustness
- Rewrote `scn_cnt_define_in6addr_4_digits_impl` to use loop-based parsing instead of manual unrolling, fixing zero-started validation issues
- Completely reimplemented `scn_cnt_define_in6addr_shorten_impl` to properly handle "::" expansion with token-based parsing
- Fixed bracket handling in `scn_cnt_define_in6addr_impl` to validate closing bracket and inner content length
- Removed unused `scn_cnt_define_in6addr_nonshorten_
* Simplify IPv6 context scanner by removing port parsing and fix EOF handling
- Removed port parsing logic from `scan_context_define` for IPv6 addresses to match single-stage parsing behavior
- Added special handling in `scn_ctx_define_in6addr_impl` to treat parse failures at buffer end as `parse_code::partial` for streaming contexts
- Set `state.size = 1` to mark unfinished IPv6 parse for proper EOF handling, aligning with IPv4 scanner behavior
- Eliminated conditional port parsing code path and simplified return
* Mark scn_ip_port example as interactive in test configuration
- Added `interactive = true` flag for `0042.scn_ip_port` test case to indicate it requires user input
* Update addrscn.h
* Update addrscn.h
* Add IPv4-mapped IPv6 address support with configurable flag for printing and scanning
- Added `ipv4_mapped_ipv6` flag to `ip_flags` and `ip_scan_flags` structures (default: true)
- Implemented `ipv6_to_ipv4_mapped_bytes` helper to detect and extract IPv4-mapped IPv6 addresses (::ffff:x.x.x.x format)
- Modified print functions to output IPv4-mapped IPv6 addresses in compact notation when flag is enabled
- Updated scan functions to validate IPv4-mapped IPv6 prefix (first 5 words zero, 6th word 0xFF
* Add `ip_scan_no_ipv4_mapped_ipv6` constant flag to disable IPv4-mapped IPv6 address parsing
- Added `ip_scan_no_ipv4_mapped_ipv6` inline constexpr flag with `requireport = true` and `ipv4_mapped_ipv6 = false`
- Provides predefined configuration to disable IPv4-mapped IPv6 address support while requiring port numbers
* Update addrscn.h
0 commit comments