IPsec parsers
This crate contains several parsers using for IPsec. The most useful is the IKEv2 parser.
ESP is supported, but only to read the envelope of the payload.
Encapsulated ESP is supported, to differentiate between IKE and ESP headers.
IKEv2 parser
An IKEv2 (RFC7296) parser, implemented with the nom parser combinator framework.
The code is available on Github and is part of the Rusticata project.
To parse an IKE packet, first read the header using parse_ikev2_header
, then use the type
from the header to parse the remaining part:
# extern crate nom;
# extern crate ipsec_parser;
use *;
use IResult;
static IKEV2_INIT_RESP: &'static = include_bytes!;
#