Skip to content
Eddie Kohler edited this page Oct 18, 2017 · 1 revision

RawSocket Element Documentation

NAME

RawSocket — Click element; transports raw IP packets via safe raw sockets (user-level)

SYNOPSIS

RawSocket("TCP", [, KEYWORDS])
RawSocket("UDP", [, KEYWORDS])
RawSocket("GRE", [, KEYWORDS])
RawSocket("ICMP", [, KEYWORDS])

Ports: at most 1 input, at most 1 output
Processing: pull inputs, push outputs
Drivers: userlevel

DESCRIPTION

Reads data from and writes data to a raw IPv4 socket. The raw IPv4 socket may optionally be bound to a source port number in the case of TCP/UDP, a GRE key or PPTP call ID in the case of GRE, or an identifier in the case of ICMP. For PlanetLab Linux (versions with VMNET+ onwards) and TCP or UDP protocol, a seperate SOCK_STREAM or SOCK_DGRAM will be created and bound to the specified port. This triggers the slice port registration mechanism in VMNET+.

Keyword arguments are:

  • SNAPLEN — Unsigned integer. Maximum packet length. This value represents the MRU of the RawSocket if it is used as a packet source. If the MRU is violated by the peer, i.e. if a packet longer than SNAPLEN is sent, the connection may be terminated.
  • HEADROOM — Unsigned Integer. Amount of headroom to reserve in packets created by this element. This could be useful for encapsulation protocols which add headers to the packet, and can avoid expensive push operations later in the packet's life.

EXAMPLES

  RawSocket(UDP, 53) -> ...

SEE ALSO

Socket

Generated by click-elem2man from ../../elements/userlevel/rawsocket.hh:10 on 2017/10/17.

Clone this wiki locally