[P4-dev] Parsing Variable-Length Fields in HTTP Followup

Andy Fingerhut andy.fingerhut at gmail.com
Mon Jan 29 20:49:07 EST 2018


The issues addressed in that email thread are still relevant, especially
the ones mentioned by Vladimir that TCP connections can segment data across
different packets pretty much arbitrarily, although in practice quite often
the first packet in an HTTP GET request will often have all of the data you
might be interested in.

P4 has no more features tuned for this use case than it did when the
question was asked before.  Content analysis, TCP termination, parsing of
context-free languages like HTML/etc. are possible with the right P4
externs, or logic to do that next to a P4-programmable device, but P4
itself is still a poor tool for those jobs without such outside help.

Andy

On Mon, Jan 29, 2018 at 2:30 PM, Jeff Van <jeff.van at netsia.com> wrote:

> Hello,
>
> I wanted to follow up with this particular email thread <
> http://lists.p4.org/pipermail/p4-dev_lists.p4.org/2017-July/001175.html>
> that talks about using P4 to parse HTTP requests, and how it is challenging
> because P4 currently does not allow for an easy way to process HTTP
> headers. Since that inquiry was made in July of 2017, I wanted to know if a
> way of easily processing HTTP headers had been implemented by P4, or if
> anybody had been able to find a way of getting around this challenge?
>
> I am currently trying to find a way to manipulate HTTP packets based on
> their Host DNS name (eg. to create a firewall by dropping packets with that
> host name, etc.)
>
> Thank you!
>
> Sincerely,
> *Jeff Van*
>
> _______________________________________________
> P4-dev mailing list
> P4-dev at lists.p4.org
> http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20180129/74e6b1d5/attachment-0002.html>


More information about the P4-dev mailing list