]> git.stg.codes - ssmd.git/blob - include/acl.h
Removed GTS string.
[ssmd.git] / include / acl.h
1 #ifndef __SSMD_ACL_H__
2 #define __SSMD_ACL_H__
3
4 #include <string>
5 #include <ostream>
6
7 class Pdu;
8
9 namespace SSMD {
10
11 class ACL {
12     public:
13         ACL(unsigned id,
14             unsigned profileId,
15             const std::string & mac,
16             unsigned port,
17             unsigned shape,
18             unsigned burst,
19             bool isUpload);
20         ACL(const ACL & rvalue);
21         ~ACL();
22
23         ACL & operator=(const ACL & rvalue);
24
25         unsigned getId() const { return _id; }
26         unsigned getProfileId() const { return _profileId; }
27         const std::string & getMAC() const { return _mac; }
28         std::string getPort() const { return _port; }
29         unsigned getShape() const { return _shape; }
30         unsigned getBurst() const { return _burst; }
31
32         bool isUpload() const { return _isUpload; }
33
34         void appendPdu(Pdu & pdu) const;
35
36     private:
37         unsigned _id;
38         unsigned _profileId;
39         std::string _mac;
40         std::string _port;
41         unsigned _shape;
42         unsigned _burst;
43
44         bool _isUpload;
45
46         std::string getSuffix() const;
47
48         friend std::ostream & operator<<(std::ostream & stream, const ACL & acl);
49 };
50
51 std::ostream & operator<<(std::ostream & stream, const SSMD::ACL & acl);
52
53 }
54
55 #endif