-
Notifications
You must be signed in to change notification settings - Fork 82
/
tcpipsend.hh
46 lines (41 loc) · 1.27 KB
/
tcpipsend.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
#ifndef CLICK_TCPIPSEND_HH
#define CLICK_TCPIPSEND_HH
#include <click/element.hh>
#include <click/glue.hh>
#include <clicknet/tcp.h>
CLICK_DECLS
/*
* =c
* TCPIPSend()
* =s tcp
* generates TCP/IP packets when requested
* =d
*
* Sends TCP/IP packets when asked to do so. No inputs. One output.
*
* =e
*
* =h send write-only
*
* Expects a string "saddr sport daddr dport seqno ackno bits [count stop]".
* "saddr sport daddr dport seqno ackno" have their obvious meanings. "bits"
* is the value of the 6 TCP flags. The optional "count" argument is the
* number of packets to send. The optional "stop" argument is a Boolean; if
* true, stops the router after sending the packets.
*/
class TCPIPSend : public Element {
public:
TCPIPSend() CLICK_COLD;
~TCPIPSend() CLICK_COLD;
const char *class_name() const override { return "TCPIPSend"; }
const char *port_count() const override { return PORTS_0_1; }
const char *processing() const override { return PUSH; }
private:
void add_handlers() CLICK_COLD;
static int send_write_handler
(const String &conf, Element *e, void *, ErrorHandler *errh);
Packet * make_packet(unsigned int, unsigned int, unsigned short,
unsigned short, unsigned, unsigned, unsigned char);
};
CLICK_ENDDECLS
#endif