-
Notifications
You must be signed in to change notification settings - Fork 82
/
setipaddress.hh
49 lines (38 loc) · 1.08 KB
/
setipaddress.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
#ifndef CLICK_SETIPADDRESS_HH
#define CLICK_SETIPADDRESS_HH
#include <click/batchelement.hh>
#include <click/ipaddress.hh>
CLICK_DECLS
/*
* =c
* SetIPAddress(ADDR [, ANNO])
* =s ip
* sets destination IP address annotations
* =d
* Set the destination IP address annotation of incoming packets to the
* static IP address ADDR. The ANNO argument, if given, sets the destination
* IP address annotation number.
*
* =h addr rw
* Returns or sets the ADDR argument.
*
* =a StoreIPAddress, GetIPAddress
*/
class SetIPAddress : public BatchElement {
IPAddress _ip;
int _anno;
public:
SetIPAddress() CLICK_COLD;
~SetIPAddress() CLICK_COLD;
const char *class_name() const override { return "SetIPAddress"; }
const char *port_count() const override { return PORTS_1_1; }
int configure(Vector<String> &, ErrorHandler *) CLICK_COLD;
bool can_live_reconfigure() const { return true; }
void add_handlers() CLICK_COLD;
Packet *simple_action(Packet *);
#if HAVE_BATCH
PacketBatch *simple_action_batch(PacketBatch *);
#endif
};
CLICK_ENDDECLS
#endif