<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"/usr/share/xml/docbook/schema/dtd/4.2/docbookx.dtd">
<refentry id="nexp-ip">
  <refentryinfo>
    <date>20 October 2007</date>
  </refentryinfo>

  <refmeta>
    <refentrytitle>nexp-gre</refentrytitle>

    <manvolnum>5</manvolnum>
  </refmeta>

  <refnamediv>
    <refname>nexp-gre</refname>

    <refpurpose>Generic Routing Encapsulation (GRE) support for Network
    Expect</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <para>PDU definition:</para>

    <cmdsynopsis>
       

      <command>gre</command>(<arg choice="opt">
      <option>proto</option>=<replaceable
      class="option">num</replaceable>,</arg>
      <arg choice="opt">
        <option>cksum</option>
      </arg> )</cmdsynopsis>
      </refsynopsisdiv>

  <refsect1>
    <title>PDU Definition</title>

    <para>The following parameters allow you to define the different parts of
    a GRE protocol data unit (PDU) in <command>Network
    Expect</command>:</para>

    <variablelist>
      <varlistentry>
        <term><option>proto</option> =
        <replaceable>NUMSPEC</replaceable></term>

        <listitem>
          <para>Specifies the value of the Protocol field in the GRE header.
          Default: Ethertype of tunneled protocol if known; zero if
          unknown.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><option>cksum</option></term>

        <listitem>
          <para>Sets the checksum flag of the GRE PDU and instructs<command>
          Network Expect</command> to compute and store the checksum in the
          GRE header.</para>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1>
    <title>PDU Decoding</title>

    <para>The current version of <command>Network Expect</command> does not
    support the decoding of received GRE PDUs into the Tcl array variable
    gre.</para>
  </refsect1>

  <refsect1>
    <title>Examples</title>

    <orderedlist>
      <listitem>
        <para>A simple GRE packet.</para>

        <programlisting>
ip(dst = www.netexpect.org)/gre()
	</programlisting>
      </listitem>

      <listitem>
        <para>A GRE packet containing a checksum:</para>

        <programlisting>
ip(dst = www.netexpect.org)/gre(cksum)
	</programlisting>
      </listitem>

      <listitem>
        <para>A GRE packet containing an IP packet destined to
        10.1.1.1:</para>

        <programlisting>
ip(dst = www.netexpect.org)/gre()/ip(dst = 10.1.1.1)
	</programlisting>
      </listitem>

      <listitem>
        <para>A GRE packet with a specific protocol field and raw
        payload:</para>

        <programlisting>
ip(dst = www.netexpect.org)/gre(proto = 0x4141)/raw('AA')
	</programlisting>
      </listitem>
    </orderedlist>
  </refsect1>

  <refsect1>
    <title>VERSION</title>

    <para>This man page is correct for version 1.0 of <command>Network
    Expect</command>.</para>
  </refsect1>

  <refsect1>
    <title>SEE ALSO</title>

    <para>nexp<manvolnum>1</manvolnum>, nexp-numspec<manvolnum>5</manvolnum>,
    RFC 2784</para>
  </refsect1>

  <refsect1>
    <title>AUTHOR</title>

    <para>Generic Routing Encapsulation support for <command>Network
    Expect</command> was written by Eloy Paris
    &lt;peloy@netexpect.org&gt;.</para>

    <para>This man page was written by Tim Sammut
    &lt;tsammut@cisco.com&gt;.</para>
  </refsect1>
</refentry>
