-
Notifications
You must be signed in to change notification settings - Fork 82
/
fromrawsocket.hh
51 lines (36 loc) · 1.42 KB
/
fromrawsocket.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// -*- mode: c++; c-basic-offset: 2 -*-
#ifndef CLICK_FROMRAWSOCKET_HH
#define CLICK_FROMRAWSOCKET_HH
#include <click/element.hh>
#include "rawsocket.hh"
CLICK_DECLS
/*
=c
FromRawSocket("TCP", <TCP source port number> [, I<KEYWORDS>])
FromRawSocket("UDP", <UDP source port number> [, I<KEYWORDS>])
FromRawSocket("GRE", <GRE key or PPTP call ID> [, I<KEYWORDS>])
FromRawSocket("ICMP", <ICMP identifier> [, I<KEYWORDS>])
=s comm
reads raw IP packets from safe raw socket (user-level)
=d
Reads data from 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. Binding a port to a raw IPv4 socket to reserve it and suppress
TCP RST and ICMP Unreachable errors, is specific to PlanetLab Linux.
This element exists only for backward compatibility. See the more
general RawSocket implementation for details, and for supported
keyword arguments. A FromRawSocket is equivalent to a RawSocket with
no inputs.
=e
FromRawSocket(UDP, 53) -> ...
=a ToRawSocket, RawSocket, Socket */
class FromRawSocket : public RawSocket { public:
FromRawSocket() CLICK_COLD;
~FromRawSocket() CLICK_COLD;
const char *class_name() const override { return "FromRawSocket"; }
const char *processing() const override { return PUSH; }
const char *flow_code() const override { return "x/y"; }
};
CLICK_ENDDECLS
#endif