diff --git a/src/node/ipv4-l4-protocol.h b/src/node/ipv4-l4-protocol.h index efefe449f..3550947aa 100644 --- a/src/node/ipv4-l4-protocol.h +++ b/src/node/ipv4-l4-protocol.h @@ -33,18 +33,42 @@ class Packet; class Ipv4Address; class TraceResolver; class TraceContext; - + +/** + * \brief L4 Protocol base class + * + * All subclasses must implement: + * - Ipv4L4Protocol::Copy + * - Ipv4L4Protocol::CreateTraceResolver + */ class Ipv4L4Protocol { public: Ipv4L4Protocol(int protocolNumber, int version); virtual ~Ipv4L4Protocol (); + /** + * \returns the protocol number of this protocol. + */ int GetProtocolNumber (void) const; + /** + * \returns the version number of this protocol. + */ int GetVersion() const; + /** + * \param node the node on which the copy should be running + * \returns a new instance of this L4 Protocol. + * + * Perform a deep copy of the L4 Protocol + */ virtual Ipv4L4Protocol* Copy(Node *node) const = 0; virtual TraceResolver *CreateTraceResolver (TraceContext const &context) = 0; + /** + * \param p packet to forward up + * \param source source address of packet received + * \param destination address of packet received + * * Called from lower-level layers to send the packet up * in the stack. */