1 #ifndef CLICK_TEE_HH
2 #define CLICK_TEE_HH
3 #include <click/element.hh>
4 CLICK_DECLS
5 
6 /*
7  * =c
8  * Tee([N])
9  *
10  * PullTee([N])
11  * =s basictransfer
12  * duplicates packets
13  * =d
14  * Tee sends a copy of each incoming packet out each output.
15  *
16  * PullTee's input and its first output are pull; its other outputs are push.
17  * Each time the pull output pulls a packet, it
18  * sends a copy out the push outputs.
19  *
20  * Tee and PullTee have however many outputs are used in the configuration,
21  * but you can say how many outputs you expect with the optional argument
22  * N.
23  */
24 
25 class Tee : public Element {
26 
27  public:
28 
29   Tee() CLICK_COLD;
30 
class_name() const31   const char *class_name() const		{ return "Tee"; }
port_count() const32   const char *port_count() const		{ return "1/1-"; }
processing() const33   const char *processing() const		{ return PUSH; }
34 
35   int configure(Vector<String> &, ErrorHandler *) CLICK_COLD;
36 
37   void push(int, Packet *);
38 
39 };
40 
41 class PullTee : public Element {
42 
43  public:
44 
45   PullTee() CLICK_COLD;
46 
class_name() const47   const char *class_name() const		{ return "PullTee"; }
port_count() const48   const char *port_count() const		{ return "1/1-"; }
processing() const49   const char *processing() const		{ return "l/lh"; }
50 
51   int configure(Vector<String> &, ErrorHandler *) CLICK_COLD;
52 
53   Packet *pull(int);
54 
55 };
56 
57 CLICK_ENDDECLS
58 #endif
59