[369] | 1 | <?php
|
---|
| 2 |
|
---|
[382] | 3 | class NetworkFirewall extends Model
|
---|
[369] | 4 | {
|
---|
| 5 | function __construct($Database, $System)
|
---|
| 6 | {
|
---|
| 7 | parent::__construct($Database, $System);
|
---|
[382] | 8 | $this->Name = 'NetworkFirewall';
|
---|
| 9 | $this->AddPropertyOneToMany('NetworkDevice', 'NetworkDevice');
|
---|
| 10 | $this->AddPropertyString('SourceInterface');
|
---|
| 11 | $this->AddPropertyString('DestinationInterface');
|
---|
| 12 | $this->AddPropertyString('SourceAddress');
|
---|
| 13 | $this->AddPropertyString('DestinationAddress');
|
---|
| 14 | $this->AddPropertyInteger('SourcePort');
|
---|
| 15 | $this->AddPropertyInteger('DestinationPort');
|
---|
| 16 | $this->AddPropertyString('Action');
|
---|
| 17 | $this->AddPropertyString('Comment');
|
---|
| 18 | }
|
---|
| 19 | }
|
---|
| 20 |
|
---|
| 21 | class NetworkMark extends Model
|
---|
| 22 | {
|
---|
| 23 | function __construct($Database, $System)
|
---|
| 24 | {
|
---|
| 25 | parent::__construct($Database, $System);
|
---|
| 26 | $this->Name = 'NetworkMark';
|
---|
| 27 | $this->AddPropertyString('Comment');
|
---|
| 28 | }
|
---|
| 29 | }
|
---|
| 30 |
|
---|
| 31 | class NetworkMangleSubgroup extends Model
|
---|
| 32 | {
|
---|
| 33 | function __construct($Database, $System)
|
---|
| 34 | {
|
---|
| 35 | parent::__construct($Database, $System);
|
---|
| 36 | $this->Name = 'NetworkMangleSubgroup';
|
---|
| 37 | $this->AddPropertyString('AddressRange');
|
---|
| 38 | }
|
---|
| 39 | }
|
---|
| 40 |
|
---|
| 41 | class ModuleNetworkConfigRouterOS extends Module
|
---|
| 42 | {
|
---|
| 43 | function __construct($Database, $System)
|
---|
| 44 | {
|
---|
| 45 | parent::__construct($Database, $System);
|
---|
| 46 | $this->Name = 'NetworkConfigRouterOS';
|
---|
[369] | 47 | $this->Version = '1.0';
|
---|
| 48 | $this->Creator = 'Chronos';
|
---|
| 49 | $this->License = 'GNU/GPL';
|
---|
| 50 | $this->Description = 'Mikrotik RouterOS configuration';
|
---|
[382] | 51 | $this->Dependencies = array('NetworkConfig');
|
---|
| 52 | $this->SupportedModels = array('NetworkFirewall', 'NetworkMark',
|
---|
[383] | 53 | 'NetworkMangleSubgroup');
|
---|
[369] | 54 | }
|
---|
| 55 |
|
---|
| 56 | function Install()
|
---|
| 57 | {
|
---|
| 58 | parent::Install();
|
---|
| 59 | }
|
---|
| 60 |
|
---|
| 61 | function UnInstall()
|
---|
| 62 | {
|
---|
| 63 | parent::UnInstall();
|
---|
| 64 | }
|
---|
| 65 |
|
---|
[424] | 66 | function Start()
|
---|
[369] | 67 | {
|
---|
[424] | 68 | parent::Start();
|
---|
[369] | 69 | }
|
---|
| 70 | }
|
---|
| 71 |
|
---|
| 72 | ?>
|
---|