Click
Loading...
Searching...
No Matches
alignmentinfo.hh
1// -*- related-file-name: "../../../elements/standard/alignmentinfo.cc" -*-
2#ifndef CLICK_ALIGNMENTINFO_HH
3#define CLICK_ALIGNMENTINFO_HH
4#include <click/element.hh>
5CLICK_DECLS
6
7/*
8 * =c
9 * AlignmentInfo(ELEMENT [MODULUS OFFSET ...], ...)
10 * =s information
11 * specifies alignment information
12 * =io
13 * None
14 * =d
15 * Provides information about the packet alignment specified elements can
16 * expect. Each configuration argument has the form
17 * `ELEMENT [MODULUS0 OFFSET0 MODULUS1 OFFSET1 ...]',
18 * where there are zero or more MODULUS-OFFSET pairs.
19 * All packets arriving at ELEMENT's
20 * I<n>th input will start `OFFSETI<n>' bytes
21 * off from a `MODULUSI<n>'-byte boundary.
22 * =n
23 * This element is inserted automatically by click-align(1).
24 * =a Align, click-align(1)
25 */
26
27class AlignmentInfo : public Element { public:
28
29 AlignmentInfo();
30
31 const char *class_name() const override { return "AlignmentInfo"; }
32 int configure_phase() const { return CONFIGURE_PHASE_INFO; }
34
35 bool query1(const Element *e, int port, int &chunk, int &offset) const;
36 static bool query(const Element *e, int port, int &chunk, int &offset);
37
38 private:
39
40 Vector<int> _elem_offset;
41 Vector<int> _elem_icount;
42 Vector<int> _chunks;
43 Vector<int> _offsets;
44
45};
46
47CLICK_ENDDECLS
48#endif
Base class for Click elements.
Definition element.hh:42
const Port & port(bool isoutput, int port) const
Return one of the element's ports.
Definition element.hh:566
virtual int configure_phase() const
Return the element's configure phase, which determines the order in which elements are configured and...
Definition element.cc:1308
virtual int configure(Vector< String > &conf, ErrorHandler *errh)
Parse the element's configuration arguments.
Definition element.cc:1372
virtual const char * class_name() const =0
Return the element's class name.
Error reporting class.
Definition error.hh:90
Vector template.
Definition vector.hh:111
Click's Element class.