PageRenderTime 133ms CodeModel.GetById 25ms RepoModel.GetById 1ms app.codeStats 3ms

/RouterOS.AutoObjects/rosobjects.cs

https://bitbucket.org/ayufan/rosapi-csharp
C# | 16451 lines | 12268 code | 3096 blank | 1087 comment | 221 complexity | d04099c0e38204c79053c7f7774239c2 MD5 | raw file
  1. using System;
  2. using System.Net;
  3. using RouterOS.API;
  4. using RouterOS.DataTypes;
  5. using RouterOS.Serialization;
  6. namespace RouterOS
  7. {
  8. [RosObject("certificate", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  9. public class Certificate : RosItemObject<Certificate>
  10. {
  11. // Whether the key is used for building or verifying certificate chains
  12. [RosValue("ca")]
  13. public Boolean? Ca { get; set; }
  14. // E-mail address
  15. [RosValue("email")]
  16. public String Email { get; set; }
  17. // Issuer of the certificate
  18. [RosValue("issuer")]
  19. public String Issuer { get; set; }
  20. // Reference name
  21. [RosValue("name")]
  22. public String Name { get; set; }
  23. // Holder (subject) of the certificate
  24. [RosValue("subject")]
  25. public String Subject { get; set; }
  26. [RosValue("alias", IsDynamic=true)]
  27. public String Alias { get; set; }
  28. [RosValue("decrypted-private-key", IsDynamic=true)]
  29. public String DecryptedPrivateKey { get; set; }
  30. [RosValue("dsa", IsDynamic=true)]
  31. public String Dsa { get; set; }
  32. [RosValue("invalid-after", IsDynamic=true)]
  33. public DateTime? InvalidAfter { get; set; }
  34. [RosValue("invalid-before", IsDynamic=true)]
  35. public DateTime? InvalidBefore { get; set; }
  36. [RosValue("private-key", IsDynamic=true)]
  37. public String PrivateKey { get; set; }
  38. [RosValue("rsa", IsDynamic=true)]
  39. public String Rsa { get; set; }
  40. [RosValue("serial-number", IsDynamic=true)]
  41. public String SerialNumber { get; set; }
  42. public static Certificate Parse(string str, Connection conn)
  43. {
  44. if(string.IsNullOrEmpty(str))
  45. return null;
  46. Certificate obj = new Certificate();
  47. obj.FindByName(conn, str);
  48. return obj;
  49. }
  50. public override string ToString() { return Name.ToString(); }
  51. }
  52. [RosObject("driver", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  53. public class Driver : RosItemObject<Driver>
  54. {
  55. // IO port base address
  56. [RosValue("io")]
  57. public Int32? Io { get; set; }
  58. // IRQ number
  59. [RosValue("irq")]
  60. public Int32? Irq { get; set; }
  61. public enum IsdnProtocolEnum
  62. {
  63. [RosValue("euro")]
  64. Euro,
  65. [RosValue("german")]
  66. German,
  67. }
  68. // ISDN line protocol
  69. [RosValue("isdn-protocol")]
  70. public IsdnProtocolEnum? IsdnProtocol { get; set; }
  71. // Shared Memory base address
  72. [RosValue("memory")]
  73. public Int32? Memory { get; set; }
  74. public enum NameEnum
  75. {
  76. [RosValue("3c509")]
  77. E3c509,
  78. [RosValue("lance")]
  79. Lance,
  80. [RosValue("ne2k-isa")]
  81. Ne2kIsa,
  82. }
  83. // Driver name
  84. [RosValue("name")]
  85. public NameEnum? Name { get; set; }
  86. [RosValue("driver", IsDynamic=true)]
  87. public String DriverName { get; set; }
  88. [RosValue("dynamic", IsDynamic=true)]
  89. public String Dynamic { get; set; }
  90. [RosValue("invalid", IsDynamic=true)]
  91. public String Invalid { get; set; }
  92. public static Driver Parse(string str, Connection conn)
  93. {
  94. if(string.IsNullOrEmpty(str))
  95. return null;
  96. Driver obj = new Driver();
  97. obj.FindByName(conn, str);
  98. return obj;
  99. }
  100. public override string ToString() { return Name.ToString(); }
  101. }
  102. [RosObject("file", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  103. public class File : RosItemObject<File>
  104. {
  105. // Content of the file
  106. [RosValue("contents")]
  107. public String Contents { get; set; }
  108. [RosValue("creation-time", IsDynamic=true)]
  109. public DateTime? CreationTime { get; set; }
  110. [RosValue("name", IsDynamic=true)]
  111. public String Name { get; set; }
  112. [RosValue("package-architecture", IsDynamic=true)]
  113. public String PackageArchitecture { get; set; }
  114. [RosValue("package-build-time", IsDynamic=true)]
  115. public DateTime? PackageBuildTime { get; set; }
  116. [RosValue("package-name", IsDynamic=true)]
  117. public String PackageName { get; set; }
  118. [RosValue("package-version", IsDynamic=true)]
  119. public String PackageVersion { get; set; }
  120. [RosValue("size", IsDynamic=true)]
  121. public Int64? Size { get; set; }
  122. [RosValue("type", IsDynamic=true)]
  123. public String Type { get; set; }
  124. public static File Parse(string str, Connection conn)
  125. {
  126. if(string.IsNullOrEmpty(str))
  127. return null;
  128. File obj = new File();
  129. obj.FindByName(conn, str);
  130. return obj;
  131. }
  132. public override string ToString() { return Name.ToString(); }
  133. }
  134. [RosObject("interface", CanSet=true, CanGet=true)]
  135. public class Interface : RosItemObject<Interface>
  136. {
  137. // Short description of the item
  138. [RosValue("comment")]
  139. public String Comment { get; set; }
  140. // Defines whether item is ignored or used
  141. [RosValue("disabled")]
  142. public Boolean? Disabled { get; set; }
  143. [RosValue("l2mtu")]
  144. public UInt16? L2mtu { get; set; }
  145. // Maximum Transmit Unit
  146. [RosValue("mtu")]
  147. public UInt16? Mtu { get; set; }
  148. // Interface name
  149. [RosValue("name")]
  150. public String Name { get; set; }
  151. [RosValue("bytes", IsDynamic=true)]
  152. public Int64? Bytes { get; set; }
  153. [RosValue("drops", IsDynamic=true)]
  154. public Int32? Drops { get; set; }
  155. [RosValue("dynamic", IsDynamic=true)]
  156. public String Dynamic { get; set; }
  157. [RosValue("errors", IsDynamic=true)]
  158. public Int32? Errors { get; set; }
  159. [RosValue("packets", IsDynamic=true)]
  160. public Int64? Packets { get; set; }
  161. [RosValue("running", IsDynamic=true)]
  162. public String Running { get; set; }
  163. [RosValue("slave", IsDynamic=true)]
  164. public String Slave { get; set; }
  165. [RosValue("type", IsDynamic=true)]
  166. public String Type { get; set; }
  167. public static Interface Parse(string str, Connection conn)
  168. {
  169. if(string.IsNullOrEmpty(str))
  170. return null;
  171. Interface obj = new Interface();
  172. obj.FindByName(conn, str);
  173. return obj;
  174. }
  175. public override string ToString() { return Name.ToString(); }
  176. }
  177. [RosObject("interface bonding", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  178. public class InterfaceBonding : RosItemObject<InterfaceBonding>
  179. {
  180. public enum ArpEnum
  181. {
  182. [RosValue("disabled")]
  183. Disabled,
  184. [RosValue("enabled")]
  185. Enabled,
  186. [RosValue("proxy-arp")]
  187. ProxyArp,
  188. [RosValue("reply-only")]
  189. ReplyOnly,
  190. }
  191. // Address Resolution Protocol
  192. [RosValue("arp")]
  193. public ArpEnum? Arp { get; set; }
  194. // Time in milliseconds for monitoring ARP requests
  195. [RosValue("arp-interval")]
  196. public TimeSpan? ArpInterval { get; set; }
  197. // IP addresses for monitoring
  198. [RosValue("arp-ip-targets")]
  199. public IPAddress[] ArpIpTargets { get; set; }
  200. // Short description of the item
  201. [RosValue("comment")]
  202. public String Comment { get; set; }
  203. // Defines whether item is ignored or used
  204. [RosValue("disabled")]
  205. public Boolean? Disabled { get; set; }
  206. // Time period the interface is disabled if a link failure has been detected
  207. [RosValue("down-delay")]
  208. public TimeSpan? DownDelay { get; set; }
  209. public enum LacpRateEnum
  210. {
  211. [RosValue("1sec")]
  212. E1sec,
  213. [RosValue("30secs")]
  214. E30secs,
  215. }
  216. // Link Aggregation Control Protocol rate specifies how often to exchange with LACPDUs between bonding peer
  217. [RosValue("lacp-rate")]
  218. public LacpRateEnum? LacpRate { get; set; }
  219. public enum LinkMonitoringEnum
  220. {
  221. [RosValue("arp")]
  222. Arp,
  223. [RosValue("mii-type1")]
  224. MiiType1,
  225. [RosValue("mii-type2")]
  226. MiiType2,
  227. [RosValue("none")]
  228. None,
  229. }
  230. // Method for monitoring the link
  231. [RosValue("link-monitoring")]
  232. public LinkMonitoringEnum? LinkMonitoring { get; set; }
  233. // Time in milliseconds for monitoring mii-type link
  234. [RosValue("mii-interval")]
  235. public TimeSpan? MiiInterval { get; set; }
  236. // Interface bonding mode
  237. [RosValue("mode")]
  238. public String Mode { get; set; }
  239. // Maximum Transmit Unit
  240. [RosValue("mtu")]
  241. public UInt16? Mtu { get; set; }
  242. // Interface name
  243. [RosValue("name")]
  244. public String Name { get; set; }
  245. public enum MasterPortEnum
  246. {
  247. [RosValue("none")]
  248. None,
  249. }
  250. public struct PrimaryType
  251. {
  252. private object value;
  253. public MasterPortEnum? MasterPort
  254. {
  255. get { return value as MasterPortEnum?; }
  256. set { this.value = value; }
  257. }
  258. public static implicit operator PrimaryType(MasterPortEnum? value)
  259. {
  260. return new PrimaryType() { value = value };
  261. }public RouterOS.Interface Slave
  262. {
  263. get { return value as RouterOS.Interface; }
  264. set { this.value = value; }
  265. }
  266. public static implicit operator PrimaryType(RouterOS.Interface value)
  267. {
  268. return new PrimaryType() { value = value };
  269. }
  270. public static PrimaryType Parse(string str, Connection conn)
  271. {
  272. try { return new PrimaryType() { value = TypeFormatter.ConvertFromString<MasterPortEnum>(str, conn) }; }
  273. catch(Exception) { }
  274. try { return new PrimaryType() { value = TypeFormatter.ConvertFromString<RouterOS.Interface>(str, conn) }; }
  275. catch(Exception) { }
  276. throw new NotSupportedException();
  277. }
  278. public override string ToString() { return value != null ? value.ToString() : null; }
  279. }
  280. // Slave that will be used in active-backup mode as active link
  281. [RosValue("primary")]
  282. public PrimaryType? Primary { get; set; }
  283. // Interfaces that are used in bonding
  284. [RosValue("slaves")]
  285. public RouterOS.Interface[] Slaves { get; set; }
  286. public enum TransmitHashPolicyEnum
  287. {
  288. [RosValue("layer-2")]
  289. Layer2,
  290. [RosValue("layer-2-and-3")]
  291. Layer2And3,
  292. [RosValue("layer-3-and-4")]
  293. Layer3And4,
  294. }
  295. [RosValue("transmit-hash-policy")]
  296. public TransmitHashPolicyEnum? TransmitHashPolicy { get; set; }
  297. // Time period the interface is disabled if a link has been brought up
  298. [RosValue("up-delay")]
  299. public TimeSpan? UpDelay { get; set; }
  300. [RosValue("mac-address", IsDynamic=true)]
  301. public MACAddress? MacAddress { get; set; }
  302. [RosValue("running", IsDynamic=true)]
  303. public String Running { get; set; }
  304. public static InterfaceBonding Parse(string str, Connection conn)
  305. {
  306. if(string.IsNullOrEmpty(str))
  307. return null;
  308. InterfaceBonding obj = new InterfaceBonding();
  309. obj.FindByName(conn, str);
  310. return obj;
  311. }
  312. public override string ToString() { return Name.ToString(); }
  313. }
  314. [RosObject("interface bridge", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  315. public class InterfaceBridge : RosItemObject<InterfaceBridge>
  316. {
  317. [RosValue("admin-mac")]
  318. public MACAddress? AdminMac { get; set; }
  319. public enum AgeingTimeEnum
  320. {
  321. [RosValue("AgeingTime")]
  322. AgeingTime,
  323. }
  324. // Time the information about host will be kept in the the data base
  325. [RosValue("ageing-time")]
  326. public AgeingTimeEnum? AgeingTime { get; set; }
  327. public enum ArpEnum
  328. {
  329. [RosValue("disabled")]
  330. Disabled,
  331. [RosValue("enabled")]
  332. Enabled,
  333. [RosValue("proxy-arp")]
  334. ProxyArp,
  335. [RosValue("reply-only")]
  336. ReplyOnly,
  337. }
  338. // Address Resolution Protocol
  339. [RosValue("arp")]
  340. public ArpEnum? Arp { get; set; }
  341. [RosValue("auto-mac")]
  342. public Boolean? AutoMac { get; set; }
  343. // Short description of the item
  344. [RosValue("comment")]
  345. public String Comment { get; set; }
  346. // Defines whether item is ignored or used
  347. [RosValue("disabled")]
  348. public Boolean? Disabled { get; set; }
  349. public enum ForwardDelayEnum
  350. {
  351. [RosValue("ForwardDelay")]
  352. ForwardDelay,
  353. }
  354. // Time which is spent in listening/learning state
  355. [RosValue("forward-delay")]
  356. public ForwardDelayEnum? ForwardDelay { get; set; }
  357. [RosValue("l2mtu")]
  358. public UInt16? L2mtu { get; set; }
  359. public enum MaxMessageAgeEnum
  360. {
  361. [RosValue("MaxMessageAge")]
  362. MaxMessageAge,
  363. }
  364. // Time to remember Hello messages received from other bridges
  365. [RosValue("max-message-age")]
  366. public MaxMessageAgeEnum? MaxMessageAge { get; set; }
  367. // Maximum Transmit Unit
  368. [RosValue("mtu")]
  369. public UInt16? Mtu { get; set; }
  370. // Bridge name
  371. [RosValue("name")]
  372. public String Name { get; set; }
  373. // Bridge interface priority
  374. [RosValue("priority")]
  375. public Int32? Priority { get; set; }
  376. public enum ProtocolModeEnum
  377. {
  378. [RosValue("none")]
  379. None,
  380. [RosValue("rstp")]
  381. Rstp,
  382. [RosValue("stp")]
  383. Stp,
  384. }
  385. [RosValue("protocol-mode")]
  386. public ProtocolModeEnum? ProtocolMode { get; set; }
  387. [RosValue("transmit-hold-count")]
  388. public Int32? TransmitHoldCount { get; set; }
  389. [RosValue("mac-address", IsDynamic=true)]
  390. public MACAddress? MacAddress { get; set; }
  391. [RosValue("running", IsDynamic=true)]
  392. public String Running { get; set; }
  393. public static InterfaceBridge Parse(string str, Connection conn)
  394. {
  395. if(string.IsNullOrEmpty(str))
  396. return null;
  397. InterfaceBridge obj = new InterfaceBridge();
  398. obj.FindByName(conn, str);
  399. return obj;
  400. }
  401. public override string ToString() { return Name.ToString(); }
  402. }
  403. [RosObject("interface bridge calea", CanAdd=true, CanSet=true, CanMove=true, CanGet=true, CanRemove=true, CanUnset=true)]
  404. public class InterfaceBridgeCalea : RosItemObject<InterfaceBridgeCalea>
  405. {
  406. public enum ActionEnum
  407. {
  408. [RosValue("sniff")]
  409. Sniff,
  410. [RosValue("sniff-pc")]
  411. SniffPc,
  412. }
  413. // Action to undertake if the packet matches the rule
  414. [RosValue("action")]
  415. public ActionEnum? Action { get; set; }
  416. // ARP destination address
  417. [RosValue("arp-dst-address", CanUnset=true)]
  418. public String ArpDstAddress { get; set; }
  419. // ARP destination MAC address
  420. [RosValue("arp-dst-mac-address", CanUnset=true)]
  421. public String ArpDstMacAddress { get; set; }
  422. [RosValue("arp-gratuitous", CanUnset=true)]
  423. public Boolean? ArpGratuitous { get; set; }
  424. // The hardware type
  425. [RosValue("arp-hardware-type", CanUnset=true)]
  426. public String ArpHardwareType { get; set; }
  427. // The ARP opcode
  428. [RosValue("arp-opcode", CanUnset=true)]
  429. public String ArpOpcode { get; set; }
  430. // ARP packet type
  431. [RosValue("arp-packet-type", CanUnset=true)]
  432. public String ArpPacketType { get; set; }
  433. // ARP source address
  434. [RosValue("arp-src-address", CanUnset=true)]
  435. public String ArpSrcAddress { get; set; }
  436. // ARP source MAC address
  437. [RosValue("arp-src-mac-address", CanUnset=true)]
  438. public String ArpSrcMacAddress { get; set; }
  439. public enum ChainEnum
  440. {
  441. [RosValue("forward")]
  442. Forward,
  443. [RosValue("input")]
  444. Input,
  445. [RosValue("output")]
  446. Output,
  447. }
  448. // Chain name
  449. [RosValue("chain")]
  450. public ChainEnum? Chain { get; set; }
  451. // Short description of the item
  452. [RosValue("comment")]
  453. public String Comment { get; set; }
  454. // Defines whether item is ignored or used
  455. [RosValue("disabled")]
  456. public Boolean? Disabled { get; set; }
  457. // Destination address
  458. [RosValue("dst-address", CanUnset=true)]
  459. public String DstAddress { get; set; }
  460. // Destination MAC address
  461. [RosValue("dst-mac-address", CanUnset=true)]
  462. public String DstMacAddress { get; set; }
  463. // Destination port
  464. [RosValue("dst-port", CanUnset=true)]
  465. public String DstPort { get; set; }
  466. // Bridge interface the packet is coming in
  467. [RosValue("in-bridge", CanUnset=true)]
  468. public String InBridge { get; set; }
  469. // Interface name packets are coming into the bridge
  470. [RosValue("in-interface", CanUnset=true)]
  471. public String InInterface { get; set; }
  472. [RosValue("ingress-priority", CanUnset=true)]
  473. public String IngressPriority { get; set; }
  474. // IP protocol name
  475. [RosValue("ip-protocol", CanUnset=true)]
  476. public String IpProtocol { get; set; }
  477. // Restricts packet match rate to a given limit
  478. [RosValue("limit", CanUnset=true)]
  479. public String Limit { get; set; }
  480. // Defines the prefix to be printed before the logging information
  481. [RosValue("log-prefix")]
  482. public String LogPrefix { get; set; }
  483. // Protocol name or number
  484. [RosValue("mac-protocol", CanUnset=true)]
  485. public String MacProtocol { get; set; }
  486. // Bridge interface the packet is going out
  487. [RosValue("out-bridge", CanUnset=true)]
  488. public String OutBridge { get; set; }
  489. // Interface name packets are leaving the bridge
  490. [RosValue("out-interface", CanUnset=true)]
  491. public String OutInterface { get; set; }
  492. [RosValue("packet-mark", CanUnset=true)]
  493. public String PacketMark { get; set; }
  494. // Packet type
  495. [RosValue("packet-type", CanUnset=true)]
  496. public String PacketType { get; set; }
  497. [RosValue("sniff-id")]
  498. public Int32? SniffId { get; set; }
  499. [RosValue("sniff-target")]
  500. public IPAddress SniffTarget { get; set; }
  501. [RosValue("sniff-target-port")]
  502. public Int32? SniffTargetPort { get; set; }
  503. // Source address
  504. [RosValue("src-address", CanUnset=true)]
  505. public String SrcAddress { get; set; }
  506. // Source MAC address
  507. [RosValue("src-mac-address", CanUnset=true)]
  508. public String SrcMacAddress { get; set; }
  509. // Source port
  510. [RosValue("src-port", CanUnset=true)]
  511. public String SrcPort { get; set; }
  512. // BPDU flags
  513. [RosValue("stp-flags", CanUnset=true)]
  514. public String StpFlags { get; set; }
  515. // Forward delay timer
  516. [RosValue("stp-forward-delay", CanUnset=true)]
  517. public String StpForwardDelay { get; set; }
  518. // STP hello packets time
  519. [RosValue("stp-hello-time", CanUnset=true)]
  520. public String StpHelloTime { get; set; }
  521. // STP maximum age
  522. [RosValue("stp-max-age", CanUnset=true)]
  523. public String StpMaxAge { get; set; }
  524. // STP message age
  525. [RosValue("stp-msg-age", CanUnset=true)]
  526. public String StpMsgAge { get; set; }
  527. // STP port identifier
  528. [RosValue("stp-port", CanUnset=true)]
  529. public String StpPort { get; set; }
  530. // Root bridge MAC address
  531. [RosValue("stp-root-address", CanUnset=true)]
  532. public String StpRootAddress { get; set; }
  533. // Root bridge cost
  534. [RosValue("stp-root-cost", CanUnset=true)]
  535. public String StpRootCost { get; set; }
  536. // Root bridge priority
  537. [RosValue("stp-root-priority", CanUnset=true)]
  538. public String StpRootPriority { get; set; }
  539. // STP message sender MAC address
  540. [RosValue("stp-sender-address", CanUnset=true)]
  541. public String StpSenderAddress { get; set; }
  542. // Sender priority
  543. [RosValue("stp-sender-priority", CanUnset=true)]
  544. public String StpSenderPriority { get; set; }
  545. // Bridge Protocol Data Unit (BPDU) type
  546. [RosValue("stp-type", CanUnset=true)]
  547. public String StpType { get; set; }
  548. // The encapsulated Ethernet type
  549. [RosValue("vlan-encap", CanUnset=true)]
  550. public String VlanEncap { get; set; }
  551. // VLAN identifier field
  552. [RosValue("vlan-id", CanUnset=true)]
  553. public String VlanId { get; set; }
  554. // The user priority field
  555. [RosValue("vlan-priority", CanUnset=true)]
  556. public String VlanPriority { get; set; }
  557. [RosValue("dynamic", IsDynamic=true)]
  558. public String Dynamic { get; set; }
  559. [RosValue("invalid", IsDynamic=true)]
  560. public String Invalid { get; set; }
  561. [RosValue("bytes", IsDynamic=true)]
  562. public Int64? Bytes { get; set; }
  563. [RosValue("packets", IsDynamic=true)]
  564. public Int64? Packets { get; set; }
  565. }
  566. [RosObject("interface bridge filter", CanAdd=true, CanSet=true, CanMove=true, CanGet=true, CanRemove=true, CanUnset=true)]
  567. public class InterfaceBridgeFilter : RosItemObject<InterfaceBridgeFilter>
  568. {
  569. public enum ActionEnum
  570. {
  571. [RosValue("accept")]
  572. Accept,
  573. [RosValue("drop")]
  574. Drop,
  575. [RosValue("jump")]
  576. Jump,
  577. [RosValue("log")]
  578. Log,
  579. [RosValue("mark-packet")]
  580. MarkPacket,
  581. }
  582. // Action to undertake if the packet matches the rule
  583. [RosValue("action")]
  584. public ActionEnum? Action { get; set; }
  585. // ARP destination address
  586. [RosValue("arp-dst-address", CanUnset=true)]
  587. public String ArpDstAddress { get; set; }
  588. // ARP destination MAC address
  589. [RosValue("arp-dst-mac-address", CanUnset=true)]
  590. public String ArpDstMacAddress { get; set; }
  591. [RosValue("arp-gratuitous", CanUnset=true)]
  592. public Boolean? ArpGratuitous { get; set; }
  593. // The hardware type
  594. [RosValue("arp-hardware-type", CanUnset=true)]
  595. public String ArpHardwareType { get; set; }
  596. // The ARP opcode
  597. [RosValue("arp-opcode", CanUnset=true)]
  598. public String ArpOpcode { get; set; }
  599. // ARP packet type
  600. [RosValue("arp-packet-type", CanUnset=true)]
  601. public String ArpPacketType { get; set; }
  602. // ARP source address
  603. [RosValue("arp-src-address", CanUnset=true)]
  604. public String ArpSrcAddress { get; set; }
  605. // ARP source MAC address
  606. [RosValue("arp-src-mac-address", CanUnset=true)]
  607. public String ArpSrcMacAddress { get; set; }
  608. public enum ChainEnum
  609. {
  610. [RosValue("forward")]
  611. Forward,
  612. [RosValue("input")]
  613. Input,
  614. [RosValue("output")]
  615. Output,
  616. }
  617. // Chain name
  618. [RosValue("chain")]
  619. public ChainEnum? Chain { get; set; }
  620. // Short description of the item
  621. [RosValue("comment")]
  622. public String Comment { get; set; }
  623. // Defines whether item is ignored or used
  624. [RosValue("disabled")]
  625. public Boolean? Disabled { get; set; }
  626. // Destination address
  627. [RosValue("dst-address", CanUnset=true)]
  628. public String DstAddress { get; set; }
  629. // Destination MAC address
  630. [RosValue("dst-mac-address", CanUnset=true)]
  631. public String DstMacAddress { get; set; }
  632. // Destination port
  633. [RosValue("dst-port", CanUnset=true)]
  634. public String DstPort { get; set; }
  635. // Bridge interface the packet is coming in
  636. [RosValue("in-bridge", CanUnset=true)]
  637. public String InBridge { get; set; }
  638. // Interface name packets are coming into the bridge
  639. [RosValue("in-interface", CanUnset=true)]
  640. public String InInterface { get; set; }
  641. [RosValue("ingress-priority", CanUnset=true)]
  642. public String IngressPriority { get; set; }
  643. // IP protocol name
  644. [RosValue("ip-protocol", CanUnset=true)]
  645. public String IpProtocol { get; set; }
  646. public enum JumpTargetEnum
  647. {
  648. [RosValue("forward")]
  649. Forward,
  650. [RosValue("input")]
  651. Input,
  652. [RosValue("output")]
  653. Output,
  654. }
  655. // if action=jump, then jump destination should be set here
  656. [RosValue("jump-target")]
  657. public JumpTargetEnum? JumpTarget { get; set; }
  658. // Restricts packet match rate to a given limit
  659. [RosValue("limit", CanUnset=true)]
  660. public String Limit { get; set; }
  661. // Defines the prefix to be printed before the logging information
  662. [RosValue("log-prefix")]
  663. public String LogPrefix { get; set; }
  664. // Protocol name or number
  665. [RosValue("mac-protocol", CanUnset=true)]
  666. public String MacProtocol { get; set; }
  667. [RosValue("new-packet-mark")]
  668. public String NewPacketMark { get; set; }
  669. public enum NewPriorityEnum
  670. {
  671. [RosValue("from-ingress")]
  672. FromIngress,
  673. }
  674. public struct NewPriorityType
  675. {
  676. private object value;
  677. public Int32? Num
  678. {
  679. get { return value as Int32?; }
  680. set { this.value = value; }
  681. }
  682. public static implicit operator NewPriorityType(Int32? value)
  683. {
  684. return new NewPriorityType() { value = value };
  685. }public NewPriorityEnum? State
  686. {
  687. get { return value as NewPriorityEnum?; }
  688. set { this.value = value; }
  689. }
  690. public static implicit operator NewPriorityType(NewPriorityEnum? value)
  691. {
  692. return new NewPriorityType() { value = value };
  693. }
  694. public static NewPriorityType Parse(string str, Connection conn)
  695. {
  696. try { return new NewPriorityType() { value = TypeFormatter.ConvertFromString<Int32>(str, conn) }; }
  697. catch(Exception) { }
  698. try { return new NewPriorityType() { value = TypeFormatter.ConvertFromString<NewPriorityEnum>(str, conn) }; }
  699. catch(Exception) { }
  700. throw new NotSupportedException();
  701. }
  702. public override string ToString() { return value != null ? value.ToString() : null; }
  703. }
  704. [RosValue("new-priority")]
  705. public NewPriorityType? NewPriority { get; set; }
  706. // Bridge interface the packet is going out
  707. [RosValue("out-bridge", CanUnset=true)]
  708. public String OutBridge { get; set; }
  709. // Interface name packets are leaving the bridge
  710. [RosValue("out-interface", CanUnset=true)]
  711. public String OutInterface { get; set; }
  712. [RosValue("packet-mark", CanUnset=true)]
  713. public String PacketMark { get; set; }
  714. // Packet type
  715. [RosValue("packet-type", CanUnset=true)]
  716. public String PacketType { get; set; }
  717. [RosValue("passthrough")]
  718. public Boolean? Passthrough { get; set; }
  719. // Source address
  720. [RosValue("src-address", CanUnset=true)]
  721. public String SrcAddress { get; set; }
  722. // Source MAC address
  723. [RosValue("src-mac-address", CanUnset=true)]
  724. public String SrcMacAddress { get; set; }
  725. // Source port
  726. [RosValue("src-port", CanUnset=true)]
  727. public String SrcPort { get; set; }
  728. // BPDU flags
  729. [RosValue("stp-flags", CanUnset=true)]
  730. public String StpFlags { get; set; }
  731. // Forward delay timer
  732. [RosValue("stp-forward-delay", CanUnset=true)]
  733. public String StpForwardDelay { get; set; }
  734. // STP hello packets time
  735. [RosValue("stp-hello-time", CanUnset=true)]
  736. public String StpHelloTime { get; set; }
  737. // STP maximum age
  738. [RosValue("stp-max-age", CanUnset=true)]
  739. public String StpMaxAge { get; set; }
  740. // STP message age
  741. [RosValue("stp-msg-age", CanUnset=true)]
  742. public String StpMsgAge { get; set; }
  743. // STP port identifier
  744. [RosValue("stp-port", CanUnset=true)]
  745. public String StpPort { get; set; }
  746. // Root bridge MAC address
  747. [RosValue("stp-root-address", CanUnset=true)]
  748. public String StpRootAddress { get; set; }
  749. // Root bridge cost
  750. [RosValue("stp-root-cost", CanUnset=true)]
  751. public String StpRootCost { get; set; }
  752. // Root bridge priority
  753. [RosValue("stp-root-priority", CanUnset=true)]
  754. public String StpRootPriority { get; set; }
  755. // STP message sender MAC address
  756. [RosValue("stp-sender-address", CanUnset=true)]
  757. public String StpSenderAddress { get; set; }
  758. // Sender priority
  759. [RosValue("stp-sender-priority", CanUnset=true)]
  760. public String StpSenderPriority { get; set; }
  761. // Bridge Protocol Data Unit (BPDU) type
  762. [RosValue("stp-type", CanUnset=true)]
  763. public String StpType { get; set; }
  764. // The encapsulated Ethernet type
  765. [RosValue("vlan-encap", CanUnset=true)]
  766. public String VlanEncap { get; set; }
  767. // VLAN identifier field
  768. [RosValue("vlan-id", CanUnset=true)]
  769. public String VlanId { get; set; }
  770. // The user priority field
  771. [RosValue("vlan-priority", CanUnset=true)]
  772. public String VlanPriority { get; set; }
  773. [RosValue("dynamic", IsDynamic=true)]
  774. public String Dynamic { get; set; }
  775. [RosValue("invalid", IsDynamic=true)]
  776. public String Invalid { get; set; }
  777. [RosValue("packets", IsDynamic=true)]
  778. public Int64? Packets { get; set; }
  779. [RosValue("bytes", IsDynamic=true)]
  780. public Int64? Bytes { get; set; }
  781. }
  782. [RosObject("interface bridge host", CanGet=true)]
  783. public class InterfaceBridgeHost : RosItemObject<InterfaceBridgeHost>
  784. {
  785. [RosValue("age", IsDynamic=true)]
  786. public TimeSpan? Age { get; set; }
  787. [RosValue("bridge", IsDynamic=true)]
  788. public RouterOS.Interface Bridge { get; set; }
  789. [RosValue("external-fdb", IsDynamic=true)]
  790. public String ExternalFdb { get; set; }
  791. [RosValue("local", IsDynamic=true)]
  792. public String Local { get; set; }
  793. [RosValue("mac-address", IsDynamic=true)]
  794. public MACAddress? MacAddress { get; set; }
  795. [RosValue("on-interface", IsDynamic=true)]
  796. public RouterOS.Interface OnInterface { get; set; }
  797. }
  798. [RosObject("interface bridge nat", CanAdd=true, CanSet=true, CanMove=true, CanGet=true, CanRemove=true, CanUnset=true)]
  799. public class InterfaceBridgeNat : RosItemObject<InterfaceBridgeNat>
  800. {
  801. public enum ActionEnum
  802. {
  803. [RosValue("accept")]
  804. Accept,
  805. [RosValue("arp-reply")]
  806. ArpReply,
  807. [RosValue("drop")]
  808. Drop,
  809. [RosValue("dst-nat")]
  810. DstNat,
  811. [RosValue("jump")]
  812. Jump,
  813. }
  814. // Action to undertake if the packet matches the rule
  815. [RosValue("action")]
  816. public ActionEnum? Action { get; set; }
  817. // ARP destination address
  818. [RosValue("arp-dst-address", CanUnset=true)]
  819. public String ArpDstAddress { get; set; }
  820. // ARP destination MAC address
  821. [RosValue("arp-dst-mac-address", CanUnset=true)]
  822. public String ArpDstMacAddress { get; set; }
  823. [RosValue("arp-gratuitous", CanUnset=true)]
  824. public Boolean? ArpGratuitous { get; set; }
  825. // The hardware type
  826. [RosValue("arp-hardware-type", CanUnset=true)]
  827. public String ArpHardwareType { get; set; }
  828. // The ARP opcode
  829. [RosValue("arp-opcode", CanUnset=true)]
  830. public String ArpOpcode { get; set; }
  831. // ARP packet type
  832. [RosValue("arp-packet-type", CanUnset=true)]
  833. public String ArpPacketType { get; set; }
  834. // ARP source address
  835. [RosValue("arp-src-address", CanUnset=true)]
  836. public String ArpSrcAddress { get; set; }
  837. // ARP source MAC address
  838. [RosValue("arp-src-mac-address", CanUnset=true)]
  839. public String ArpSrcMacAddress { get; set; }
  840. public enum ChainEnum
  841. {
  842. [RosValue("dstnat")]
  843. Dstnat,
  844. [RosValue("srcnat")]
  845. Srcnat,
  846. }
  847. // Chain name
  848. [RosValue("chain")]
  849. public ChainEnum? Chain { get; set; }
  850. // Short description of the item
  851. [RosValue("comment")]
  852. public String Comment { get; set; }
  853. // Defines whether item is ignored or used
  854. [RosValue("disabled")]
  855. public Boolean? Disabled { get; set; }
  856. // Destination address
  857. [RosValue("dst-address", CanUnset=true)]
  858. public String DstAddress { get; set; }
  859. // Destination MAC address
  860. [RosValue("dst-mac-address", CanUnset=true)]
  861. public String DstMacAddress { get; set; }
  862. // Destination port
  863. [RosValue("dst-port", CanUnset=true)]
  864. public String DstPort { get; set; }
  865. // Bridge interface the packet is coming in
  866. [RosValue("in-bridge", CanUnset=true)]
  867. public String InBridge { get; set; }
  868. // Interface name packets are coming into the bridge
  869. [RosValue("in-interface", CanUnset=true)]
  870. public String InInterface { get; set; }
  871. [RosValue("ingress-priority", CanUnset=true)]
  872. public String IngressPriority { get; set; }
  873. // IP protocol name
  874. [RosValue("ip-protocol", CanUnset=true)]
  875. public String IpProtocol { get; set; }
  876. public enum JumpTargetEnum
  877. {
  878. [RosValue("dstnat")]
  879. Dstnat,
  880. [RosValue("srcnat")]
  881. Srcnat,
  882. }
  883. // if action=jump, then jump destination should be set here
  884. [RosValue("jump-target")]
  885. public JumpTargetEnum? JumpTarget { get; set; }
  886. // Restricts packet match rate to a given limit
  887. [RosValue("limit", CanUnset=true)]
  888. public String Limit { get; set; }
  889. // Defines the prefix to be printed before the logging information
  890. [RosValue("log-prefix")]
  891. public String LogPrefix { get; set; }
  892. // Protocol name or number
  893. [RosValue("mac-protocol", CanUnset=true)]
  894. public String MacProtocol { get; set; }
  895. [RosValue("new-packet-mark")]
  896. public String NewPacketMark { get; set; }
  897. public enum NewPriorityEnum
  898. {
  899. [RosValue("from-ingress")]
  900. FromIngress,
  901. }
  902. [RosValue("new-priority")]
  903. public NewPriorityEnum? NewPriority { get; set; }
  904. // Bridge interface the packet is going out
  905. [RosValue("out-bridge", CanUnset=true)]
  906. public String OutBridge { get; set; }
  907. // Interface name packets are leaving the bridge
  908. [RosValue("out-interface", CanUnset=true)]
  909. public String OutInterface { get; set; }
  910. [RosValue("packet-mark", CanUnset=true)]
  911. public String PacketMark { get; set; }
  912. // Packet type
  913. [RosValue("packet-type", CanUnset=true)]
  914. public String PacketType { get; set; }
  915. [RosValue("passthrough")]
  916. public Boolean? Passthrough { get; set; }
  917. // Source address
  918. [RosValue("src-address", CanUnset=true)]
  919. public String SrcAddress { get; set; }
  920. // Source MAC address
  921. [RosValue("src-mac-address", CanUnset=true)]
  922. public String SrcMacAddress { get; set; }
  923. // Source port
  924. [RosValue("src-port", CanUnset=true)]
  925. public String SrcPort { get; set; }
  926. // BPDU flags
  927. [RosValue("stp-flags", CanUnset=true)]
  928. public String StpFlags { get; set; }
  929. // Forward delay timer
  930. [RosValue("stp-forward-delay", CanUnset=true)]
  931. public String StpForwardDelay { get; set; }
  932. // STP hello packets time
  933. [RosValue("stp-hello-time", CanUnset=true)]
  934. public String StpHelloTime { get; set; }
  935. // STP maximum age
  936. [RosValue("stp-max-age", CanUnset=true)]
  937. public String StpMaxAge { get; set; }
  938. // STP message age
  939. [RosValue("stp-msg-age", CanUnset=true)]
  940. public String StpMsgAge { get; set; }
  941. // STP port identifier
  942. [RosValue("stp-port", CanUnset=true)]
  943. public String StpPort { get; set; }
  944. // Root bridge MAC address
  945. [RosValue("stp-root-address", CanUnset=true)]
  946. public String StpRootAddress { get; set; }
  947. // Root bridge cost
  948. [RosValue("stp-root-cost", CanUnset=true)]
  949. public String StpRootCost { get; set; }
  950. // Root bridge priority
  951. [RosValue("stp-root-priority", CanUnset=true)]
  952. public String StpRootPriority { get; set; }
  953. // STP message sender MAC address
  954. [RosValue("stp-sender-address", CanUnset=true)]
  955. public String StpSenderAddress { get; set; }
  956. // Sender priority
  957. [RosValue("stp-sender-priority", CanUnset=true)]
  958. public String StpSenderPriority { get; set; }
  959. // Bridge Protocol Data Unit (BPDU) type
  960. [RosValue("stp-type", CanUnset=true)]
  961. public String StpType { get; set; }
  962. // Source MAC address to put in Ethernet frame and ARP payload, when action=arp-reply is selected
  963. [RosValue("to-arp-reply-mac-address")]
  964. public MACAddress? ToArpReplyMacAddress { get; set; }
  965. // Destination MAC address to put in Ethernet frames, when action=dst-nat is selected
  966. [RosValue("to-dst-mac-address")]
  967. public MACAddress? ToDstMacAddress { get; set; }
  968. // Source MAC address to put in Ethernet frames, when action=src-nat is selected
  969. [RosValue("to-src-mac-address")]
  970. public MACAddress? ToSrcMacAddress { get; set; }
  971. // The encapsulated Ethernet type
  972. [RosValue("vlan-encap", CanUnset=true)]
  973. public String VlanEncap { get; set; }
  974. // VLAN identifier field
  975. [RosValue("vlan-id", CanUnset=true)]
  976. public String VlanId { get; set; }
  977. // The user priority field
  978. [RosValue("vlan-priority", CanUnset=true)]
  979. public String VlanPriority { get; set; }
  980. [RosValue("dynamic", IsDynamic=true)]
  981. public String Dynamic { get; set; }
  982. [RosValue("invalid", IsDynamic=true)]
  983. public String Invalid { get; set; }
  984. [RosValue("packets", IsDynamic=true)]
  985. public Int64? Packets { get; set; }
  986. [RosValue("bytes", IsDynamic=true)]
  987. public Int64? Bytes { get; set; }
  988. }
  989. [RosObject("interface bridge port", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  990. public class InterfaceBridgePort : RosItemObject<InterfaceBridgePort>
  991. {
  992. // The bridge interface the respective interface is grouped in
  993. [RosValue("bridge")]
  994. public RouterOS.Interface Bridge { get; set; }
  995. // Short description of the item
  996. [RosValue("comment")]
  997. public String Comment { get; set; }
  998. // Defines whether item is ignored or used
  999. [RosValue("disabled")]
  1000. public Boolean? Disabled { get; set; }
  1001. public enum EdgeEnum
  1002. {
  1003. [RosValue("auto")]
  1004. Auto,
  1005. [RosValue("no")]
  1006. No,
  1007. [RosValue("no-discover")]
  1008. NoDiscover,
  1009. [RosValue("yes")]
  1010. Yes,
  1011. [RosValue("yes-discover")]
  1012. YesDiscover,
  1013. }
  1014. [RosValue("edge")]
  1015. public EdgeEnum? Edge { get; set; }
  1016. public enum ExternalFdbEnum
  1017. {
  1018. [RosValue("auto")]
  1019. Auto,
  1020. [RosValue("no")]
  1021. No,
  1022. [RosValue("yes")]
  1023. Yes,
  1024. }
  1025. [RosValue("external-fdb")]
  1026. public ExternalFdbEnum? ExternalFdb { get; set; }
  1027. public enum HorizonEnum
  1028. {
  1029. [RosValue("none")]
  1030. None,
  1031. }
  1032. public struct HorizonType
  1033. {
  1034. private object value;
  1035. public Int32? Num
  1036. {
  1037. get { return value as Int32?; }
  1038. set { this.value = value; }
  1039. }
  1040. public static implicit operator HorizonType(Int32? value)
  1041. {
  1042. return new HorizonType() { value = value };
  1043. }public HorizonEnum? State
  1044. {
  1045. get { return value as HorizonEnum?; }
  1046. set { this.value = value; }
  1047. }
  1048. public static implicit operator HorizonType(HorizonEnum? value)
  1049. {
  1050. return new HorizonType() { value = value };
  1051. }
  1052. public static HorizonType Parse(string str, Connection conn)
  1053. {
  1054. try { return new HorizonType() { value = TypeFormatter.ConvertFromString<Int32>(str, conn) }; }
  1055. catch(Exception) { }
  1056. try { return new HorizonType() { value = TypeFormatter.ConvertFromString<HorizonEnum>(str, conn) }; }
  1057. catch(Exception) { }
  1058. throw new NotSupportedException();
  1059. }
  1060. public override string ToString() { return value != null ? value.ToString() : null; }
  1061. }
  1062. [RosValue("horizon")]
  1063. public HorizonType? Horizon { get; set; }
  1064. // Name of the interface
  1065. [RosValue("interface")]
  1066. public RouterOS.Interface Interface { get; set; }
  1067. // Path cost to the interface, used by STP to determine the 'best' path
  1068. [RosValue("path-cost")]
  1069. public Int32? PathCost { get; set; }
  1070. public enum PointToPointEnum
  1071. {
  1072. [RosValue("auto")]
  1073. Auto,
  1074. [RosValue("no")]
  1075. No,
  1076. [RosValue("yes")]
  1077. Yes,
  1078. }
  1079. [RosValue("point-to-point")]
  1080. public PointToPointEnum? PointToPoint { get; set; }
  1081. // The priority of the interface in comparison with other going to the same subnet
  1082. [RosValue("priority")]
  1083. public Int32? Priority { get; set; }
  1084. [RosValue("debug-info", IsDynamic=true)]
  1085. public String DebugInfo { get; set; }
  1086. [RosValue("designated-bridge", IsDynamic=true)]
  1087. public Int32? DesignatedBridge { get; set; }
  1088. [RosValue("designated-cost", IsDynamic=true)]
  1089. public Int32? DesignatedCost { get; set; }
  1090. [RosValue("designated-port-number", IsDynamic=true)]
  1091. public Int32? DesignatedPortNumber { get; set; }
  1092. [RosValue("dynamic", IsDynamic=true)]
  1093. public String Dynamic { get; set; }
  1094. [RosValue("edge-port", IsDynamic=true)]
  1095. public String EdgePort { get; set; }
  1096. [RosValue("edge-port-discovery", IsDynamic=true)]
  1097. public String EdgePortDiscovery { get; set; }
  1098. [RosValue("external-fdb-status", IsDynamic=true)]
  1099. public String ExternalFdbStatus { get; set; }
  1100. [RosValue("forwarding", IsDynamic=true)]
  1101. public String Forwarding { get; set; }
  1102. [RosValue("inactive", IsDynamic=true)]
  1103. public String Inactive { get; set; }
  1104. [RosValue("learning", IsDynamic=true)]
  1105. public String Learning { get; set; }
  1106. [RosValue("point-to-point-port", IsDynamic=true)]
  1107. public String PointToPointPort { get; set; }
  1108. [RosValue("port-number", IsDynamic=true)]
  1109. public Int32? PortNumber { get; set; }
  1110. public enum RoleType
  1111. {
  1112. [RosValue("alternate-port")]
  1113. AlternatePort,
  1114. [RosValue("backup-port")]
  1115. BackupPort,
  1116. [RosValue("designated-port")]
  1117. DesignatedPort,
  1118. [RosValue("disabled-port")]
  1119. DisabledPort,
  1120. [RosValue("root-port")]
  1121. RootPort,
  1122. }
  1123. [RosValue("role", IsDynamic=true)]
  1124. public RoleType? Role { get; set; }
  1125. [RosValue("root-path-cost", IsDynamic=true)]
  1126. public Int32? RootPathCost { get; set; }
  1127. [RosValue("sending-rstp", IsDynamic=true)]
  1128. public String SendingRstp { get; set; }
  1129. public enum StatusType
  1130. {
  1131. [RosValue("in-bridge")]
  1132. InBridge,
  1133. [RosValue("inactive")]
  1134. Inactive,
  1135. }
  1136. [RosValue("status", IsDynamic=true)]
  1137. public StatusType? Status { get; set; }
  1138. }
  1139. [RosObject("interface bridge settings", CanSet=true, CanGet=true)]
  1140. public class InterfaceBridgeSettings : RosValueObject
  1141. {
  1142. [RosValue("use-ip-firewall")]
  1143. public Boolean? UseIpFirewall { get; set; }
  1144. [RosValue("use-ip-firewall-for-pppoe")]
  1145. public Boolean? UseIpFirewallForPppoe { get; set; }
  1146. [RosValue("use-ip-firewall-for-vlan")]
  1147. public Boolean? UseIpFirewallForVlan { get; set; }
  1148. }
  1149. [RosObject("interface eoip", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true, CanUnset=true)]
  1150. public class InterfaceEoip : RosItemObject<InterfaceEoip>
  1151. {
  1152. public enum ArpEnum
  1153. {
  1154. [RosValue("disabled")]
  1155. Disabled,
  1156. [RosValue("enabled")]
  1157. Enabled,
  1158. [RosValue("proxy-arp")]
  1159. ProxyArp,
  1160. [RosValue("reply-only")]
  1161. ReplyOnly,
  1162. }
  1163. // Address Resolution Protocol
  1164. [RosValue("arp")]
  1165. public ArpEnum? Arp { get; set; }
  1166. // Short description of the item
  1167. [RosValue("comment")]
  1168. public String Comment { get; set; }
  1169. // Defines whether item is ignored or used
  1170. [RosValue("disabled")]
  1171. public Boolean? Disabled { get; set; }
  1172. [RosValue("keepalive", CanUnset=true)]
  1173. public Int32? Keepalive { get; set; }
  1174. [RosValue("l2mtu")]
  1175. public UInt16? L2mtu { get; set; }
  1176. // MAC address of the EoIP interface
  1177. [RosValue("mac-address")]
  1178. public MACAddress? MacAddress { get; set; }
  1179. // Maximum Transmit Unit
  1180. [RosValue("mtu")]
  1181. public UInt16? Mtu { get; set; }
  1182. // Tunnel name
  1183. [RosValue("name")]
  1184. public String Name { get; set; }
  1185. // Remote address of tunnel
  1186. [RosValue("remote-address")]
  1187. public IPAddress RemoteAddress { get; set; }
  1188. // Tunnel identity
  1189. [RosValue("tunnel-id")]
  1190. public Int32? TunnelId { get; set; }
  1191. [RosValue("running", IsDynamic=true)]
  1192. public String Running { get; set; }
  1193. public static InterfaceEoip Parse(string str, Connection conn)
  1194. {
  1195. if(string.IsNullOrEmpty(str))
  1196. return null;
  1197. InterfaceEoip obj = new InterfaceEoip();
  1198. obj.FindByName(conn, str);
  1199. return obj;
  1200. }
  1201. public override string ToString() { return Name.ToString(); }
  1202. }
  1203. [RosObject("interface eoipv6", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true, CanUnset=true)]
  1204. public class InterfaceEoipv6 : RosItemObject<InterfaceEoipv6>
  1205. {
  1206. public enum ArpEnum
  1207. {
  1208. [RosValue("disabled")]
  1209. Disabled,
  1210. [RosValue("enabled")]
  1211. Enabled,
  1212. [RosValue("proxy-arp")]
  1213. ProxyArp,
  1214. [RosValue("reply-only")]
  1215. ReplyOnly,
  1216. }
  1217. // Address Resolution Protocol
  1218. [RosValue("arp")]
  1219. public ArpEnum? Arp { get; set; }
  1220. // Short description of the item
  1221. [RosValue("comment")]
  1222. public String Comment { get; set; }
  1223. // Defines whether item is ignored or used
  1224. [RosValue("disabled")]
  1225. public Boolean? Disabled { get; set; }
  1226. [RosValue("keepalive", CanUnset=true)]
  1227. public Int32? Keepalive { get; set; }
  1228. [RosValue("l2mtu")]
  1229. public UInt16? L2mtu { get; set; }
  1230. [RosValue("local-address")]
  1231. public String LocalAddress { get; set; }
  1232. [RosValue("mac-address")]
  1233. public MACAddress? MacAddress { get; set; }
  1234. // Maximum Transmit Unit
  1235. [RosValue("mtu")]
  1236. public UInt16? Mtu { get; set; }
  1237. // Interface name
  1238. [RosValue("name")]
  1239. public String Name { get; set; }
  1240. [RosValue("remote-address")]
  1241. public String RemoteAddress { get; set; }
  1242. [RosValue("tunnel-id")]
  1243. public Int32? TunnelId { get; set; }
  1244. [RosValue("running", IsDynamic=true)]
  1245. public String Running { get; set; }
  1246. public static InterfaceEoipv6 Parse(string str, Connection conn)
  1247. {
  1248. if(string.IsNullOrEmpty(str))
  1249. return null;
  1250. InterfaceEoipv6 obj = new InterfaceEoipv6();
  1251. obj.FindByName(conn, str);
  1252. return obj;
  1253. }
  1254. public override string ToString() { return Name.ToString(); }
  1255. }
  1256. [RosObject("interface ethernet", CanSet=true, CanGet=true)]
  1257. public class InterfaceEthernet : RosItemObject<InterfaceEthernet>
  1258. {
  1259. public enum ArpEnum
  1260. {
  1261. [RosValue("disabled")]
  1262. Disabled,
  1263. [RosValue("enabled")]
  1264. Enabled,
  1265. [RosValue("proxy-arp")]
  1266. ProxyArp,
  1267. [RosValue("reply-only")]
  1268. ReplyOnly,
  1269. }
  1270. // Address Resolution Protocol
  1271. [RosValue("arp")]
  1272. public ArpEnum? Arp { get; set; }
  1273. // When enabled the interface "advertises" the maximum capabilities to achieve the best connection possible
  1274. [RosValue("auto-negotiation")]
  1275. public Boolean? AutoNegotiation { get; set; }
  1276. public enum CableSettingsEnum
  1277. {
  1278. [RosValue("default")]
  1279. Default,
  1280. [RosValue("short")]
  1281. Short,
  1282. [RosValue("standard")]
  1283. Standard,
  1284. }
  1285. // Ethernet cable type
  1286. [RosValue("cable-settings")]
  1287. public CableSettingsEnum? CableSettings { get; set; }
  1288. // Short description of the item
  1289. [RosValue("comment")]
  1290. public String Comment { get; set; }
  1291. // Disable running check
  1292. [RosValue("disable-running-check")]
  1293. public Boolean? DisableRunningCheck { get; set; }
  1294. // Defines whether item is ignored or used
  1295. [RosValue("disabled")]
  1296. public Boolean? Disabled { get; set; }
  1297. // Defines whether the transmissionof data appearsin two directions simultaneously
  1298. [RosValue("full-duplex")]
  1299. public Boolean? FullDuplex { get; set; }
  1300. [RosValue("l2mtu")]
  1301. public UInt16? L2mtu { get; set; }
  1302. // MAC address
  1303. [RosValue("mac-address")]
  1304. public MACAddress? MacAddress { get; set; }
  1305. [RosValue("mdix-enable")]
  1306. public Boolean? MdixEnable { get; set; }
  1307. // Maximum Transmit Unit
  1308. [RosValue("mtu")]
  1309. public UInt16? Mtu { get; set; }
  1310. // Interface name
  1311. [RosValue("name")]
  1312. public String Name { get; set; }
  1313. public enum PoeOutEnum
  1314. {
  1315. [RosValue("auto")]
  1316. Auto,
  1317. [RosValue("off")]
  1318. Off,
  1319. }
  1320. [RosValue("poe-out")]
  1321. public PoeOutEnum? PoeOut { get; set; }
  1322. public enum SpeedEnum
  1323. {
  1324. [RosValue("100Mbps")]
  1325. E100Mbps,
  1326. [RosValue("10Mbps")]
  1327. E10Mbps,
  1328. [RosValue("1Gbps")]
  1329. E1Gbps,
  1330. }
  1331. // sets the data transmission speed of the interface
  1332. [RosValue("speed")]
  1333. public SpeedEnum? Speed { get; set; }
  1334. [RosValue("driver-rx-byte", IsDynamic=true)]
  1335. public Int64? DriverRxByte { get; set; }
  1336. [RosValue("driver-rx-packet", IsDynamic=true)]
  1337. public Int64? DriverRxPacket { get; set; }
  1338. [RosValue("driver-tx-byte", IsDynamic=true)]
  1339. public Int64? DriverTxByte { get; set; }
  1340. [RosValue("driver-tx-packet", IsDynamic=true)]
  1341. public Int64? DriverTxPacket { get; set; }
  1342. [RosValue("running", IsDynamic=true)]
  1343. public String Running { get; set; }
  1344. [RosValue("rx-1024-1518", IsDynamic=true)]
  1345. public Int64? Rx10241518 { get; set; }
  1346. [RosValue("rx-128-255", IsDynamic=true)]
  1347. public Int64? Rx128255 { get; set; }
  1348. [RosValue("rx-1519-max", IsDynamic=true)]
  1349. public Int64? Rx1519Max { get; set; }
  1350. [RosValue("rx-256-511", IsDynamic=true)]
  1351. public Int64? Rx256511 { get; set; }
  1352. [RosValue("rx-512-1023", IsDynamic=true)]
  1353. public Int64? Rx5121023 { get; set; }
  1354. [RosValue("rx-64", IsDynamic=true)]
  1355. public Int64? Rx64 { get; set; }
  1356. [RosValue("rx-65-127", IsDynamic=true)]
  1357. public Int64? Rx65127 { get; set; }
  1358. [RosValue("rx-align-error", IsDynamic=true)]
  1359. public Int64? RxAlignError { get; set; }
  1360. [RosValue("rx-broadcast", IsDynamic=true)]
  1361. public Int64? RxBroadcast { get; set; }
  1362. [RosValue("rx-bytes", IsDynamic=true)]
  1363. public Int64? RxBytes { get; set; }
  1364. [RosValue("rx-carrier-error", IsDynamic=true)]
  1365. public Int64? RxCarrierError { get; set; }
  1366. [RosValue("rx-code-error", IsDynamic=true)]
  1367. public Int64? RxCodeError { get; set; }
  1368. [RosValue("rx-control", IsDynamic=true)]
  1369. public Int64? RxControl { get; set; }
  1370. [RosValue("rx-drop", IsDynamic=true)]
  1371. public Int64? RxDrop { get; set; }
  1372. [RosValue("rx-fcs-error", IsDynamic=true)]
  1373. public Int64? RxFcsError { get; set; }
  1374. [RosValue("rx-fragment", IsDynamic=true)]
  1375. public Int64? RxFragment { get; set; }
  1376. [RosValue("rx-jabber", IsDynamic=true)]
  1377. public Int64? RxJabber { get; set; }
  1378. [RosValue("rx-length-error", IsDynamic=true)]
  1379. public Int64? RxLengthError { get; set; }
  1380. [RosValue("rx-multicast", IsDynamic=true)]
  1381. public Int64? RxMulticast { get; set; }
  1382. [RosValue("rx-overflow", IsDynamic=true)]
  1383. public Int64? RxOverflow { get; set; }
  1384. [RosValue("rx-packet", IsDynamic=true)]
  1385. public Int64? RxPacket { get; set; }
  1386. [RosValue("rx-pause", IsDynamic=true)]
  1387. public Int64? RxPause { get; set; }
  1388. [RosValue("rx-too-long", IsDynamic=true)]
  1389. public Int64? RxTooLong { get; set; }
  1390. [RosValue("rx-too-short", IsDynamic=true)]
  1391. public Int64? RxTooShort { get; set; }
  1392. [RosValue("rx-unknown-op", IsDynamic=true)]
  1393. public Int64? RxUnknownOp { get; set; }
  1394. [RosValue("slave", IsDynamic=true)]
  1395. public String Slave { get; set; }
  1396. [RosValue("tx-1024-1518", IsDynamic=true)]
  1397. public Int64? Tx10241518 { get; set; }
  1398. [RosValue("tx-1519-max", IsDynamic=true)]
  1399. public Int64? Tx1519Max { get; set; }
  1400. [RosValue("tx-512-1023", IsDynamic=true)]
  1401. public Int64? Tx5121023 { get; set; }
  1402. [RosValue("tx-65-127", IsDynamic=true)]
  1403. public Int64? Tx65127 { get; set; }
  1404. [RosValue("tx-bytes", IsDynamic=true)]
  1405. public Int64? TxBytes { get; set; }
  1406. [RosValue("tx-control", IsDynamic=true)]
  1407. public Int64? TxControl { get; set; }
  1408. [RosValue("tx-drop", IsDynamic=true)]
  1409. public Int64? TxDrop { get; set; }
  1410. [RosValue("tx-excessive-deferred", IsDynamic=true)]
  1411. public Int64? TxExcessiveDeferred { get; set; }
  1412. [RosValue("tx-fragment", IsDynamic=true)]
  1413. public Int64? TxFragment { get; set; }
  1414. [RosValue("tx-late-collision", IsDynamic=true)]
  1415. public Int64? TxLateCollision { get; set; }
  1416. [RosValue("tx-multiple-collision", IsDynamic=true)]
  1417. public Int64? TxMultipleCollision { get; set; }
  1418. [RosValue("tx-pause", IsDynamic=true)]
  1419. public Int64? TxPause { get; set; }
  1420. [RosValue("tx-rx-1024-1518", IsDynamic=true)]
  1421. public Int64? TxRx10241518 { get; set; }
  1422. [RosValue("tx-rx-1519-max", IsDynamic=true)]
  1423. public Int64? TxRx1519Max { get; set; }
  1424. [RosValue("tx-rx-512-1023", IsDynamic=true)]
  1425. public Int64? TxRx5121023 { get; set; }
  1426. [RosValue("tx-rx-65-127", IsDynamic=true)]
  1427. public Int64? TxRx65127 { get; set; }
  1428. [RosValue("tx-too-long", IsDynamic=true)]
  1429. public Int64? TxTooLong { get; set; }
  1430. [RosValue("tx-total-collision", IsDynamic=true)]
  1431. public Int64? TxTotalCollision { get; set; }
  1432. [RosValue("tx-128-255", IsDynamic=true)]
  1433. public Int64? Tx128255 { get; set; }
  1434. [RosValue("tx-256-511", IsDynamic=true)]
  1435. public Int64? Tx256511 { get; set; }
  1436. [RosValue("tx-64", IsDynamic=true)]
  1437. public Int64? Tx64 { get; set; }
  1438. [RosValue("tx-broadcast", IsDynamic=true)]
  1439. public Int64? TxBroadcast { get; set; }
  1440. [RosValue("tx-collision", IsDynamic=true)]
  1441. public Int64? TxCollision { get; set; }
  1442. [RosValue("tx-deferred", IsDynamic=true)]
  1443. public Int64? TxDeferred { get; set; }
  1444. [RosValue("tx-excessive-collision", IsDynamic=true)]
  1445. public Int64? TxExcessiveCollision { get; set; }
  1446. [RosValue("tx-fcs-error", IsDynamic=true)]
  1447. public Int64? TxFcsError { get; set; }
  1448. [RosValue("tx-jabber", IsDynamic=true)]
  1449. public Int64? TxJabber { get; set; }
  1450. [RosValue("tx-multicast", IsDynamic=true)]
  1451. public Int64? TxMulticast { get; set; }
  1452. [RosValue("tx-packet", IsDynamic=true)]
  1453. public Int64? TxPacket { get; set; }
  1454. [RosValue("tx-pause-honored", IsDynamic=true)]
  1455. public Int64? TxPauseHonored { get; set; }
  1456. [RosValue("tx-rx-128-255", IsDynamic=true)]
  1457. public Int64? TxRx128255 { get; set; }
  1458. [RosValue("tx-rx-256-511", IsDynamic=true)]
  1459. public Int64? TxRx256511 { get; set; }
  1460. [RosValue("tx-rx-64", IsDynamic=true)]
  1461. public Int64? TxRx64 { get; set; }
  1462. [RosValue("tx-single-collision", IsDynamic=true)]
  1463. public Int64? TxSingleCollision { get; set; }
  1464. [RosValue("tx-too-short", IsDynamic=true)]
  1465. public Int64? TxTooShort { get; set; }
  1466. [RosValue("tx-underrun", IsDynamic=true)]
  1467. public Int64? TxUnderrun { get; set; }
  1468. public static InterfaceEthernet Parse(string str, Connection conn)
  1469. {
  1470. if(string.IsNullOrEmpty(str))
  1471. return null;
  1472. InterfaceEthernet obj = new InterfaceEthernet();
  1473. obj.FindByName(conn, str);
  1474. return obj;
  1475. }
  1476. public override string ToString() { return Name.ToString(); }
  1477. }
  1478. [RosObject("interface farsync", CanSet=true, CanGet=true)]
  1479. public class InterfaceFarsync : RosItemObject<InterfaceFarsync>
  1480. {
  1481. // CHDLC keepalive period in seconds
  1482. [RosValue("chdlc-keepalive")]
  1483. public TimeSpan? ChdlcKeepalive { get; set; }
  1484. // Speed of internal clock
  1485. [RosValue("clock-rate")]
  1486. public Int32? ClockRate { get; set; }
  1487. public enum ClockSourceEnum
  1488. {
  1489. [RosValue("external")]
  1490. External,
  1491. [RosValue("internal")]
  1492. Internal,
  1493. }
  1494. // Clock source
  1495. [RosValue("clock-source")]
  1496. public ClockSourceEnum? ClockSource { get; set; }
  1497. // Short description of the item
  1498. [RosValue("comment")]
  1499. public String Comment { get; set; }
  1500. // Defines whether item is ignored or used
  1501. [RosValue("disabled")]
  1502. public Boolean? Disabled { get; set; }
  1503. public enum DslAnnexEnum
  1504. {
  1505. [RosValue("a")]
  1506. A,
  1507. [RosValue("b")]
  1508. B,
  1509. }
  1510. [RosValue("dsl-annex")]
  1511. public DslAnnexEnum? DslAnnex { get; set; }
  1512. [RosValue("dsl-backoff")]
  1513. public Int32? DslBackoff { get; set; }
  1514. public enum DslEncapsulationEnum
  1515. {
  1516. [RosValue("mpoa")]
  1517. Mpoa,
  1518. [RosValue("ppp")]
  1519. Ppp,
  1520. }
  1521. [RosValue("dsl-encapsulation")]
  1522. public DslEncapsulationEnum? DslEncapsulation { get; set; }
  1523. [RosValue("dsl-lpath")]
  1524. public Int32? DslLpath { get; set; }
  1525. [RosValue("dsl-snrth")]
  1526. public Int32? DslSnrth { get; set; }
  1527. public enum DslTerminalEnum
  1528. {
  1529. [RosValue("central")]
  1530. Central,
  1531. [RosValue("remote")]
  1532. Remote,
  1533. }
  1534. [RosValue("dsl-terminal")]
  1535. public DslTerminalEnum? DslTerminal { get; set; }
  1536. [RosValue("dsl-test-mode")]
  1537. public Int32? DslTestMode { get; set; }
  1538. [RosValue("dsl-vci")]
  1539. public Int32? DslVci { get; set; }
  1540. [RosValue("dsl-vpi")]
  1541. public Int32? DslVpi { get; set; }
  1542. // Operate or not in DCE mode
  1543. [RosValue("frame-relay-dce")]
  1544. public Boolean? FrameRelayDce { get; set; }
  1545. public enum FrameRelayLmiTypeEnum
  1546. {
  1547. [RosValue("ansi")]
  1548. Ansi,
  1549. [RosValue("ccitt")]
  1550. Ccitt,
  1551. }
  1552. // Frame-Relay Local Management Interface type
  1553. [RosValue("frame-relay-lmi-type")]
  1554. public FrameRelayLmiTypeEnum? FrameRelayLmiType { get; set; }
  1555. [RosValue("invert-phase")]
  1556. public Boolean? InvertPhase { get; set; }
  1557. public enum LineProtocolEnum
  1558. {
  1559. [RosValue("cisco-hdlc")]
  1560. CiscoHdlc,
  1561. [RosValue("frame-relay")]
  1562. FrameRelay,
  1563. [RosValue("sync-ppp")]
  1564. SyncPpp,
  1565. }
  1566. // Line protocol
  1567. [RosValue("line-protocol")]
  1568. public LineProtocolEnum? LineProtocol { get; set; }
  1569. public enum MediaTypeEnum
  1570. {
  1571. [RosValue("E1")]
  1572. E1,
  1573. [RosValue("SHDSL")]
  1574. SHDSL,
  1575. [RosValue("T1")]
  1576. T1,
  1577. [RosValue("V24")]
  1578. V24,
  1579. [RosValue("V35")]
  1580. V35,
  1581. }
  1582. // Type of the media
  1583. [RosValue("media-type")]
  1584. public MediaTypeEnum? MediaType { get; set; }
  1585. // Maximum Transmit Unit
  1586. [RosValue("mtu")]
  1587. public UInt16? Mtu { get; set; }
  1588. // Interface name
  1589. [RosValue("name")]
  1590. public String Name { get; set; }
  1591. public enum Te1CodingEnum
  1592. {
  1593. [RosValue("ami")]
  1594. Ami,
  1595. [RosValue("ami-zcs")]
  1596. AmiZcs,
  1597. [RosValue("b8zs")]
  1598. B8zs,
  1599. [RosValue("hdb3")]
  1600. Hdb3,
  1601. }
  1602. [RosValue("te1-coding")]
  1603. public Te1CodingEnum? Te1Coding { get; set; }
  1604. public enum Te1EqualizerEnum
  1605. {
  1606. [RosValue("long")]
  1607. Long,
  1608. [RosValue("short")]
  1609. Short,
  1610. }
  1611. [RosValue("te1-equalizer")]
  1612. public Te1EqualizerEnum? Te1Equalizer { get; set; }
  1613. [RosValue("te1-idle-code")]
  1614. public Int32? Te1IdleCode { get; set; }
  1615. public enum Te1InterfaceEnum
  1616. {
  1617. [RosValue("bnc")]
  1618. Bnc,
  1619. [RosValue("rj48c")]
  1620. Rj48c,
  1621. }
  1622. [RosValue("te1-interface")]
  1623. public Te1InterfaceEnum? Te1Interface { get; set; }
  1624. public enum Te1LineBuildOutEnum
  1625. {
  1626. [RosValue("0db")]
  1627. E0db,
  1628. [RosValue("15db")]
  1629. E15db,
  1630. [RosValue("22db")]
  1631. E22db,
  1632. [RosValue("7db")]
  1633. E7db,
  1634. }
  1635. [RosValue("te1-line-build-out")]
  1636. public Te1LineBuildOutEnum? Te1LineBuildOut { get; set; }
  1637. public enum Te1LoopEnum
  1638. {
  1639. [RosValue("local")]
  1640. Local,
  1641. [RosValue("none")]
  1642. None,
  1643. [RosValue("payload-exc-ts0")]
  1644. PayloadExcTs0,
  1645. [RosValue("payload-inc-ts0")]
  1646. PayloadIncTs0,
  1647. [RosValue("remote")]
  1648. Remote,
  1649. }
  1650. [RosValue("te1-loop")]
  1651. public Te1LoopEnum? Te1Loop { get; set; }
  1652. public enum Te1ModeEnum
  1653. {
  1654. [RosValue("master")]
  1655. Master,
  1656. [RosValue("slave")]
  1657. Slave,
  1658. }
  1659. [RosValue("te1-mode")]
  1660. public Te1ModeEnum? Te1Mode { get; set; }
  1661. public enum Te1RangeEnum
  1662. {
  1663. [RosValue("0m-40m")]
  1664. E0m40m,
  1665. [RosValue("122m-162m")]
  1666. E122m162m,
  1667. [RosValue("162m-200m")]
  1668. E162m200m,
  1669. [RosValue("40m-81m")]
  1670. E40m81m,
  1671. [RosValue("81m-122m")]
  1672. E81m122m,
  1673. }
  1674. [RosValue("te1-range")]
  1675. public Te1RangeEnum? Te1Range { get; set; }
  1676. public enum Te1RxBufferEnum
  1677. {
  1678. [RosValue("1-frame")]
  1679. E1Frame,
  1680. [RosValue("2-frame")]
  1681. E2Frame,
  1682. [RosValue("96-bit")]
  1683. E96Bit,
  1684. [RosValue("none")]
  1685. None,
  1686. }
  1687. [RosValue("te1-rx-buffer")]
  1688. public Te1RxBufferEnum? Te1RxBuffer { get; set; }
  1689. [RosValue("te1-start-slot")]
  1690. public Int32? Te1StartSlot { get; set; }
  1691. public enum Te1StructureEnum
  1692. {
  1693. [RosValue("e1-crc4")]
  1694. E1Crc4,
  1695. [RosValue("e1-crc4m")]
  1696. E1Crc4m,
  1697. [RosValue("e1-double")]
  1698. E1Double,
  1699. [RosValue("t1-f12")]
  1700. T1F12,
  1701. [RosValue("t1-f24")]
  1702. T1F24,
  1703. }
  1704. [RosValue("te1-structure")]
  1705. public Te1StructureEnum? Te1Structure { get; set; }
  1706. public enum Te1TxBufferEnum
  1707. {
  1708. [RosValue("1-frame")]
  1709. E1Frame,
  1710. [RosValue("2-frame")]
  1711. E2Frame,
  1712. [RosValue("96-bit")]
  1713. E96Bit,
  1714. [RosValue("none")]
  1715. None,
  1716. }
  1717. [RosValue("te1-tx-buffer")]
  1718. public Te1TxBufferEnum? Te1TxBuffer { get; set; }
  1719. [RosValue("running", IsDynamic=true)]
  1720. public String Running { get; set; }
  1721. public static InterfaceFarsync Parse(string str, Connection conn)
  1722. {
  1723. if(string.IsNullOrEmpty(str))
  1724. return null;
  1725. InterfaceFarsync obj = new InterfaceFarsync();
  1726. obj.FindByName(conn, str);
  1727. return obj;
  1728. }
  1729. public override string ToString() { return Name.ToString(); }
  1730. }
  1731. [RosObject("interface gre", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true, CanUnset=true)]
  1732. public class InterfaceGre : RosItemObject<InterfaceGre>
  1733. {
  1734. public enum ArpEnum
  1735. {
  1736. [RosValue("disabled")]
  1737. Disabled,
  1738. [RosValue("enabled")]
  1739. Enabled,
  1740. [RosValue("proxy-arp")]
  1741. ProxyArp,
  1742. [RosValue("reply-only")]
  1743. ReplyOnly,
  1744. }
  1745. // Address Resolution Protocol
  1746. [RosValue("arp")]
  1747. public ArpEnum? Arp { get; set; }
  1748. // Short description of the item
  1749. [RosValue("comment")]
  1750. public String Comment { get; set; }
  1751. // Defines whether item is ignored or used
  1752. [RosValue("disabled")]
  1753. public Boolean? Disabled { get; set; }
  1754. [RosValue("keepalive", CanUnset=true)]
  1755. public Int32? Keepalive { get; set; }
  1756. [RosValue("l2mtu")]
  1757. public UInt16? L2mtu { get; set; }
  1758. [RosValue("local-address")]
  1759. public IPAddress LocalAddress { get; set; }
  1760. // Maximum Transmit Unit
  1761. [RosValue("mtu")]
  1762. public UInt16? Mtu { get; set; }
  1763. // Interface name
  1764. [RosValue("name")]
  1765. public String Name { get; set; }
  1766. [RosValue("remote-address")]
  1767. public IPAddress RemoteAddress { get; set; }
  1768. [RosValue("running", IsDynamic=true)]
  1769. public String Running { get; set; }
  1770. public static InterfaceGre Parse(string str, Connection conn)
  1771. {
  1772. if(string.IsNullOrEmpty(str))
  1773. return null;
  1774. InterfaceGre obj = new InterfaceGre();
  1775. obj.FindByName(conn, str);
  1776. return obj;
  1777. }
  1778. public override string ToString() { return Name.ToString(); }
  1779. }
  1780. [RosObject("interface ipip", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  1781. public class InterfaceIpip : RosItemObject<InterfaceIpip>
  1782. {
  1783. // Short description of the item
  1784. [RosValue("comment")]
  1785. public String Comment { get; set; }
  1786. // Defines whether item is ignored or used
  1787. [RosValue("disabled")]
  1788. public Boolean? Disabled { get; set; }
  1789. // Local address of tunnel
  1790. [RosValue("local-address")]
  1791. public IPAddress LocalAddress { get; set; }
  1792. // Maximum Transmit Unit
  1793. [RosValue("mtu")]
  1794. public UInt16? Mtu { get; set; }
  1795. // Tunnel name
  1796. [RosValue("name")]
  1797. public String Name { get; set; }
  1798. // Remote address of tunnel
  1799. [RosValue("remote-address")]
  1800. public IPAddress RemoteAddress { get; set; }
  1801. [RosValue("dynamic", IsDynamic=true)]
  1802. public String Dynamic { get; set; }
  1803. [RosValue("running", IsDynamic=true)]
  1804. public String Running { get; set; }
  1805. public static InterfaceIpip Parse(string str, Connection conn)
  1806. {
  1807. if(string.IsNullOrEmpty(str))
  1808. return null;
  1809. InterfaceIpip obj = new InterfaceIpip();
  1810. obj.FindByName(conn, str);
  1811. return obj;
  1812. }
  1813. public override string ToString() { return Name.ToString(); }
  1814. }
  1815. [RosObject("interface ipipv6", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  1816. public class InterfaceIpipv6 : RosItemObject<InterfaceIpipv6>
  1817. {
  1818. // Short description of the item
  1819. [RosValue("comment")]
  1820. public String Comment { get; set; }
  1821. // Defines whether item is ignored or used
  1822. [RosValue("disabled")]
  1823. public Boolean? Disabled { get; set; }
  1824. public enum DscpEnum
  1825. {
  1826. [RosValue("inherit")]
  1827. Inherit,
  1828. }
  1829. public struct DscpType
  1830. {
  1831. private object value;
  1832. public Int32? Num
  1833. {
  1834. get { return value as Int32?; }
  1835. set { this.value = value; }
  1836. }
  1837. public static implicit operator DscpType(Int32? value)
  1838. {
  1839. return new DscpType() { value = value };
  1840. }public DscpEnum? State
  1841. {
  1842. get { return value as DscpEnum?; }
  1843. set { this.value = value; }
  1844. }
  1845. public static implicit operator DscpType(DscpEnum? value)
  1846. {
  1847. return new DscpType() { value = value };
  1848. }
  1849. public static DscpType Parse(string str, Connection conn)
  1850. {
  1851. try { return new DscpType() { value = TypeFormatter.ConvertFromString<Int32>(str, conn) }; }
  1852. catch(Exception) { }
  1853. try { return new DscpType() { value = TypeFormatter.ConvertFromString<DscpEnum>(str, conn) }; }
  1854. catch(Exception) { }
  1855. throw new NotSupportedException();
  1856. }
  1857. public override string ToString() { return value != null ? value.ToString() : null; }
  1858. }
  1859. [RosValue("dscp")]
  1860. public DscpType? Dscp { get; set; }
  1861. [RosValue("local-address")]
  1862. public String LocalAddress { get; set; }
  1863. // Maximum Transmit Unit
  1864. [RosValue("mtu")]
  1865. public UInt16? Mtu { get; set; }
  1866. // Interface name
  1867. [RosValue("name")]
  1868. public String Name { get; set; }
  1869. [RosValue("remote-address")]
  1870. public String RemoteAddress { get; set; }
  1871. [RosValue("dynamic", IsDynamic=true)]
  1872. public String Dynamic { get; set; }
  1873. [RosValue("running", IsDynamic=true)]
  1874. public String Running { get; set; }
  1875. public static InterfaceIpipv6 Parse(string str, Connection conn)
  1876. {
  1877. if(string.IsNullOrEmpty(str))
  1878. return null;
  1879. InterfaceIpipv6 obj = new InterfaceIpipv6();
  1880. obj.FindByName(conn, str);
  1881. return obj;
  1882. }
  1883. public override string ToString() { return Name.ToString(); }
  1884. }
  1885. [RosObject("interface isdn-client", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  1886. public class InterfaceIsdnClient : RosItemObject<InterfaceIsdnClient>
  1887. {
  1888. // Add PPP remote address as a default route
  1889. [RosValue("add-default-route")]
  1890. public Boolean? AddDefaultRoute { get; set; }
  1891. // The authentication method to allow for the client
  1892. [RosValue("allow")]
  1893. public String Allow { get; set; }
  1894. [RosValue("bundle-128k")]
  1895. public Boolean? Bundle128k { get; set; }
  1896. // Short description of the item
  1897. [RosValue("comment")]
  1898. public String Comment { get; set; }
  1899. // Enable/Disable dial on demand
  1900. [RosValue("dial-on-demand")]
  1901. public Boolean? DialOnDemand { get; set; }
  1902. // Defines whether item is ignored or used
  1903. [RosValue("disabled")]
  1904. public Boolean? Disabled { get; set; }
  1905. public enum L2ProtocolEnum
  1906. {
  1907. [RosValue("hdlc")]
  1908. Hdlc,
  1909. [RosValue("x75bui")]
  1910. X75bui,
  1911. [RosValue("x75i")]
  1912. X75i,
  1913. [RosValue("x75ui")]
  1914. X75ui,
  1915. }
  1916. // Level 2 protocol to use
  1917. [RosValue("l2-protocol")]
  1918. public L2ProtocolEnum? L2Protocol { get; set; }
  1919. // Maximum Receive Unit
  1920. [RosValue("max-mru")]
  1921. public Int32? MaxMru { get; set; }
  1922. // Maximum Transmission Unit
  1923. [RosValue("max-mtu")]
  1924. public Int32? MaxMtu { get; set; }
  1925. // MSN/EAZ of ISDN line
  1926. [RosValue("msn")]
  1927. public String Msn { get; set; }
  1928. // ISDN client name
  1929. [RosValue("name")]
  1930. public String Name { get; set; }
  1931. // Password that will be provided to the remote server
  1932. [RosValue("password")]
  1933. public String Password { get; set; }
  1934. // Phone number for dialout
  1935. [RosValue("phone")]
  1936. public String Phone { get; set; }
  1937. // Profile to use when connecting to the remote server
  1938. [RosValue("profile")]
  1939. public RouterOS.PppProfile Profile { get; set; }
  1940. // Use or not peer DNS
  1941. [RosValue("use-peer-dns")]
  1942. public Boolean? UsePeerDns { get; set; }
  1943. // User name to use for dialout
  1944. [RosValue("user")]
  1945. public String User { get; set; }
  1946. [RosValue("running", IsDynamic=true)]
  1947. public String Running { get; set; }
  1948. public static InterfaceIsdnClient Parse(string str, Connection conn)
  1949. {
  1950. if(string.IsNullOrEmpty(str))
  1951. return null;
  1952. InterfaceIsdnClient obj = new InterfaceIsdnClient();
  1953. obj.FindByName(conn, str);
  1954. return obj;
  1955. }
  1956. public override string ToString() { return Name.ToString(); }
  1957. }
  1958. [RosObject("interface isdn-server", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  1959. public class InterfaceIsdnServer : RosItemObject<InterfaceIsdnServer>
  1960. {
  1961. // The kind of authentication
  1962. [RosValue("authentication")]
  1963. public String Authentication { get; set; }
  1964. [RosValue("bundle-128k")]
  1965. public Boolean? Bundle128k { get; set; }
  1966. // Short description of the item
  1967. [RosValue("comment")]
  1968. public String Comment { get; set; }
  1969. // Defines whether item is ignored or used
  1970. [RosValue("disabled")]
  1971. public Boolean? Disabled { get; set; }
  1972. public enum L2ProtocolEnum
  1973. {
  1974. [RosValue("hdlc")]
  1975. Hdlc,
  1976. [RosValue("x75bui")]
  1977. X75bui,
  1978. [RosValue("x75i")]
  1979. X75i,
  1980. [RosValue("x75ui")]
  1981. X75ui,
  1982. }
  1983. // Level 2 protocol to use
  1984. [RosValue("l2-protocol")]
  1985. public L2ProtocolEnum? L2Protocol { get; set; }
  1986. // Maximum Receive Unit
  1987. [RosValue("max-mru")]
  1988. public Int32? MaxMru { get; set; }
  1989. // Maximum Transmission Unit
  1990. [RosValue("max-mtu")]
  1991. public Int32? MaxMtu { get; set; }
  1992. // MSN/EAZ of ISDN line
  1993. [RosValue("msn")]
  1994. public String Msn { get; set; }
  1995. // ISDN server name
  1996. [RosValue("name")]
  1997. public String Name { get; set; }
  1998. // Profile to use when connecting to the server
  1999. [RosValue("profile")]
  2000. public RouterOS.PppProfile Profile { get; set; }
  2001. [RosValue("running", IsDynamic=true)]
  2002. public String Running { get; set; }
  2003. public static InterfaceIsdnServer Parse(string str, Connection conn)
  2004. {
  2005. if(string.IsNullOrEmpty(str))
  2006. return null;
  2007. InterfaceIsdnServer obj = new InterfaceIsdnServer();
  2008. obj.FindByName(conn, str);
  2009. return obj;
  2010. }
  2011. public override string ToString() { return Name.ToString(); }
  2012. }
  2013. [RosObject("interface l2tp-client", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  2014. public class InterfaceL2tpClient : RosItemObject<InterfaceL2tpClient>
  2015. {
  2016. // Whether to use server which this client is connected to as its default gateway
  2017. [RosValue("add-default-route")]
  2018. public Boolean? AddDefaultRoute { get; set; }
  2019. // The authentication method to allow for the client
  2020. [RosValue("allow")]
  2021. public String Allow { get; set; }
  2022. // Short description of the item
  2023. [RosValue("comment")]
  2024. public String Comment { get; set; }
  2025. // The IP address of the L2TP server to connect to
  2026. [RosValue("connect-to")]
  2027. public IPAddress ConnectTo { get; set; }
  2028. [RosValue("dial-on-demand")]
  2029. public Boolean? DialOnDemand { get; set; }
  2030. // Defines whether item is ignored or used
  2031. [RosValue("disabled")]
  2032. public Boolean? Disabled { get; set; }
  2033. // Maximum Receive Unit
  2034. [RosValue("max-mru")]
  2035. public Int32? MaxMru { get; set; }
  2036. // Maximum Transmission Unit
  2037. [RosValue("max-mtu")]
  2038. public Int32? MaxMtu { get; set; }
  2039. public enum MrruEnum
  2040. {
  2041. [RosValue("disabled")]
  2042. Disabled,
  2043. }
  2044. public struct MrruType
  2045. {
  2046. private object value;
  2047. public Int32? Num
  2048. {
  2049. get { return value as Int32?; }
  2050. set { this.value = value; }
  2051. }
  2052. public static implicit operator MrruType(Int32? value)
  2053. {
  2054. return new MrruType() { value = value };
  2055. }public MrruEnum? State
  2056. {
  2057. get { return value as MrruEnum?; }
  2058. set { this.value = value; }
  2059. }
  2060. public static implicit operator MrruType(MrruEnum? value)
  2061. {
  2062. return new MrruType() { value = value };
  2063. }
  2064. public static MrruType Parse(string str, Connection conn)
  2065. {
  2066. try { return new MrruType() { value = TypeFormatter.ConvertFromString<Int32>(str, conn) }; }
  2067. catch(Exception) { }
  2068. try { return new MrruType() { value = TypeFormatter.ConvertFromString<MrruEnum>(str, conn) }; }
  2069. catch(Exception) { }
  2070. throw new NotSupportedException();
  2071. }
  2072. public override string ToString() { return value != null ? value.ToString() : null; }
  2073. }
  2074. [RosValue("mrru")]
  2075. public MrruType? Mrru { get; set; }
  2076. // Interface name
  2077. [RosValue("name")]
  2078. public String Name { get; set; }
  2079. // User's password to use when logging to the remote server
  2080. [RosValue("password")]
  2081. public String Password { get; set; }
  2082. // Profile to use when connecting to the remote server
  2083. [RosValue("profile")]
  2084. public RouterOS.PppProfile Profile { get; set; }
  2085. // The name of the user
  2086. [RosValue("user")]
  2087. public String User { get; set; }
  2088. [RosValue("running", IsDynamic=true)]
  2089. public String Running { get; set; }
  2090. public static InterfaceL2tpClient Parse(string str, Connection conn)
  2091. {
  2092. if(string.IsNullOrEmpty(str))
  2093. return null;
  2094. InterfaceL2tpClient obj = new InterfaceL2tpClient();
  2095. obj.FindByName(conn, str);
  2096. return obj;
  2097. }
  2098. public override string ToString() { return Name.ToString(); }
  2099. }
  2100. [RosObject("interface l2tp-server", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  2101. public class InterfaceL2tpServer : RosItemObject<InterfaceL2tpServer>
  2102. {
  2103. // Short description of the item
  2104. [RosValue("comment")]
  2105. public String Comment { get; set; }
  2106. // Defines whether item is ignored or used
  2107. [RosValue("disabled")]
  2108. public Boolean? Disabled { get; set; }
  2109. // Interface name
  2110. [RosValue("name")]
  2111. public String Name { get; set; }
  2112. // The name of the user
  2113. [RosValue("user")]
  2114. public String User { get; set; }
  2115. [RosValue("client-address", IsDynamic=true)]
  2116. public String ClientAddress { get; set; }
  2117. [RosValue("dynamic", IsDynamic=true)]
  2118. public String Dynamic { get; set; }
  2119. [RosValue("encoding", IsDynamic=true)]
  2120. public String Encoding { get; set; }
  2121. [RosValue("mru", IsDynamic=true)]
  2122. public Int32? Mru { get; set; }
  2123. [RosValue("mtu", IsDynamic=true)]
  2124. public Int32? Mtu { get; set; }
  2125. [RosValue("running", IsDynamic=true)]
  2126. public String Running { get; set; }
  2127. [RosValue("uptime", IsDynamic=true)]
  2128. public TimeSpan? Uptime { get; set; }
  2129. public static InterfaceL2tpServer Parse(string str, Connection conn)
  2130. {
  2131. if(string.IsNullOrEmpty(str))
  2132. return null;
  2133. InterfaceL2tpServer obj = new InterfaceL2tpServer();
  2134. obj.FindByName(conn, str);
  2135. return obj;
  2136. }
  2137. public override string ToString() { return Name.ToString(); }
  2138. }
  2139. [RosObject("interface l2tp-server server", CanSet=true, CanGet=true)]
  2140. public class InterfaceL2tpServerServer : RosValueObject
  2141. {
  2142. // Authentication algorithm
  2143. [RosValue("authentication")]
  2144. public String Authentication { get; set; }
  2145. // Default profile to use
  2146. [RosValue("default-profile")]
  2147. public RouterOS.PppProfile DefaultProfile { get; set; }
  2148. // Defines whether L2TP server is enabled or not
  2149. [RosValue("enabled")]
  2150. public Boolean? Enabled { get; set; }
  2151. // Maximum Receive Unit
  2152. [RosValue("max-mru")]
  2153. public Int32? MaxMru { get; set; }
  2154. // Maximum Transmission Unit
  2155. [RosValue("max-mtu")]
  2156. public Int32? MaxMtu { get; set; }
  2157. public enum MrruEnum
  2158. {
  2159. [RosValue("disabled")]
  2160. Disabled,
  2161. }
  2162. public struct MrruType
  2163. {
  2164. private object value;
  2165. public Int32? Num
  2166. {
  2167. get { return value as Int32?; }
  2168. set { this.value = value; }
  2169. }
  2170. public static implicit operator MrruType(Int32? value)
  2171. {
  2172. return new MrruType() { value = value };
  2173. }public MrruEnum? State
  2174. {
  2175. get { return value as MrruEnum?; }
  2176. set { this.value = value; }
  2177. }
  2178. public static implicit operator MrruType(MrruEnum? value)
  2179. {
  2180. return new MrruType() { value = value };
  2181. }
  2182. public static MrruType Parse(string str, Connection conn)
  2183. {
  2184. try { return new MrruType() { value = TypeFormatter.ConvertFromString<Int32>(str, conn) }; }
  2185. catch(Exception) { }
  2186. try { return new MrruType() { value = TypeFormatter.ConvertFromString<MrruEnum>(str, conn) }; }
  2187. catch(Exception) { }
  2188. throw new NotSupportedException();
  2189. }
  2190. public override string ToString() { return value != null ? value.ToString() : null; }
  2191. }
  2192. [RosValue("mrru")]
  2193. public MrruType? Mrru { get; set; }
  2194. }
  2195. [RosObject("interface mesh", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  2196. public class InterfaceMesh : RosItemObject<InterfaceMesh>
  2197. {
  2198. [RosValue("admin-mac")]
  2199. public MACAddress? AdminMac { get; set; }
  2200. public enum ArpEnum
  2201. {
  2202. [RosValue("disabled")]
  2203. Disabled,
  2204. [RosValue("enabled")]
  2205. Enabled,
  2206. [RosValue("proxy-arp")]
  2207. ProxyArp,
  2208. [RosValue("reply-only")]
  2209. ReplyOnly,
  2210. }
  2211. // Address Resolution Protocol
  2212. [RosValue("arp")]
  2213. public ArpEnum? Arp { get; set; }
  2214. [RosValue("auto-mac")]
  2215. public Boolean? AutoMac { get; set; }
  2216. // Short description of the item
  2217. [RosValue("comment")]
  2218. public String Comment { get; set; }
  2219. // Defines whether item is ignored or used
  2220. [RosValue("disabled")]
  2221. public Boolean? Disabled { get; set; }
  2222. [RosValue("hwmp-default-hoplimit")]
  2223. public Int32? HwmpDefaultHoplimit { get; set; }
  2224. public enum HwmpPrepLifetimeEnum
  2225. {
  2226. [RosValue("HwmpPrepLifetime")]
  2227. HwmpPrepLifetime,
  2228. }
  2229. [RosValue("hwmp-prep-lifetime")]
  2230. public HwmpPrepLifetimeEnum? HwmpPrepLifetime { get; set; }
  2231. [RosValue("hwmp-preq-destination-only")]
  2232. public Boolean? HwmpPreqDestinationOnly { get; set; }
  2233. [RosValue("hwmp-preq-reply-and-forward")]
  2234. public Boolean? HwmpPreqReplyAndForward { get; set; }
  2235. [RosValue("hwmp-preq-retries")]
  2236. public Int32? HwmpPreqRetries { get; set; }
  2237. public enum HwmpPreqWaitingTimeEnum
  2238. {
  2239. [RosValue("HwmpPreqWaitingTime")]
  2240. HwmpPreqWaitingTime,
  2241. }
  2242. [RosValue("hwmp-preq-waiting-time")]
  2243. public HwmpPreqWaitingTimeEnum? HwmpPreqWaitingTime { get; set; }
  2244. public enum HwmpRannIntervalEnum
  2245. {
  2246. [RosValue("HwmpRannInterval")]
  2247. HwmpRannInterval,
  2248. }
  2249. [RosValue("hwmp-rann-interval")]
  2250. public HwmpRannIntervalEnum? HwmpRannInterval { get; set; }
  2251. public enum HwmpRannLifetimeEnum
  2252. {
  2253. [RosValue("HwmpRannLifetime")]
  2254. HwmpRannLifetime,
  2255. }
  2256. [RosValue("hwmp-rann-lifetime")]
  2257. public HwmpRannLifetimeEnum? HwmpRannLifetime { get; set; }
  2258. [RosValue("hwmp-rann-propagation-delay")]
  2259. public Single? HwmpRannPropagationDelay { get; set; }
  2260. [RosValue("mesh-portal")]
  2261. public Boolean? MeshPortal { get; set; }
  2262. // Maximum Transmit Unit
  2263. [RosValue("mtu")]
  2264. public UInt16? Mtu { get; set; }
  2265. // Interface name
  2266. [RosValue("name")]
  2267. public String Name { get; set; }
  2268. [RosValue("reoptimize-paths")]
  2269. public Boolean? ReoptimizePaths { get; set; }
  2270. [RosValue("mac-address", IsDynamic=true)]
  2271. public MACAddress? MacAddress { get; set; }
  2272. [RosValue("running", IsDynamic=true)]
  2273. public String Running { get; set; }
  2274. public static InterfaceMesh Parse(string str, Connection conn)
  2275. {
  2276. if(string.IsNullOrEmpty(str))
  2277. return null;
  2278. InterfaceMesh obj = new InterfaceMesh();
  2279. obj.FindByName(conn, str);
  2280. return obj;
  2281. }
  2282. public override string ToString() { return Name.ToString(); }
  2283. }
  2284. [RosObject("interface mesh fdb", CanGet=true)]
  2285. public class InterfaceMeshFdb : RosItemObject<InterfaceMeshFdb>
  2286. {
  2287. [RosValue("active", IsDynamic=true)]
  2288. public String Active { get; set; }
  2289. [RosValue("age", IsDynamic=true)]
  2290. public TimeSpan? Age { get; set; }
  2291. [RosValue("lifetime", IsDynamic=true)]
  2292. public TimeSpan? Lifetime { get; set; }
  2293. [RosValue("mac-address", IsDynamic=true)]
  2294. public MACAddress? MacAddress { get; set; }
  2295. [RosValue("mesh", IsDynamic=true)]
  2296. public RouterOS.Interface Mesh { get; set; }
  2297. [RosValue("metric", IsDynamic=true)]
  2298. public Int32? Metric { get; set; }
  2299. [RosValue("on-interface", IsDynamic=true)]
  2300. public RouterOS.Interface OnInterface { get; set; }
  2301. [RosValue("root", IsDynamic=true)]
  2302. public String Root { get; set; }
  2303. [RosValue("seq-number", IsDynamic=true)]
  2304. public Int32? SeqNumber { get; set; }
  2305. public enum TypeType
  2306. {
  2307. [RosValue("direct")]
  2308. Direct,
  2309. [RosValue("larval")]
  2310. Larval,
  2311. [RosValue("local")]
  2312. Local,
  2313. [RosValue("mesh")]
  2314. Mesh,
  2315. [RosValue("neighbor")]
  2316. Neighbor,
  2317. [RosValue("outsider")]
  2318. Outsider,
  2319. [RosValue("unknown")]
  2320. Unknown,
  2321. }
  2322. [RosValue("type", IsDynamic=true)]
  2323. public TypeType? Type { get; set; }
  2324. }
  2325. [RosObject("interface mesh port", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  2326. public class InterfaceMeshPort : RosItemObject<InterfaceMeshPort>
  2327. {
  2328. // Short description of the item
  2329. [RosValue("comment")]
  2330. public String Comment { get; set; }
  2331. // Defines whether item is ignored or used
  2332. [RosValue("disabled")]
  2333. public Boolean? Disabled { get; set; }
  2334. public enum HelloIntervalEnum
  2335. {
  2336. [RosValue("HelloInterval")]
  2337. HelloInterval,
  2338. }
  2339. [RosValue("hello-interval")]
  2340. public HelloIntervalEnum? HelloInterval { get; set; }
  2341. [RosValue("interface")]
  2342. public RouterOS.Interface Interface { get; set; }
  2343. [RosValue("mesh")]
  2344. public RouterOS.Interface Mesh { get; set; }
  2345. [RosValue("path-cost")]
  2346. public Int32? PathCost { get; set; }
  2347. public enum PortTypeEnum
  2348. {
  2349. [RosValue("WDS")]
  2350. WDS,
  2351. [RosValue("auto")]
  2352. Auto,
  2353. [RosValue("ethernet")]
  2354. Ethernet,
  2355. [RosValue("wireless")]
  2356. Wireless,
  2357. }
  2358. [RosValue("port-type")]
  2359. public PortTypeEnum? PortType { get; set; }
  2360. public enum ActivePortTypeType
  2361. {
  2362. [RosValue("WDS")]
  2363. WDS,
  2364. [RosValue("ethernet-bridge")]
  2365. EthernetBridge,
  2366. [RosValue("ethernet-mesh")]
  2367. EthernetMesh,
  2368. [RosValue("ethernet-mixed")]
  2369. EthernetMixed,
  2370. [RosValue("wireless")]
  2371. Wireless,
  2372. }
  2373. [RosValue("active-port-type", IsDynamic=true)]
  2374. public ActivePortTypeType? ActivePortType { get; set; }
  2375. [RosValue("dr-address", IsDynamic=true)]
  2376. public MACAddress? DrAddress { get; set; }
  2377. [RosValue("dynamic", IsDynamic=true)]
  2378. public String Dynamic { get; set; }
  2379. [RosValue("inactive", IsDynamic=true)]
  2380. public String Inactive { get; set; }
  2381. }
  2382. [RosObject("interface ovpn-client", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  2383. public class InterfaceOvpnClient : RosItemObject<InterfaceOvpnClient>
  2384. {
  2385. [RosValue("add-default-route")]
  2386. public Boolean? AddDefaultRoute { get; set; }
  2387. public enum AuthEnum
  2388. {
  2389. [RosValue("md5")]
  2390. Md5,
  2391. [RosValue("none")]
  2392. None,
  2393. [RosValue("sha1")]
  2394. Sha1,
  2395. }
  2396. [RosValue("auth")]
  2397. public AuthEnum? Auth { get; set; }
  2398. [RosValue("certificate")]
  2399. public String Certificate { get; set; }
  2400. public enum CipherEnum
  2401. {
  2402. [RosValue("aes128")]
  2403. Aes128,
  2404. [RosValue("aes192")]
  2405. Aes192,
  2406. [RosValue("aes256")]
  2407. Aes256,
  2408. [RosValue("blowfish128")]
  2409. Blowfish128,
  2410. [RosValue("none")]
  2411. None,
  2412. }
  2413. [RosValue("cipher")]
  2414. public CipherEnum? Cipher { get; set; }
  2415. // Short description of the item
  2416. [RosValue("comment")]
  2417. public String Comment { get; set; }
  2418. [RosValue("connect-to")]
  2419. public IPAddress ConnectTo { get; set; }
  2420. // Defines whether item is ignored or used
  2421. [RosValue("disabled")]
  2422. public Boolean? Disabled { get; set; }
  2423. [RosValue("mac-address")]
  2424. public MACAddress? MacAddress { get; set; }
  2425. // Maximum Transmission Unit
  2426. [RosValue("max-mtu")]
  2427. public Int32? MaxMtu { get; set; }
  2428. public enum ModeEnum
  2429. {
  2430. [RosValue("ethernet")]
  2431. Ethernet,
  2432. [RosValue("ip")]
  2433. Ip,
  2434. }
  2435. [RosValue("mode")]
  2436. public ModeEnum? Mode { get; set; }
  2437. // Interface name
  2438. [RosValue("name")]
  2439. public String Name { get; set; }
  2440. [RosValue("password")]
  2441. public String Password { get; set; }
  2442. [RosValue("port")]
  2443. public Int32? Port { get; set; }
  2444. [RosValue("profile")]
  2445. public RouterOS.PppProfile Profile { get; set; }
  2446. [RosValue("user")]
  2447. public String User { get; set; }
  2448. [RosValue("running", IsDynamic=true)]
  2449. public String Running { get; set; }
  2450. public static InterfaceOvpnClient Parse(string str, Connection conn)
  2451. {
  2452. if(string.IsNullOrEmpty(str))
  2453. return null;
  2454. InterfaceOvpnClient obj = new InterfaceOvpnClient();
  2455. obj.FindByName(conn, str);
  2456. return obj;
  2457. }
  2458. public override string ToString() { return Name.ToString(); }
  2459. }
  2460. [RosObject("interface ovpn-server", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  2461. public class InterfaceOvpnServer : RosItemObject<InterfaceOvpnServer>
  2462. {
  2463. // Short description of the item
  2464. [RosValue("comment")]
  2465. public String Comment { get; set; }
  2466. // Defines whether item is ignored or used
  2467. [RosValue("disabled")]
  2468. public Boolean? Disabled { get; set; }
  2469. // Interface name
  2470. [RosValue("name")]
  2471. public String Name { get; set; }
  2472. [RosValue("user")]
  2473. public String User { get; set; }
  2474. [RosValue("client-address", IsDynamic=true)]
  2475. public String ClientAddress { get; set; }
  2476. [RosValue("dynamic", IsDynamic=true)]
  2477. public String Dynamic { get; set; }
  2478. [RosValue("encoding", IsDynamic=true)]
  2479. public String Encoding { get; set; }
  2480. [RosValue("mtu", IsDynamic=true)]
  2481. public Int32? Mtu { get; set; }
  2482. [RosValue("running", IsDynamic=true)]
  2483. public String Running { get; set; }
  2484. [RosValue("uptime", IsDynamic=true)]
  2485. public TimeSpan? Uptime { get; set; }
  2486. public static InterfaceOvpnServer Parse(string str, Connection conn)
  2487. {
  2488. if(string.IsNullOrEmpty(str))
  2489. return null;
  2490. InterfaceOvpnServer obj = new InterfaceOvpnServer();
  2491. obj.FindByName(conn, str);
  2492. return obj;
  2493. }
  2494. public override string ToString() { return Name.ToString(); }
  2495. }
  2496. [RosObject("interface ovpn-server server", CanSet=true, CanGet=true)]
  2497. public class InterfaceOvpnServerServer : RosValueObject
  2498. {
  2499. [RosValue("auth")]
  2500. public String Auth { get; set; }
  2501. [RosValue("certificate")]
  2502. public String Certificate { get; set; }
  2503. [RosValue("cipher")]
  2504. public String Cipher { get; set; }
  2505. [RosValue("default-profile")]
  2506. public RouterOS.PppProfile DefaultProfile { get; set; }
  2507. [RosValue("enabled")]
  2508. public Boolean? Enabled { get; set; }
  2509. public enum KeepaliveTimeoutEnum
  2510. {
  2511. [RosValue("disabled")]
  2512. Disabled,
  2513. }
  2514. [RosValue("keepalive-timeout")]
  2515. public KeepaliveTimeoutEnum? KeepaliveTimeout { get; set; }
  2516. [RosValue("mac-address")]
  2517. public MACAddress? MacAddress { get; set; }
  2518. // Maximum Transmission Unit
  2519. [RosValue("max-mtu")]
  2520. public Int32? MaxMtu { get; set; }
  2521. public enum ModeEnum
  2522. {
  2523. [RosValue("ethernet")]
  2524. Ethernet,
  2525. [RosValue("ip")]
  2526. Ip,
  2527. }
  2528. [RosValue("mode")]
  2529. public ModeEnum? Mode { get; set; }
  2530. [RosValue("netmask")]
  2531. public String Netmask { get; set; }
  2532. [RosValue("port")]
  2533. public Int32? Port { get; set; }
  2534. [RosValue("require-client-certificate")]
  2535. public Boolean? RequireClientCertificate { get; set; }
  2536. }
  2537. [RosObject("interface ppp-client", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  2538. public class InterfacePppClient : RosItemObject<InterfacePppClient>
  2539. {
  2540. // Add PPP remote address as a default route
  2541. [RosValue("add-default-route")]
  2542. public Boolean? AddDefaultRoute { get; set; }
  2543. // The authentication method to allow for the client
  2544. [RosValue("allow")]
  2545. public String Allow { get; set; }
  2546. [RosValue("apn")]
  2547. public String Apn { get; set; }
  2548. // Short description of the item
  2549. [RosValue("comment")]
  2550. public String Comment { get; set; }
  2551. [RosValue("data-channel")]
  2552. public Int32? DataChannel { get; set; }
  2553. // The dial command
  2554. [RosValue("dial-command")]
  2555. public String DialCommand { get; set; }
  2556. // Enable/Disable dial on demand
  2557. [RosValue("dial-on-demand")]
  2558. public Boolean? DialOnDemand { get; set; }
  2559. // Defines whether item is ignored or used
  2560. [RosValue("disabled")]
  2561. public Boolean? Disabled { get; set; }
  2562. [RosValue("info-channel")]
  2563. public Int32? InfoChannel { get; set; }
  2564. [RosValue("keepalive-timeout")]
  2565. public Int32? KeepaliveTimeout { get; set; }
  2566. // Maximum Receive Unit
  2567. [RosValue("max-mru")]
  2568. public Int32? MaxMru { get; set; }
  2569. // Maximum Transmission Unit
  2570. [RosValue("max-mtu")]
  2571. public Int32? MaxMtu { get; set; }
  2572. // Modem init string
  2573. [RosValue("modem-init")]
  2574. public String ModemInit { get; set; }
  2575. public enum MrruEnum
  2576. {
  2577. [RosValue("disabled")]
  2578. Disabled,
  2579. }
  2580. public struct MrruType
  2581. {
  2582. private object value;
  2583. public Int32? Num
  2584. {
  2585. get { return value as Int32?; }
  2586. set { this.value = value; }
  2587. }
  2588. public static implicit operator MrruType(Int32? value)
  2589. {
  2590. return new MrruType() { value = value };
  2591. }public MrruEnum? State
  2592. {
  2593. get { return value as MrruEnum?; }
  2594. set { this.value = value; }
  2595. }
  2596. public static implicit operator MrruType(MrruEnum? value)
  2597. {
  2598. return new MrruType() { value = value };
  2599. }
  2600. public static MrruType Parse(string str, Connection conn)
  2601. {
  2602. try { return new MrruType() { value = TypeFormatter.ConvertFromString<Int32>(str, conn) }; }
  2603. catch(Exception) { }
  2604. try { return new MrruType() { value = TypeFormatter.ConvertFromString<MrruEnum>(str, conn) }; }
  2605. catch(Exception) { }
  2606. throw new NotSupportedException();
  2607. }
  2608. public override string ToString() { return value != null ? value.ToString() : null; }
  2609. }
  2610. [RosValue("mrru")]
  2611. public MrruType? Mrru { get; set; }
  2612. // Interface name
  2613. [RosValue("name")]
  2614. public String Name { get; set; }
  2615. // Enable/Disable nullmodem mode
  2616. [RosValue("null-modem")]
  2617. public Boolean? NullModem { get; set; }
  2618. // P2P user password on the remote server to use for dialout
  2619. [RosValue("password")]
  2620. public String Password { get; set; }
  2621. // Phone number for dialout
  2622. [RosValue("phone")]
  2623. public String Phone { get; set; }
  2624. [RosValue("pin")]
  2625. public String Pin { get; set; }
  2626. // Serial port
  2627. [RosValue("port")]
  2628. public RouterOS.Port Port { get; set; }
  2629. // Local profile to use for dialout
  2630. [RosValue("profile")]
  2631. public RouterOS.PppProfile Profile { get; set; }
  2632. [RosValue("remote-address")]
  2633. public IPAddress RemoteAddress { get; set; }
  2634. // Enable/Disable using of peer DNS
  2635. [RosValue("use-peer-dns")]
  2636. public Boolean? UsePeerDns { get; set; }
  2637. // User name to use for dialout
  2638. [RosValue("user")]
  2639. public String User { get; set; }
  2640. [RosValue("running", IsDynamic=true)]
  2641. public String Running { get; set; }
  2642. public static InterfacePppClient Parse(string str, Connection conn)
  2643. {
  2644. if(string.IsNullOrEmpty(str))
  2645. return null;
  2646. InterfacePppClient obj = new InterfacePppClient();
  2647. obj.FindByName(conn, str);
  2648. return obj;
  2649. }
  2650. public override string ToString() { return Name.ToString(); }
  2651. }
  2652. [RosObject("interface ppp-server", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  2653. public class InterfacePppServer : RosItemObject<InterfacePppServer>
  2654. {
  2655. // Authentication protocol
  2656. [RosValue("authentication")]
  2657. public String Authentication { get; set; }
  2658. // Short description of the item
  2659. [RosValue("comment")]
  2660. public String Comment { get; set; }
  2661. // Defines whether item is ignored or used
  2662. [RosValue("disabled")]
  2663. public Boolean? Disabled { get; set; }
  2664. // Maximum Receive Unit
  2665. [RosValue("max-mru")]
  2666. public Int32? MaxMru { get; set; }
  2667. // Maximum Transmission Unit
  2668. [RosValue("max-mtu")]
  2669. public Int32? MaxMtu { get; set; }
  2670. // Modem init string
  2671. [RosValue("modem-init")]
  2672. public String ModemInit { get; set; }
  2673. public enum MrruEnum
  2674. {
  2675. [RosValue("disabled")]
  2676. Disabled,
  2677. }
  2678. public struct MrruType
  2679. {
  2680. private object value;
  2681. public Int32? Num
  2682. {
  2683. get { return value as Int32?; }
  2684. set { this.value = value; }
  2685. }
  2686. public static implicit operator MrruType(Int32? value)
  2687. {
  2688. return new MrruType() { value = value };
  2689. }public MrruEnum? State
  2690. {
  2691. get { return value as MrruEnum?; }
  2692. set { this.value = value; }
  2693. }
  2694. public static implicit operator MrruType(MrruEnum? value)
  2695. {
  2696. return new MrruType() { value = value };
  2697. }
  2698. public static MrruType Parse(string str, Connection conn)
  2699. {
  2700. try { return new MrruType() { value = TypeFormatter.ConvertFromString<Int32>(str, conn) }; }
  2701. catch(Exception) { }
  2702. try { return new MrruType() { value = TypeFormatter.ConvertFromString<MrruEnum>(str, conn) }; }
  2703. catch(Exception) { }
  2704. throw new NotSupportedException();
  2705. }
  2706. public override string ToString() { return value != null ? value.ToString() : null; }
  2707. }
  2708. [RosValue("mrru")]
  2709. public MrruType? Mrru { get; set; }
  2710. // Interface name
  2711. [RosValue("name")]
  2712. public String Name { get; set; }
  2713. // Enable/Disable nullmodem mode
  2714. [RosValue("null-modem")]
  2715. public Boolean? NullModem { get; set; }
  2716. // Serial port
  2717. [RosValue("port")]
  2718. public RouterOS.Port Port { get; set; }
  2719. // Profile name for the link
  2720. [RosValue("profile")]
  2721. public RouterOS.PppProfile Profile { get; set; }
  2722. // Number of rings to wait before answering
  2723. [RosValue("ring-count")]
  2724. public Int32? RingCount { get; set; }
  2725. [RosValue("running", IsDynamic=true)]
  2726. public String Running { get; set; }
  2727. public static InterfacePppServer Parse(string str, Connection conn)
  2728. {
  2729. if(string.IsNullOrEmpty(str))
  2730. return null;
  2731. InterfacePppServer obj = new InterfacePppServer();
  2732. obj.FindByName(conn, str);
  2733. return obj;
  2734. }
  2735. public override string ToString() { return Name.ToString(); }
  2736. }
  2737. [RosObject("interface pppoe-client", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  2738. public class InterfacePppoeClient : RosItemObject<InterfacePppoeClient>
  2739. {
  2740. // Access Concentrator name
  2741. [RosValue("ac-name")]
  2742. public String AcName { get; set; }
  2743. // Enable/Disable adding default route through this interface
  2744. [RosValue("add-default-route")]
  2745. public Boolean? AddDefaultRoute { get; set; }
  2746. // The authentication method to allow for the client
  2747. [RosValue("allow")]
  2748. public String Allow { get; set; }
  2749. // Short description of the item
  2750. [RosValue("comment")]
  2751. public String Comment { get; set; }
  2752. // Enable/Disable dial on demand
  2753. [RosValue("dial-on-demand")]
  2754. public Boolean? DialOnDemand { get; set; }
  2755. // Defines whether item is ignored or used
  2756. [RosValue("disabled")]
  2757. public Boolean? Disabled { get; set; }
  2758. // Ethernet interface name
  2759. [RosValue("interface")]
  2760. public RouterOS.Interface[] Interface { get; set; }
  2761. // Maximum Receive Unit
  2762. [RosValue("max-mru")]
  2763. public Int32? MaxMru { get; set; }
  2764. // Maximum Transmission Unit
  2765. [RosValue("max-mtu")]
  2766. public Int32? MaxMtu { get; set; }
  2767. public enum MrruEnum
  2768. {
  2769. [RosValue("disabled")]
  2770. Disabled,
  2771. }
  2772. public struct MrruType
  2773. {
  2774. private object value;
  2775. public Int32? Num
  2776. {
  2777. get { return value as Int32?; }
  2778. set { this.value = value; }
  2779. }
  2780. public static implicit operator MrruType(Int32? value)
  2781. {
  2782. return new MrruType() { value = value };
  2783. }public MrruEnum? State
  2784. {
  2785. get { return value as MrruEnum?; }
  2786. set { this.value = value; }
  2787. }
  2788. public static implicit operator MrruType(MrruEnum? value)
  2789. {
  2790. return new MrruType() { value = value };
  2791. }
  2792. public static MrruType Parse(string str, Connection conn)
  2793. {
  2794. try { return new MrruType() { value = TypeFormatter.ConvertFromString<Int32>(str, conn) }; }
  2795. catch(Exception) { }
  2796. try { return new MrruType() { value = TypeFormatter.ConvertFromString<MrruEnum>(str, conn) }; }
  2797. catch(Exception) { }
  2798. throw new NotSupportedException();
  2799. }
  2800. public override string ToString() { return value != null ? value.ToString() : null; }
  2801. }
  2802. [RosValue("mrru")]
  2803. public MrruType? Mrru { get; set; }
  2804. // Interface name
  2805. [RosValue("name")]
  2806. public String Name { get; set; }
  2807. // A user password used to connect the PPPoE server
  2808. [RosValue("password")]
  2809. public String Password { get; set; }
  2810. // Default profile for the connection
  2811. [RosValue("profile")]
  2812. public RouterOS.PppProfile Profile { get; set; }
  2813. // Service name
  2814. [RosValue("service-name")]
  2815. public String ServiceName { get; set; }
  2816. // Enable/Disable using of peer DNS
  2817. [RosValue("use-peer-dns")]
  2818. public Boolean? UsePeerDns { get; set; }
  2819. // User name to use for dialout
  2820. [RosValue("user")]
  2821. public String User { get; set; }
  2822. [RosValue("running", IsDynamic=true)]
  2823. public String Running { get; set; }
  2824. public static InterfacePppoeClient Parse(string str, Connection conn)
  2825. {
  2826. if(string.IsNullOrEmpty(str))
  2827. return null;
  2828. InterfacePppoeClient obj = new InterfacePppoeClient();
  2829. obj.FindByName(conn, str);
  2830. return obj;
  2831. }
  2832. public override string ToString() { return Name.ToString(); }
  2833. }
  2834. [RosObject("interface pppoe-server", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  2835. public class InterfacePppoeServer : RosItemObject<InterfacePppoeServer>
  2836. {
  2837. // Short description of the item
  2838. [RosValue("comment")]
  2839. public String Comment { get; set; }
  2840. // Defines whether item is ignored or used
  2841. [RosValue("disabled")]
  2842. public Boolean? Disabled { get; set; }
  2843. // Interface name
  2844. [RosValue("name")]
  2845. public String Name { get; set; }
  2846. // Name of the service
  2847. [RosValue("service")]
  2848. public String Service { get; set; }
  2849. // A user name
  2850. [RosValue("user")]
  2851. public String User { get; set; }
  2852. [RosValue("dynamic", IsDynamic=true)]
  2853. public String Dynamic { get; set; }
  2854. [RosValue("encoding", IsDynamic=true)]
  2855. public String Encoding { get; set; }
  2856. [RosValue("mru", IsDynamic=true)]
  2857. public Int32? Mru { get; set; }
  2858. [RosValue("mtu", IsDynamic=true)]
  2859. public Int32? Mtu { get; set; }
  2860. [RosValue("remote-address", IsDynamic=true)]
  2861. public String RemoteAddress { get; set; }
  2862. [RosValue("running", IsDynamic=true)]
  2863. public String Running { get; set; }
  2864. [RosValue("uptime", IsDynamic=true)]
  2865. public TimeSpan? Uptime { get; set; }
  2866. public static InterfacePppoeServer Parse(string str, Connection conn)
  2867. {
  2868. if(string.IsNullOrEmpty(str))
  2869. return null;
  2870. InterfacePppoeServer obj = new InterfacePppoeServer();
  2871. obj.FindByName(conn, str);
  2872. return obj;
  2873. }
  2874. public override string ToString() { return Name.ToString(); }
  2875. }
  2876. [RosObject("interface pppoe-server server", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  2877. public class InterfacePppoeServerServer : RosItemObject<InterfacePppoeServerServer>
  2878. {
  2879. // Authentication algorithm
  2880. [RosValue("authentication")]
  2881. public String Authentication { get; set; }
  2882. // Default profile to use for the client
  2883. [RosValue("default-profile")]
  2884. public RouterOS.PppProfile DefaultProfile { get; set; }
  2885. // Defines whether item is ignored or used
  2886. [RosValue("disabled")]
  2887. public Boolean? Disabled { get; set; }
  2888. // Ethernet interface name
  2889. [RosValue("interface")]
  2890. public RouterOS.Interface Interface { get; set; }
  2891. public enum KeepaliveTimeoutEnum
  2892. {
  2893. [RosValue("disabled")]
  2894. Disabled,
  2895. }
  2896. // Time period after which not responding client is proclaimed
  2897. [RosValue("keepalive-timeout")]
  2898. public KeepaliveTimeoutEnum? KeepaliveTimeout { get; set; }
  2899. // Maximum Receive Unit
  2900. [RosValue("max-mru")]
  2901. public Int32? MaxMru { get; set; }
  2902. // Maximum Transmission Unit
  2903. [RosValue("max-mtu")]
  2904. public Int32? MaxMtu { get; set; }
  2905. // Maximal count of sessions
  2906. [RosValue("max-sessions")]
  2907. public Int32? MaxSessions { get; set; }
  2908. public enum MrruEnum
  2909. {
  2910. [RosValue("disabled")]
  2911. Disabled,
  2912. }
  2913. public struct MrruType
  2914. {
  2915. private object value;
  2916. public Int32? Num
  2917. {
  2918. get { return value as Int32?; }
  2919. set { this.value = value; }
  2920. }
  2921. public static implicit operator MrruType(Int32? value)
  2922. {
  2923. return new MrruType() { value = value };
  2924. }public MrruEnum? State
  2925. {
  2926. get { return value as MrruEnum?; }
  2927. set { this.value = value; }
  2928. }
  2929. public static implicit operator MrruType(MrruEnum? value)
  2930. {
  2931. return new MrruType() { value = value };
  2932. }
  2933. public static MrruType Parse(string str, Connection conn)
  2934. {
  2935. try { return new MrruType() { value = TypeFormatter.ConvertFromString<Int32>(str, conn) }; }
  2936. catch(Exception) { }
  2937. try { return new MrruType() { value = TypeFormatter.ConvertFromString<MrruEnum>(str, conn) }; }
  2938. catch(Exception) { }
  2939. throw new NotSupportedException();
  2940. }
  2941. public override string ToString() { return value != null ? value.ToString() : null; }
  2942. }
  2943. [RosValue("mrru")]
  2944. public MrruType? Mrru { get; set; }
  2945. // Allows only one session for each client
  2946. [RosValue("one-session-per-host")]
  2947. public Boolean? OneSessionPerHost { get; set; }
  2948. // Service name
  2949. [RosValue("service-name")]
  2950. public String ServiceName { get; set; }
  2951. }
  2952. [RosObject("interface pptp-client", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  2953. public class InterfacePptpClient : RosItemObject<InterfacePptpClient>
  2954. {
  2955. // Add PPTP remote address as a default route
  2956. [RosValue("add-default-route")]
  2957. public Boolean? AddDefaultRoute { get; set; }
  2958. // The authentication method to allow for the client
  2959. [RosValue("allow")]
  2960. public String Allow { get; set; }
  2961. // Short description of the item
  2962. [RosValue("comment")]
  2963. public String Comment { get; set; }
  2964. // PPTP server address
  2965. [RosValue("connect-to")]
  2966. public IPAddress ConnectTo { get; set; }
  2967. [RosValue("dial-on-demand")]
  2968. public Boolean? DialOnDemand { get; set; }
  2969. // Defines whether item is ignored or used
  2970. [RosValue("disabled")]
  2971. public Boolean? Disabled { get; set; }
  2972. // Maximum Receive Unit
  2973. [RosValue("max-mru")]
  2974. public Int32? MaxMru { get; set; }
  2975. // Maximum Transmission Unit
  2976. [RosValue("max-mtu")]
  2977. public Int32? MaxMtu { get; set; }
  2978. public enum MrruEnum
  2979. {
  2980. [RosValue("disabled")]
  2981. Disabled,
  2982. }
  2983. public struct MrruType
  2984. {
  2985. private object value;
  2986. public Int32? Num
  2987. {
  2988. get { return value as Int32?; }
  2989. set { this.value = value; }
  2990. }
  2991. public static implicit operator MrruType(Int32? value)
  2992. {
  2993. return new MrruType() { value = value };
  2994. }public MrruEnum? State
  2995. {
  2996. get { return value as MrruEnum?; }
  2997. set { this.value = value; }
  2998. }
  2999. public static implicit operator MrruType(MrruEnum? value)
  3000. {
  3001. return new MrruType() { value = value };
  3002. }
  3003. public static MrruType Parse(string str, Connection conn)
  3004. {
  3005. try { return new MrruType() { value = TypeFormatter.ConvertFromString<Int32>(str, conn) }; }
  3006. catch(Exception) { }
  3007. try { return new MrruType() { value = TypeFormatter.ConvertFromString<MrruEnum>(str, conn) }; }
  3008. catch(Exception) { }
  3009. throw new NotSupportedException();
  3010. }
  3011. public override string ToString() { return value != null ? value.ToString() : null; }
  3012. }
  3013. [RosValue("mrru")]
  3014. public MrruType? Mrru { get; set; }
  3015. // Interface name
  3016. [RosValue("name")]
  3017. public String Name { get; set; }
  3018. // User password to use when logging to the remote server
  3019. [RosValue("password")]
  3020. public String Password { get; set; }
  3021. // Profile to use when connecting to the remote server
  3022. [RosValue("profile")]
  3023. public RouterOS.PppProfile Profile { get; set; }
  3024. // User name to use for dialout
  3025. [RosValue("user")]
  3026. public String User { get; set; }
  3027. [RosValue("running", IsDynamic=true)]
  3028. public String Running { get; set; }
  3029. public static InterfacePptpClient Parse(string str, Connection conn)
  3030. {
  3031. if(string.IsNullOrEmpty(str))
  3032. return null;
  3033. InterfacePptpClient obj = new InterfacePptpClient();
  3034. obj.FindByName(conn, str);
  3035. return obj;
  3036. }
  3037. public override string ToString() { return Name.ToString(); }
  3038. }
  3039. [RosObject("interface pptp-server", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  3040. public class InterfacePptpServer : RosItemObject<InterfacePptpServer>
  3041. {
  3042. // Short description of the item
  3043. [RosValue("comment")]
  3044. public String Comment { get; set; }
  3045. // Defines whether item is ignored or used
  3046. [RosValue("disabled")]
  3047. public Boolean? Disabled { get; set; }
  3048. // Interface name
  3049. [RosValue("name")]
  3050. public String Name { get; set; }
  3051. // User name
  3052. [RosValue("user")]
  3053. public String User { get; set; }
  3054. [RosValue("client-address", IsDynamic=true)]
  3055. public String ClientAddress { get; set; }
  3056. [RosValue("dynamic", IsDynamic=true)]
  3057. public String Dynamic { get; set; }
  3058. [RosValue("encoding", IsDynamic=true)]
  3059. public String Encoding { get; set; }
  3060. [RosValue("mru", IsDynamic=true)]
  3061. public Int32? Mru { get; set; }
  3062. [RosValue("mtu", IsDynamic=true)]
  3063. public Int32? Mtu { get; set; }
  3064. [RosValue("running", IsDynamic=true)]
  3065. public String Running { get; set; }
  3066. [RosValue("uptime", IsDynamic=true)]
  3067. public TimeSpan? Uptime { get; set; }
  3068. public static InterfacePptpServer Parse(string str, Connection conn)
  3069. {
  3070. if(string.IsNullOrEmpty(str))
  3071. return null;
  3072. InterfacePptpServer obj = new InterfacePptpServer();
  3073. obj.FindByName(conn, str);
  3074. return obj;
  3075. }
  3076. public override string ToString() { return Name.ToString(); }
  3077. }
  3078. [RosObject("interface pptp-server server", CanSet=true, CanGet=true)]
  3079. public class InterfacePptpServerServer : RosValueObject
  3080. {
  3081. // Authentication algorithm
  3082. [RosValue("authentication")]
  3083. public String Authentication { get; set; }
  3084. // Activate the default profile
  3085. [RosValue("default-profile")]
  3086. public RouterOS.PppProfile DefaultProfile { get; set; }
  3087. // Defines whether PPTP server is enabled or not
  3088. [RosValue("enabled")]
  3089. public Boolean? Enabled { get; set; }
  3090. public enum KeepaliveTimeoutEnum
  3091. {
  3092. [RosValue("disabled")]
  3093. Disabled,
  3094. }
  3095. // Time period after which not responding client is proclaimed
  3096. [RosValue("keepalive-timeout")]
  3097. public KeepaliveTimeoutEnum? KeepaliveTimeout { get; set; }
  3098. // Maximum Receive Unit
  3099. [RosValue("max-mru")]
  3100. public Int32? MaxMru { get; set; }
  3101. // Maximum Transmission Unit
  3102. [RosValue("max-mtu")]
  3103. public Int32? MaxMtu { get; set; }
  3104. public enum MrruEnum
  3105. {
  3106. [RosValue("disabled")]
  3107. Disabled,
  3108. }
  3109. public struct MrruType
  3110. {
  3111. private object value;
  3112. public Int32? Num
  3113. {
  3114. get { return value as Int32?; }
  3115. set { this.value = value; }
  3116. }
  3117. public static implicit operator MrruType(Int32? value)
  3118. {
  3119. return new MrruType() { value = value };
  3120. }public MrruEnum? State
  3121. {
  3122. get { return value as MrruEnum?; }
  3123. set { this.value = value; }
  3124. }
  3125. public static implicit operator MrruType(MrruEnum? value)
  3126. {
  3127. return new MrruType() { value = value };
  3128. }
  3129. public static MrruType Parse(string str, Connection conn)
  3130. {
  3131. try { return new MrruType() { value = TypeFormatter.ConvertFromString<Int32>(str, conn) }; }
  3132. catch(Exception) { }
  3133. try { return new MrruType() { value = TypeFormatter.ConvertFromString<MrruEnum>(str, conn) }; }
  3134. catch(Exception) { }
  3135. throw new NotSupportedException();
  3136. }
  3137. public override string ToString() { return value != null ? value.ToString() : null; }
  3138. }
  3139. [RosValue("mrru")]
  3140. public MrruType? Mrru { get; set; }
  3141. }
  3142. [RosObject("interface pvc", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  3143. public class InterfacePvc : RosItemObject<InterfacePvc>
  3144. {
  3145. // Short description of the item
  3146. [RosValue("comment")]
  3147. public String Comment { get; set; }
  3148. // Defines whether item is ignored or used
  3149. [RosValue("disabled")]
  3150. public Boolean? Disabled { get; set; }
  3151. // Data Link Connection Identifier assigned to the PVC interface
  3152. [RosValue("dlci")]
  3153. public Int32? Dlci { get; set; }
  3154. // Frame Relay interface
  3155. [RosValue("interface")]
  3156. public String Interface { get; set; }
  3157. // Maximum Transmit Unit
  3158. [RosValue("mtu")]
  3159. public Int32? Mtu { get; set; }
  3160. // Interface name
  3161. [RosValue("name")]
  3162. public String Name { get; set; }
  3163. [RosValue("running", IsDynamic=true)]
  3164. public String Running { get; set; }
  3165. public static InterfacePvc Parse(string str, Connection conn)
  3166. {
  3167. if(string.IsNullOrEmpty(str))
  3168. return null;
  3169. InterfacePvc obj = new InterfacePvc();
  3170. obj.FindByName(conn, str);
  3171. return obj;
  3172. }
  3173. public override string ToString() { return Name.ToString(); }
  3174. }
  3175. [RosObject("interface sstp-client", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  3176. public class InterfaceSstpClient : RosItemObject<InterfaceSstpClient>
  3177. {
  3178. [RosValue("add-default-route")]
  3179. public Boolean? AddDefaultRoute { get; set; }
  3180. [RosValue("authentication")]
  3181. public String Authentication { get; set; }
  3182. [RosValue("certificate")]
  3183. public String Certificate { get; set; }
  3184. // Short description of the item
  3185. [RosValue("comment")]
  3186. public String Comment { get; set; }
  3187. [RosValue("connect-to")]
  3188. public String ConnectTo { get; set; }
  3189. [RosValue("dial-on-demand")]
  3190. public Boolean? DialOnDemand { get; set; }
  3191. // Defines whether item is ignored or used
  3192. [RosValue("disabled")]
  3193. public Boolean? Disabled { get; set; }
  3194. [RosValue("http-proxy")]
  3195. public String HttpProxy { get; set; }
  3196. public enum KeepaliveTimeoutEnum
  3197. {
  3198. [RosValue("disabled")]
  3199. Disabled,
  3200. }
  3201. [RosValue("keepalive-timeout")]
  3202. public KeepaliveTimeoutEnum? KeepaliveTimeout { get; set; }
  3203. // Maximum Receive Unit
  3204. [RosValue("max-mru")]
  3205. public Int32? MaxMru { get; set; }
  3206. // Maximum Transmission Unit
  3207. [RosValue("max-mtu")]
  3208. public Int32? MaxMtu { get; set; }
  3209. public enum MrruEnum
  3210. {
  3211. [RosValue("disabled")]
  3212. Disabled,
  3213. }
  3214. public struct MrruType
  3215. {
  3216. private object value;
  3217. public Int32? Num
  3218. {
  3219. get { return value as Int32?; }
  3220. set { this.value = value; }
  3221. }
  3222. public static implicit operator MrruType(Int32? value)
  3223. {
  3224. return new MrruType() { value = value };
  3225. }public MrruEnum? State
  3226. {
  3227. get { return value as MrruEnum?; }
  3228. set { this.value = value; }
  3229. }
  3230. public static implicit operator MrruType(MrruEnum? value)
  3231. {
  3232. return new MrruType() { value = value };
  3233. }
  3234. public static MrruType Parse(string str, Connection conn)
  3235. {
  3236. try { return new MrruType() { value = TypeFormatter.ConvertFromString<Int32>(str, conn) }; }
  3237. catch(Exception) { }
  3238. try { return new MrruType() { value = TypeFormatter.ConvertFromString<MrruEnum>(str, conn) }; }
  3239. catch(Exception) { }
  3240. throw new NotSupportedException();
  3241. }
  3242. public override string ToString() { return value != null ? value.ToString() : null; }
  3243. }
  3244. [RosValue("mrru")]
  3245. public MrruType? Mrru { get; set; }
  3246. // Interface name
  3247. [RosValue("name")]
  3248. public String Name { get; set; }
  3249. [RosValue("password")]
  3250. public String Password { get; set; }
  3251. [RosValue("profile")]
  3252. public RouterOS.PppProfile Profile { get; set; }
  3253. [RosValue("user")]
  3254. public String User { get; set; }
  3255. [RosValue("verify-server-certificate")]
  3256. public Boolean? VerifyServerCertificate { get; set; }
  3257. [RosValue("running", IsDynamic=true)]
  3258. public String Running { get; set; }
  3259. public static InterfaceSstpClient Parse(string str, Connection conn)
  3260. {
  3261. if(string.IsNullOrEmpty(str))
  3262. return null;
  3263. InterfaceSstpClient obj = new InterfaceSstpClient();
  3264. obj.FindByName(conn, str);
  3265. return obj;
  3266. }
  3267. public override string ToString() { return Name.ToString(); }
  3268. }
  3269. [RosObject("interface sstp-server", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  3270. public class InterfaceSstpServer : RosItemObject<InterfaceSstpServer>
  3271. {
  3272. // Short description of the item
  3273. [RosValue("comment")]
  3274. public String Comment { get; set; }
  3275. // Defines whether item is ignored or used
  3276. [RosValue("disabled")]
  3277. public Boolean? Disabled { get; set; }
  3278. // Interface name
  3279. [RosValue("name")]
  3280. public String Name { get; set; }
  3281. [RosValue("user")]
  3282. public String User { get; set; }
  3283. [RosValue("client-address", IsDynamic=true)]
  3284. public String ClientAddress { get; set; }
  3285. [RosValue("dynamic", IsDynamic=true)]
  3286. public String Dynamic { get; set; }
  3287. [RosValue("encoding", IsDynamic=true)]
  3288. public String Encoding { get; set; }
  3289. [RosValue("mtu", IsDynamic=true)]
  3290. public Int32? Mtu { get; set; }
  3291. [RosValue("running", IsDynamic=true)]
  3292. public String Running { get; set; }
  3293. [RosValue("uptime", IsDynamic=true)]
  3294. public TimeSpan? Uptime { get; set; }
  3295. public static InterfaceSstpServer Parse(string str, Connection conn)
  3296. {
  3297. if(string.IsNullOrEmpty(str))
  3298. return null;
  3299. InterfaceSstpServer obj = new InterfaceSstpServer();
  3300. obj.FindByName(conn, str);
  3301. return obj;
  3302. }
  3303. public override string ToString() { return Name.ToString(); }
  3304. }
  3305. [RosObject("interface sstp-server server", CanSet=true, CanGet=true)]
  3306. public class InterfaceSstpServerServer : RosValueObject
  3307. {
  3308. [RosValue("authentication")]
  3309. public String Authentication { get; set; }
  3310. [RosValue("certificate")]
  3311. public String Certificate { get; set; }
  3312. [RosValue("default-profile")]
  3313. public RouterOS.PppProfile DefaultProfile { get; set; }
  3314. [RosValue("enabled")]
  3315. public Boolean? Enabled { get; set; }
  3316. public enum KeepaliveTimeoutEnum
  3317. {
  3318. [RosValue("disabled")]
  3319. Disabled,
  3320. }
  3321. [RosValue("keepalive-timeout")]
  3322. public KeepaliveTimeoutEnum? KeepaliveTimeout { get; set; }
  3323. // Maximum Receive Unit
  3324. [RosValue("max-mru")]
  3325. public Int32? MaxMru { get; set; }
  3326. // Maximum Transmission Unit
  3327. [RosValue("max-mtu")]
  3328. public Int32? MaxMtu { get; set; }
  3329. public enum MrruEnum
  3330. {
  3331. [RosValue("disabled")]
  3332. Disabled,
  3333. }
  3334. public struct MrruType
  3335. {
  3336. private object value;
  3337. public Int32? Num
  3338. {
  3339. get { return value as Int32?; }
  3340. set { this.value = value; }
  3341. }
  3342. public static implicit operator MrruType(Int32? value)
  3343. {
  3344. return new MrruType() { value = value };
  3345. }public MrruEnum? State
  3346. {
  3347. get { return value as MrruEnum?; }
  3348. set { this.value = value; }
  3349. }
  3350. public static implicit operator MrruType(MrruEnum? value)
  3351. {
  3352. return new MrruType() { value = value };
  3353. }
  3354. public static MrruType Parse(string str, Connection conn)
  3355. {
  3356. try { return new MrruType() { value = TypeFormatter.ConvertFromString<Int32>(str, conn) }; }
  3357. catch(Exception) { }
  3358. try { return new MrruType() { value = TypeFormatter.ConvertFromString<MrruEnum>(str, conn) }; }
  3359. catch(Exception) { }
  3360. throw new NotSupportedException();
  3361. }
  3362. public override string ToString() { return value != null ? value.ToString() : null; }
  3363. }
  3364. [RosValue("mrru")]
  3365. public MrruType? Mrru { get; set; }
  3366. [RosValue("port")]
  3367. public Int32? Port { get; set; }
  3368. [RosValue("verify-client-certificate")]
  3369. public Boolean? VerifyClientCertificate { get; set; }
  3370. }
  3371. [RosObject("interface traffic-eng", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true, CanUnset=true)]
  3372. public class InterfaceTrafficEng : RosItemObject<InterfaceTrafficEng>
  3373. {
  3374. [RosValue("affinity-exclude", CanUnset=true)]
  3375. public Int32? AffinityExclude { get; set; }
  3376. [RosValue("affinity-include-all", CanUnset=true)]
  3377. public Int32? AffinityIncludeAll { get; set; }
  3378. [RosValue("affinity-include-any", CanUnset=true)]
  3379. public Int32? AffinityIncludeAny { get; set; }
  3380. public enum AutoBandwidthAvgIntervalEnum
  3381. {
  3382. [RosValue("AutoBandwidthAvgInterval")]
  3383. AutoBandwidthAvgInterval,
  3384. }
  3385. [RosValue("auto-bandwidth-avg-interval")]
  3386. public AutoBandwidthAvgIntervalEnum? AutoBandwidthAvgInterval { get; set; }
  3387. [RosValue("auto-bandwidth-range")]
  3388. public String AutoBandwidthRange { get; set; }
  3389. public struct AutoBandwidthReserveType
  3390. {
  3391. public Int32 Value { get; set; }
  3392. public static AutoBandwidthReserveType Parse(string str)
  3393. {
  3394. if (str.EndsWith("%"))
  3395. str = str.Substring(0, str.Length - "%".Length);
  3396. return new Parser() { Value = TypeFormatter.ConvertFromString<Int32>(str, null) };
  3397. }
  3398. public override string ToString()
  3399. {
  3400. return String.Concat(Value, "%");
  3401. }
  3402. public static implicit operator AutoBandwidthReserveType(Int32 value)
  3403. {
  3404. return new Parser() { Value = value };
  3405. }
  3406. public static implicit operator Int32(AutoBandwidthReserveType parser)
  3407. {
  3408. return parser.Value;
  3409. }
  3410. }
  3411. [RosValue("auto-bandwidth-reserve")]
  3412. public AutoBandwidthReserveType? AutoBandwidthReserve { get; set; }
  3413. public enum AutoBandwidthUpdateIntervalEnum
  3414. {
  3415. [RosValue("AutoBandwidthUpdateInterval")]
  3416. AutoBandwidthUpdateInterval,
  3417. }
  3418. [RosValue("auto-bandwidth-update-interval")]
  3419. public AutoBandwidthUpdateIntervalEnum? AutoBandwidthUpdateInterval { get; set; }
  3420. [RosValue("bandwidth")]
  3421. public Bits Bandwidth { get; set; }
  3422. [RosValue("bandwidth-limit")]
  3423. public String BandwidthLimit { get; set; }
  3424. // Short description of the item
  3425. [RosValue("comment")]
  3426. public String Comment { get; set; }
  3427. [RosValue("disable-running-check")]
  3428. public Boolean? DisableRunningCheck { get; set; }
  3429. // Defines whether item is ignored or used
  3430. [RosValue("disabled")]
  3431. public Boolean? Disabled { get; set; }
  3432. public enum AutoEnum
  3433. {
  3434. [RosValue("auto")]
  3435. Auto,
  3436. }
  3437. public struct FromAddressType
  3438. {
  3439. private object value;
  3440. public AutoEnum? Auto
  3441. {
  3442. get { return value as AutoEnum?; }
  3443. set { this.value = value; }
  3444. }
  3445. public static implicit operator FromAddressType(AutoEnum? value)
  3446. {
  3447. return new FromAddressType() { value = value };
  3448. }public IPAddress Address
  3449. {
  3450. get { return value as IPAddress; }
  3451. set { this.value = value; }
  3452. }
  3453. public static implicit operator FromAddressType(IPAddress value)
  3454. {
  3455. return new FromAddressType() { value = value };
  3456. }
  3457. public static FromAddressType Parse(string str, Connection conn)
  3458. {
  3459. try { return new FromAddressType() { value = TypeFormatter.ConvertFromString<AutoEnum>(str, conn) }; }
  3460. catch(Exception) { }
  3461. try { return new FromAddressType() { value = TypeFormatter.ConvertFromString<IPAddress>(str, conn) }; }
  3462. catch(Exception) { }
  3463. throw new NotSupportedException();
  3464. }
  3465. public override string ToString() { return value != null ? value.ToString() : null; }
  3466. }
  3467. [RosValue("from-address")]
  3468. public FromAddressType? FromAddress { get; set; }
  3469. [RosValue("holding-priority", CanUnset=true)]
  3470. public Int32? HoldingPriority { get; set; }
  3471. // Maximum Transmit Unit
  3472. [RosValue("mtu")]
  3473. public Int32? Mtu { get; set; }
  3474. // Interface name
  3475. [RosValue("name")]
  3476. public String Name { get; set; }
  3477. [RosValue("primary-path")]
  3478. public String PrimaryPath { get; set; }
  3479. [RosValue("primary-retry-interval")]
  3480. public TimeSpan? PrimaryRetryInterval { get; set; }
  3481. [RosValue("record-route", CanUnset=true)]
  3482. public Boolean? RecordRoute { get; set; }
  3483. [RosValue("reoptimize-interval", CanUnset=true)]
  3484. public TimeSpan? ReoptimizeInterval { get; set; }
  3485. [RosValue("secondary-paths")]
  3486. public String SecondaryPaths { get; set; }
  3487. [RosValue("setup-priority", CanUnset=true)]
  3488. public Int32? SetupPriority { get; set; }
  3489. [RosValue("to-address")]
  3490. public IPAddress ToAddress { get; set; }
  3491. [RosValue("dynamic", IsDynamic=true)]
  3492. public String Dynamic { get; set; }
  3493. [RosValue("running", IsDynamic=true)]
  3494. public String Running { get; set; }
  3495. public static InterfaceTrafficEng Parse(string str, Connection conn)
  3496. {
  3497. if(string.IsNullOrEmpty(str))
  3498. return null;
  3499. InterfaceTrafficEng obj = new InterfaceTrafficEng();
  3500. obj.FindByName(conn, str);
  3501. return obj;
  3502. }
  3503. public override string ToString() { return Name.ToString(); }
  3504. }
  3505. [RosObject("interface vlan", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  3506. public class InterfaceVlan : RosItemObject<InterfaceVlan>
  3507. {
  3508. public enum ArpEnum
  3509. {
  3510. [RosValue("disabled")]
  3511. Disabled,
  3512. [RosValue("enabled")]
  3513. Enabled,
  3514. [RosValue("proxy-arp")]
  3515. ProxyArp,
  3516. [RosValue("reply-only")]
  3517. ReplyOnly,
  3518. }
  3519. // Address Resolution Protocol
  3520. [RosValue("arp")]
  3521. public ArpEnum? Arp { get; set; }
  3522. // Short description of the item
  3523. [RosValue("comment")]
  3524. public String Comment { get; set; }
  3525. // Defines whether item is ignored or used
  3526. [RosValue("disabled")]
  3527. public Boolean? Disabled { get; set; }
  3528. // Physical interface to the network where are VLANs
  3529. [RosValue("interface")]
  3530. public RouterOS.Interface Interface { get; set; }
  3531. [RosValue("l2mtu")]
  3532. public UInt16? L2mtu { get; set; }
  3533. // Maximum Transmit Unit
  3534. [RosValue("mtu")]
  3535. public Int32? Mtu { get; set; }
  3536. // Name of the VLAN interface
  3537. [RosValue("name")]
  3538. public String Name { get; set; }
  3539. [RosValue("use-service-tag")]
  3540. public Boolean? UseServiceTag { get; set; }
  3541. // Virtual LAN identificator or tag that is used to distinguish VLANs
  3542. [RosValue("vlan-id")]
  3543. public Int32? VlanId { get; set; }
  3544. [RosValue("mac-address", IsDynamic=true)]
  3545. public MACAddress? MacAddress { get; set; }
  3546. [RosValue("running", IsDynamic=true)]
  3547. public String Running { get; set; }
  3548. [RosValue("slave", IsDynamic=true)]
  3549. public String Slave { get; set; }
  3550. public static InterfaceVlan Parse(string str, Connection conn)
  3551. {
  3552. if(string.IsNullOrEmpty(str))
  3553. return null;
  3554. InterfaceVlan obj = new InterfaceVlan();
  3555. obj.FindByName(conn, str);
  3556. return obj;
  3557. }
  3558. public override string ToString() { return Name.ToString(); }
  3559. }
  3560. [RosObject("interface vpls", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true, CanUnset=true)]
  3561. public class InterfaceVpls : RosItemObject<InterfaceVpls>
  3562. {
  3563. [RosValue("advertised-l2mtu")]
  3564. public Int32? AdvertisedL2mtu { get; set; }
  3565. public enum ArpEnum
  3566. {
  3567. [RosValue("disabled")]
  3568. Disabled,
  3569. [RosValue("enabled")]
  3570. Enabled,
  3571. [RosValue("proxy-arp")]
  3572. ProxyArp,
  3573. [RosValue("reply-only")]
  3574. ReplyOnly,
  3575. }
  3576. // Address Resolution Protocol
  3577. [RosValue("arp")]
  3578. public ArpEnum? Arp { get; set; }
  3579. [RosValue("cisco-style")]
  3580. public Boolean? CiscoStyle { get; set; }
  3581. [RosValue("cisco-style-id")]
  3582. public Int32? CiscoStyleId { get; set; }
  3583. // Short description of the item
  3584. [RosValue("comment")]
  3585. public String Comment { get; set; }
  3586. [RosValue("disable-running-check")]
  3587. public Boolean? DisableRunningCheck { get; set; }
  3588. // Defines whether item is ignored or used
  3589. [RosValue("disabled")]
  3590. public Boolean? Disabled { get; set; }
  3591. [RosValue("l2mtu")]
  3592. public UInt16? L2mtu { get; set; }
  3593. [RosValue("mac-address")]
  3594. public MACAddress? MacAddress { get; set; }
  3595. // Maximum Transmit Unit
  3596. [RosValue("mtu")]
  3597. public Int32? Mtu { get; set; }
  3598. // Interface name
  3599. [RosValue("name")]
  3600. public String Name { get; set; }
  3601. public enum PwTypeEnum
  3602. {
  3603. [RosValue("raw-ethernet")]
  3604. RawEthernet,
  3605. [RosValue("tagged-ethernet")]
  3606. TaggedEthernet,
  3607. }
  3608. [RosValue("pw-type")]
  3609. public PwTypeEnum? PwType { get; set; }
  3610. [RosValue("remote-peer")]
  3611. public IPAddress RemotePeer { get; set; }
  3612. [RosValue("vpls-id", CanUnset=true)]
  3613. public String VplsId { get; set; }
  3614. [RosValue("bgp-signaled", IsDynamic=true)]
  3615. public String BgpSignaled { get; set; }
  3616. [RosValue("cisco-bgp-signaled", IsDynamic=true)]
  3617. public String CiscoBgpSignaled { get; set; }
  3618. [RosValue("dynamic", IsDynamic=true)]
  3619. public String Dynamic { get; set; }
  3620. [RosValue("running", IsDynamic=true)]
  3621. public String Running { get; set; }
  3622. [RosValue("vpls", IsDynamic=true)]
  3623. public String Vpls { get; set; }
  3624. public static InterfaceVpls Parse(string str, Connection conn)
  3625. {
  3626. if(string.IsNullOrEmpty(str))
  3627. return null;
  3628. InterfaceVpls obj = new InterfaceVpls();
  3629. obj.FindByName(conn, str);
  3630. return obj;
  3631. }
  3632. public override string ToString() { return Name.ToString(); }
  3633. }
  3634. [RosObject("interface vpls bgp-vpls", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true, CanUnset=true)]
  3635. public class InterfaceVplsBgpVpls : RosItemObject<InterfaceVplsBgpVpls>
  3636. {
  3637. public struct BridgeType
  3638. {
  3639. private object value;
  3640. public RouterOS.Interface Bridge
  3641. {
  3642. get { return value as RouterOS.Interface; }
  3643. set { this.value = value; }
  3644. }
  3645. public static implicit operator BridgeType(RouterOS.Interface value)
  3646. {
  3647. return new BridgeType() { value = value };
  3648. }public RouterOS.Interface Bridge2
  3649. {
  3650. get { return value as RouterOS.Interface; }
  3651. set { this.value = value; }
  3652. }
  3653. public static implicit operator BridgeType(RouterOS.Interface value)
  3654. {
  3655. return new BridgeType() { value = value };
  3656. }
  3657. public static BridgeType Parse(string str, Connection conn)
  3658. {
  3659. try { return new BridgeType() { value = TypeFormatter.ConvertFromString<RouterOS.Interface>(str, conn) }; }
  3660. catch(Exception) { }
  3661. try { return new BridgeType() { value = TypeFormatter.ConvertFromString<RouterOS.Interface>(str, conn) }; }
  3662. catch(Exception) { }
  3663. throw new NotSupportedException();
  3664. }
  3665. public override string ToString() { return value != null ? value.ToString() : null; }
  3666. }
  3667. [RosValue("bridge")]
  3668. public BridgeType? Bridge { get; set; }
  3669. [RosValue("bridge-cost")]
  3670. public Int32? BridgeCost { get; set; }
  3671. public enum BridgeHorizonEnum
  3672. {
  3673. [RosValue("none")]
  3674. None,
  3675. }
  3676. public struct BridgeHorizonType
  3677. {
  3678. private object value;
  3679. public Int32? Num
  3680. {
  3681. get { return value as Int32?; }
  3682. set { this.value = value; }
  3683. }
  3684. public static implicit operator BridgeHorizonType(Int32? value)
  3685. {
  3686. return new BridgeHorizonType() { value = value };
  3687. }public BridgeHorizonEnum? State
  3688. {
  3689. get { return value as BridgeHorizonEnum?; }
  3690. set { this.value = value; }
  3691. }
  3692. public static implicit operator BridgeHorizonType(BridgeHorizonEnum? value)
  3693. {
  3694. return new BridgeHorizonType() { value = value };
  3695. }
  3696. public static BridgeHorizonType Parse(string str, Connection conn)
  3697. {
  3698. try { return new BridgeHorizonType() { value = TypeFormatter.ConvertFromString<Int32>(str, conn) }; }
  3699. catch(Exception) { }
  3700. try { return new BridgeHorizonType() { value = TypeFormatter.ConvertFromString<BridgeHorizonEnum>(str, conn) }; }
  3701. catch(Exception) { }
  3702. throw new NotSupportedException();
  3703. }
  3704. public override string ToString() { return value != null ? value.ToString() : null; }
  3705. }
  3706. [RosValue("bridge-horizon")]
  3707. public BridgeHorizonType? BridgeHorizon { get; set; }
  3708. // Short description of the item
  3709. [RosValue("comment")]
  3710. public String Comment { get; set; }
  3711. // Defines whether item is ignored or used
  3712. [RosValue("disabled")]
  3713. public Boolean? Disabled { get; set; }
  3714. [RosValue("export-route-targets", CanUnset=true)]
  3715. public String ExportRouteTargets { get; set; }
  3716. [RosValue("import-route-targets", CanUnset=true)]
  3717. public String ImportRouteTargets { get; set; }
  3718. // Interface name
  3719. [RosValue("name")]
  3720. public String Name { get; set; }
  3721. [RosValue("route-distinguisher", CanUnset=true)]
  3722. public String RouteDistinguisher { get; set; }
  3723. [RosValue("site-id")]
  3724. public Int32? SiteId { get; set; }
  3725. [RosValue("inactive", IsDynamic=true)]
  3726. public String Inactive { get; set; }
  3727. public static InterfaceVplsBgpVpls Parse(string str, Connection conn)
  3728. {
  3729. if(string.IsNullOrEmpty(str))
  3730. return null;
  3731. InterfaceVplsBgpVpls obj = new InterfaceVplsBgpVpls();
  3732. obj.FindByName(conn, str);
  3733. return obj;
  3734. }
  3735. public override string ToString() { return Name.ToString(); }
  3736. }
  3737. [RosObject("interface vpls cisco-bgp-vpls", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true, CanUnset=true)]
  3738. public class InterfaceVplsCiscoBgpVpls : RosItemObject<InterfaceVplsCiscoBgpVpls>
  3739. {
  3740. public struct BridgeType
  3741. {
  3742. private object value;
  3743. public RouterOS.Interface Bridge
  3744. {
  3745. get { return value as RouterOS.Interface; }
  3746. set { this.value = value; }
  3747. }
  3748. public static implicit operator BridgeType(RouterOS.Interface value)
  3749. {
  3750. return new BridgeType() { value = value };
  3751. }public RouterOS.Interface Bridge2
  3752. {
  3753. get { return value as RouterOS.Interface; }
  3754. set { this.value = value; }
  3755. }
  3756. public static implicit operator BridgeType(RouterOS.Interface value)
  3757. {
  3758. return new BridgeType() { value = value };
  3759. }
  3760. public static BridgeType Parse(string str, Connection conn)
  3761. {
  3762. try { return new BridgeType() { value = TypeFormatter.ConvertFromString<RouterOS.Interface>(str, conn) }; }
  3763. catch(Exception) { }
  3764. try { return new BridgeType() { value = TypeFormatter.ConvertFromString<RouterOS.Interface>(str, conn) }; }
  3765. catch(Exception) { }
  3766. throw new NotSupportedException();
  3767. }
  3768. public override string ToString() { return value != null ? value.ToString() : null; }
  3769. }
  3770. [RosValue("bridge")]
  3771. public BridgeType? Bridge { get; set; }
  3772. [RosValue("bridge-cost")]
  3773. public Int32? BridgeCost { get; set; }
  3774. public enum BridgeHorizonEnum
  3775. {
  3776. [RosValue("none")]
  3777. None,
  3778. }
  3779. public struct BridgeHorizonType
  3780. {
  3781. private object value;
  3782. public Int32? Num
  3783. {
  3784. get { return value as Int32?; }
  3785. set { this.value = value; }
  3786. }
  3787. public static implicit operator BridgeHorizonType(Int32? value)
  3788. {
  3789. return new BridgeHorizonType() { value = value };
  3790. }public BridgeHorizonEnum? State
  3791. {
  3792. get { return value as BridgeHorizonEnum?; }
  3793. set { this.value = value; }
  3794. }
  3795. public static implicit operator BridgeHorizonType(BridgeHorizonEnum? value)
  3796. {
  3797. return new BridgeHorizonType() { value = value };
  3798. }
  3799. public static BridgeHorizonType Parse(string str, Connection conn)
  3800. {
  3801. try { return new BridgeHorizonType() { value = TypeFormatter.ConvertFromString<Int32>(str, conn) }; }
  3802. catch(Exception) { }
  3803. try { return new BridgeHorizonType() { value = TypeFormatter.ConvertFromString<BridgeHorizonEnum>(str, conn) }; }
  3804. catch(Exception) { }
  3805. throw new NotSupportedException();
  3806. }
  3807. public override string ToString() { return value != null ? value.ToString() : null; }
  3808. }
  3809. [RosValue("bridge-horizon")]
  3810. public BridgeHorizonType? BridgeHorizon { get; set; }
  3811. // Short description of the item
  3812. [RosValue("comment")]
  3813. public String Comment { get; set; }
  3814. // Defines whether item is ignored or used
  3815. [RosValue("disabled")]
  3816. public Boolean? Disabled { get; set; }
  3817. [RosValue("export-route-targets", CanUnset=true)]
  3818. public String ExportRouteTargets { get; set; }
  3819. [RosValue("import-route-targets", CanUnset=true)]
  3820. public String ImportRouteTargets { get; set; }
  3821. [RosValue("l2router-id")]
  3822. public IPAddress L2routerId { get; set; }
  3823. // Interface name
  3824. [RosValue("name")]
  3825. public String Name { get; set; }
  3826. [RosValue("route-distinguisher", CanUnset=true)]
  3827. public String RouteDistinguisher { get; set; }
  3828. [RosValue("vpls-id", CanUnset=true)]
  3829. public String VplsId { get; set; }
  3830. [RosValue("inactive", IsDynamic=true)]
  3831. public String Inactive { get; set; }
  3832. public static InterfaceVplsCiscoBgpVpls Parse(string str, Connection conn)
  3833. {
  3834. if(string.IsNullOrEmpty(str))
  3835. return null;
  3836. InterfaceVplsCiscoBgpVpls obj = new InterfaceVplsCiscoBgpVpls();
  3837. obj.FindByName(conn, str);
  3838. return obj;
  3839. }
  3840. public override string ToString() { return Name.ToString(); }
  3841. }
  3842. [RosObject("interface vrrp", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  3843. public class InterfaceVrrp : RosItemObject<InterfaceVrrp>
  3844. {
  3845. public enum ArpEnum
  3846. {
  3847. [RosValue("disabled")]
  3848. Disabled,
  3849. [RosValue("enabled")]
  3850. Enabled,
  3851. [RosValue("proxy-arp")]
  3852. ProxyArp,
  3853. [RosValue("reply-only")]
  3854. ReplyOnly,
  3855. }
  3856. // Address Resolution Protocol
  3857. [RosValue("arp")]
  3858. public ArpEnum? Arp { get; set; }
  3859. public enum AuthenticationEnum
  3860. {
  3861. [RosValue("ah")]
  3862. Ah,
  3863. [RosValue("none")]
  3864. None,
  3865. [RosValue("simple")]
  3866. Simple,
  3867. }
  3868. [RosValue("authentication")]
  3869. public AuthenticationEnum? Authentication { get; set; }
  3870. // Short description of the item
  3871. [RosValue("comment")]
  3872. public String Comment { get; set; }
  3873. // Defines whether item is ignored or used
  3874. [RosValue("disabled")]
  3875. public Boolean? Disabled { get; set; }
  3876. [RosValue("interface")]
  3877. public RouterOS.Interface Interface { get; set; }
  3878. public enum IntervalEnum
  3879. {
  3880. [RosValue("Interval")]
  3881. Interval,
  3882. }
  3883. [RosValue("interval")]
  3884. public IntervalEnum? Interval { get; set; }
  3885. // Maximum Transmit Unit
  3886. [RosValue("mtu")]
  3887. public Int32? Mtu { get; set; }
  3888. // Interface name
  3889. [RosValue("name")]
  3890. public String Name { get; set; }
  3891. [RosValue("on-backup")]
  3892. public String OnBackup { get; set; }
  3893. [RosValue("on-master")]
  3894. public String OnMaster { get; set; }
  3895. [RosValue("password")]
  3896. public String Password { get; set; }
  3897. [RosValue("preemption-mode")]
  3898. public Boolean? PreemptionMode { get; set; }
  3899. [RosValue("priority")]
  3900. public Int32? Priority { get; set; }
  3901. public enum V3ProtocolEnum
  3902. {
  3903. [RosValue("ipv4")]
  3904. Ipv4,
  3905. [RosValue("ipv6")]
  3906. Ipv6,
  3907. }
  3908. [RosValue("v3-protocol")]
  3909. public V3ProtocolEnum? V3Protocol { get; set; }
  3910. public enum VersionEnum
  3911. {
  3912. [RosValue("2")]
  3913. E2,
  3914. [RosValue("3")]
  3915. E3,
  3916. }
  3917. [RosValue("version")]
  3918. public VersionEnum? Version { get; set; }
  3919. [RosValue("vrid")]
  3920. public Int32? Vrid { get; set; }
  3921. [RosValue("backup", IsDynamic=true)]
  3922. public String Backup { get; set; }
  3923. [RosValue("invalid", IsDynamic=true)]
  3924. public String Invalid { get; set; }
  3925. [RosValue("mac-address", IsDynamic=true)]
  3926. public MACAddress? MacAddress { get; set; }
  3927. [RosValue("master", IsDynamic=true)]
  3928. public String Master { get; set; }
  3929. [RosValue("running", IsDynamic=true)]
  3930. public String Running { get; set; }
  3931. public static InterfaceVrrp Parse(string str, Connection conn)
  3932. {
  3933. if(string.IsNullOrEmpty(str))
  3934. return null;
  3935. InterfaceVrrp obj = new InterfaceVrrp();
  3936. obj.FindByName(conn, str);
  3937. return obj;
  3938. }
  3939. public override string ToString() { return Name.ToString(); }
  3940. }
  3941. [RosObject("interface wireless", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  3942. public class InterfaceWireless : RosItemObject<InterfaceWireless>
  3943. {
  3944. public enum AdaptiveNoiseImmunityEnum
  3945. {
  3946. [RosValue("ap-and-client-mode")]
  3947. ApAndClientMode,
  3948. [RosValue("client-mode")]
  3949. ClientMode,
  3950. [RosValue("none")]
  3951. None,
  3952. }
  3953. [RosValue("adaptive-noise-immunity")]
  3954. public AdaptiveNoiseImmunityEnum? AdaptiveNoiseImmunity { get; set; }
  3955. [RosValue("allow-sharedkey")]
  3956. public Boolean? AllowSharedkey { get; set; }
  3957. // Antenna gain in dBi
  3958. [RosValue("antenna-gain")]
  3959. public Int32? AntennaGain { get; set; }
  3960. public enum AntennaModeEnum
  3961. {
  3962. [RosValue("ant-a")]
  3963. AntA,
  3964. [RosValue("ant-b")]
  3965. AntB,
  3966. [RosValue("rxa-txb")]
  3967. RxaTxb,
  3968. [RosValue("txa-rxb")]
  3969. TxaRxb,
  3970. }
  3971. // Select antenna to use for transmitting and for receiving.
  3972. [RosValue("antenna-mode")]
  3973. public AntennaModeEnum? AntennaMode { get; set; }
  3974. [RosValue("area")]
  3975. public String Area { get; set; }
  3976. public enum ArpEnum
  3977. {
  3978. [RosValue("disabled")]
  3979. Disabled,
  3980. [RosValue("enabled")]
  3981. Enabled,
  3982. [RosValue("proxy-arp")]
  3983. ProxyArp,
  3984. [RosValue("reply-only")]
  3985. ReplyOnly,
  3986. }
  3987. // Address Resolution Protocol
  3988. [RosValue("arp")]
  3989. public ArpEnum? Arp { get; set; }
  3990. // Defines set of used data rates, channel frequencies and widths.
  3991. [RosValue("band")]
  3992. public String Band { get; set; }
  3993. // Basic rates in 802.11a or 802.11g standard
  3994. [RosValue("basic-rates-a/g")]
  3995. public String BasicRatesAG { get; set; }
  3996. // Basic rates in 802.11b mode
  3997. [RosValue("basic-rates-b")]
  3998. public String BasicRatesB { get; set; }
  3999. public enum BridgeModeEnum
  4000. {
  4001. [RosValue("disabled")]
  4002. Disabled,
  4003. [RosValue("enabled")]
  4004. Enabled,
  4005. }
  4006. [RosValue("bridge-mode")]
  4007. public BridgeModeEnum? BridgeMode { get; set; }
  4008. public enum BurstTimeEnum
  4009. {
  4010. [RosValue("disabled")]
  4011. Disabled,
  4012. }
  4013. // Time in ms which will be used to send data without stopping
  4014. [RosValue("burst-time")]
  4015. public BurstTimeEnum? BurstTime { get; set; }
  4016. public enum ChannelWidthEnum
  4017. {
  4018. [RosValue("10mhz")]
  4019. E10mhz,
  4020. [RosValue("20mhz")]
  4021. E20mhz,
  4022. [RosValue("40mhz")]
  4023. E40mhz,
  4024. [RosValue("5mhz")]
  4025. E5mhz,
  4026. }
  4027. [RosValue("channel-width")]
  4028. public ChannelWidthEnum? ChannelWidth { get; set; }
  4029. // Short description of the item
  4030. [RosValue("comment")]
  4031. public String Comment { get; set; }
  4032. [RosValue("compression")]
  4033. public Boolean? Compression { get; set; }
  4034. public enum CountryEnum
  4035. {
  4036. [RosValue("albania")]
  4037. Albania,
  4038. [RosValue("algeria")]
  4039. Algeria,
  4040. [RosValue("argentina")]
  4041. Argentina,
  4042. [RosValue("armenia")]
  4043. Armenia,
  4044. [RosValue("australia")]
  4045. Australia,
  4046. }
  4047. // Limits a frequency and a transmit power to those which are allowed in the respective country
  4048. [RosValue("country")]
  4049. public CountryEnum? Country { get; set; }
  4050. [RosValue("default-ap-tx-limit")]
  4051. public Int32? DefaultApTxLimit { get; set; }
  4052. // Accept or reject a client that wants to associate, but it's not in the access-list
  4053. [RosValue("default-authentication")]
  4054. public Boolean? DefaultAuthentication { get; set; }
  4055. [RosValue("default-client-tx-limit")]
  4056. public Int32? DefaultClientTxLimit { get; set; }
  4057. // Defines whether to use default forwarding or not
  4058. [RosValue("default-forwarding")]
  4059. public Boolean? DefaultForwarding { get; set; }
  4060. public enum DfsModeEnum
  4061. {
  4062. [RosValue("no-radar-detect")]
  4063. NoRadarDetect,
  4064. [RosValue("none")]
  4065. None,
  4066. [RosValue("radar-detect")]
  4067. RadarDetect,
  4068. }
  4069. // Used for APs to dynamically select frequency at which this AP will operate
  4070. [RosValue("dfs-mode")]
  4071. public DfsModeEnum? DfsMode { get; set; }
  4072. // Disable or not running check
  4073. [RosValue("disable-running-check")]
  4074. public Boolean? DisableRunningCheck { get; set; }
  4075. // Defines whether item is ignored or used
  4076. [RosValue("disabled")]
  4077. public Boolean? Disabled { get; set; }
  4078. public enum DisconnectTimeoutEnum
  4079. {
  4080. [RosValue("DisconnectTimeout")]
  4081. DisconnectTimeout,
  4082. }
  4083. // Only above this value the client device is considered as disconnected
  4084. [RosValue("disconnect-timeout")]
  4085. public DisconnectTimeoutEnum? DisconnectTimeout { get; set; }
  4086. public enum DistanceEnum
  4087. {
  4088. [RosValue("dynamic")]
  4089. Dynamic,
  4090. [RosValue("indoors")]
  4091. Indoors,
  4092. }
  4093. [RosValue("distance")]
  4094. public DistanceEnum? Distance { get; set; }
  4095. [RosValue("frame-lifetime")]
  4096. public Int32? FrameLifetime { get; set; }
  4097. // Channel frequency on which AP will operate.
  4098. [RosValue("frequency")]
  4099. public Int32? Frequency { get; set; }
  4100. public enum FrequencyModeEnum
  4101. {
  4102. [RosValue("manual-txpower")]
  4103. ManualTxpower,
  4104. [RosValue("regulatory-domain")]
  4105. RegulatoryDomain,
  4106. [RosValue("superchannel")]
  4107. Superchannel,
  4108. }
  4109. // Defines which frequency channels to allow
  4110. [RosValue("frequency-mode")]
  4111. public FrequencyModeEnum? FrequencyMode { get; set; }
  4112. [RosValue("frequency-offset")]
  4113. public String FrequencyOffset { get; set; }
  4114. // Hide SSID string
  4115. [RosValue("hide-ssid")]
  4116. public Boolean? HideSsid { get; set; }
  4117. [RosValue("ht-ampdu-priorities")]
  4118. public String HtAmpduPriorities { get; set; }
  4119. [RosValue("ht-amsdu-limit")]
  4120. public Int32? HtAmsduLimit { get; set; }
  4121. [RosValue("ht-amsdu-threshold")]
  4122. public Int32? HtAmsduThreshold { get; set; }
  4123. [RosValue("ht-basic-mcs")]
  4124. public String HtBasicMcs { get; set; }
  4125. public enum HtExtensionChannelEnum
  4126. {
  4127. [RosValue("above-control")]
  4128. AboveControl,
  4129. [RosValue("below-control")]
  4130. BelowControl,
  4131. [RosValue("disabled")]
  4132. Disabled,
  4133. }
  4134. [RosValue("ht-extension-channel")]
  4135. public HtExtensionChannelEnum? HtExtensionChannel { get; set; }
  4136. public enum HtGuardIntervalEnum
  4137. {
  4138. [RosValue("any")]
  4139. Any,
  4140. [RosValue("long")]
  4141. Long,
  4142. }
  4143. [RosValue("ht-guard-interval")]
  4144. public HtGuardIntervalEnum? HtGuardInterval { get; set; }
  4145. [RosValue("ht-rxchains")]
  4146. public String HtRxchains { get; set; }
  4147. [RosValue("ht-supported-mcs")]
  4148. public String HtSupportedMcs { get; set; }
  4149. [RosValue("ht-txchains")]
  4150. public String HtTxchains { get; set; }
  4151. public enum HwFragmentationThresholdEnum
  4152. {
  4153. [RosValue("disabled")]
  4154. Disabled,
  4155. }
  4156. public struct HwFragmentationThresholdType
  4157. {
  4158. private object value;
  4159. public Int32? Num
  4160. {
  4161. get { return value as Int32?; }
  4162. set { this.value = value; }
  4163. }
  4164. public static implicit operator HwFragmentationThresholdType(Int32? value)
  4165. {
  4166. return new HwFragmentationThresholdType() { value = value };
  4167. }public HwFragmentationThresholdEnum? State
  4168. {
  4169. get { return value as HwFragmentationThresholdEnum?; }
  4170. set { this.value = value; }
  4171. }
  4172. public static implicit operator HwFragmentationThresholdType(HwFragmentationThresholdEnum? value)
  4173. {
  4174. return new HwFragmentationThresholdType() { value = value };
  4175. }
  4176. public static HwFragmentationThresholdType Parse(string str, Connection conn)
  4177. {
  4178. try { return new HwFragmentationThresholdType() { value = TypeFormatter.ConvertFromString<Int32>(str, conn) }; }
  4179. catch(Exception) { }
  4180. try { return new HwFragmentationThresholdType() { value = TypeFormatter.ConvertFromString<HwFragmentationThresholdEnum>(str, conn) }; }
  4181. catch(Exception) { }
  4182. throw new NotSupportedException();
  4183. }
  4184. public override string ToString() { return value != null ? value.ToString() : null; }
  4185. }
  4186. [RosValue("hw-fragmentation-threshold")]
  4187. public HwFragmentationThresholdType? HwFragmentationThreshold { get; set; }
  4188. public enum HwProtectionModeEnum
  4189. {
  4190. [RosValue("cts-to-self")]
  4191. CtsToSelf,
  4192. [RosValue("none")]
  4193. None,
  4194. [RosValue("rts-cts")]
  4195. RtsCts,
  4196. }
  4197. [RosValue("hw-protection-mode")]
  4198. public HwProtectionModeEnum? HwProtectionMode { get; set; }
  4199. [RosValue("hw-protection-threshold")]
  4200. public Int32? HwProtectionThreshold { get; set; }
  4201. [RosValue("hw-retries")]
  4202. public Int32? HwRetries { get; set; }
  4203. [RosValue("l2mtu")]
  4204. public UInt16? L2mtu { get; set; }
  4205. // MAC address of the interface
  4206. [RosValue("mac-address")]
  4207. public MACAddress? MacAddress { get; set; }
  4208. // Physical wireless interface used by virtual AP.
  4209. [RosValue("master-interface")]
  4210. public String MasterInterface { get; set; }
  4211. // The maximum count of the stations
  4212. [RosValue("max-station-count")]
  4213. public Int32? MaxStationCount { get; set; }
  4214. public enum ModeEnum
  4215. {
  4216. [RosValue("alignment-only")]
  4217. AlignmentOnly,
  4218. [RosValue("ap-bridge")]
  4219. ApBridge,
  4220. [RosValue("bridge")]
  4221. Bridge,
  4222. [RosValue("nstreme-dual-slave")]
  4223. NstremeDualSlave,
  4224. [RosValue("station")]
  4225. Station,
  4226. [RosValue("wds-slave")]
  4227. WdsSlave,
  4228. [RosValue("station-pseudobridge")]
  4229. StationPseudobridge,
  4230. [RosValue("station-wds")]
  4231. StationWds,
  4232. [RosValue("station-pseudobridge-clone")]
  4233. StationPseudobridgeClone,
  4234. }
  4235. // Operate as AP or station
  4236. [RosValue("mode")]
  4237. public ModeEnum? Mode { get; set; }
  4238. // Maximum Transmit Unit
  4239. [RosValue("mtu")]
  4240. public Int32? Mtu { get; set; }
  4241. // The name of the interface
  4242. [RosValue("name")]
  4243. public String Name { get; set; }
  4244. // Value in dBm below whcih it's rather noise than a normal signal
  4245. [RosValue("noise-floor-threshold")]
  4246. public String NoiseFloorThreshold { get; set; }
  4247. [RosValue("nv2-cell-radius")]
  4248. public Int32? Nv2CellRadius { get; set; }
  4249. [RosValue("nv2-noise-floor-offset")]
  4250. public String Nv2NoiseFloorOffset { get; set; }
  4251. [RosValue("nv2-preshared-key")]
  4252. public String Nv2PresharedKey { get; set; }
  4253. public enum Nv2QosEnum
  4254. {
  4255. [RosValue("default")]
  4256. Default,
  4257. [RosValue("frame-priority")]
  4258. FramePriority,
  4259. }
  4260. [RosValue("nv2-qos")]
  4261. public Nv2QosEnum? Nv2Qos { get; set; }
  4262. [RosValue("nv2-queue-count")]
  4263. public Int32? Nv2QueueCount { get; set; }
  4264. public enum Nv2SecurityEnum
  4265. {
  4266. [RosValue("disabled")]
  4267. Disabled,
  4268. [RosValue("enabled")]
  4269. Enabled,
  4270. }
  4271. [RosValue("nv2-security")]
  4272. public Nv2SecurityEnum? Nv2Security { get; set; }
  4273. public enum OnFailRetryTimeEnum
  4274. {
  4275. [RosValue("OnFailRetryTime")]
  4276. OnFailRetryTime,
  4277. }
  4278. [RosValue("on-fail-retry-time")]
  4279. public OnFailRetryTimeEnum? OnFailRetryTime { get; set; }
  4280. public enum PeriodicCalibrationEnum
  4281. {
  4282. [RosValue("default")]
  4283. Default,
  4284. [RosValue("disabled")]
  4285. Disabled,
  4286. [RosValue("enabled")]
  4287. Enabled,
  4288. }
  4289. // To ensure performance of chip set over temperature and environmental changes, the software performs periodic calibration
  4290. [RosValue("periodic-calibration")]
  4291. public PeriodicCalibrationEnum? PeriodicCalibration { get; set; }
  4292. [RosValue("periodic-calibration-interval")]
  4293. public Int32? PeriodicCalibrationInterval { get; set; }
  4294. public enum PreambleModeEnum
  4295. {
  4296. [RosValue("both")]
  4297. Both,
  4298. [RosValue("long")]
  4299. Long,
  4300. [RosValue("short")]
  4301. Short,
  4302. }
  4303. // The synchronization field in a wireless packet
  4304. [RosValue("preamble-mode")]
  4305. public PreambleModeEnum? PreambleMode { get; set; }
  4306. public enum PrismCardtypeEnum
  4307. {
  4308. [RosValue("100mW")]
  4309. E100mW,
  4310. [RosValue("200mW")]
  4311. E200mW,
  4312. [RosValue("30mW")]
  4313. E30mW,
  4314. }
  4315. // The output of the Prism chipset based card
  4316. [RosValue("prism-cardtype")]
  4317. public PrismCardtypeEnum? PrismCardtype { get; set; }
  4318. [RosValue("proprietary-extensions")]
  4319. public String ProprietaryExtensions { get; set; }
  4320. // A Descriptive name of the card
  4321. [RosValue("radio-name")]
  4322. public String RadioName { get; set; }
  4323. public enum RateSetEnum
  4324. {
  4325. [RosValue("configured")]
  4326. Configured,
  4327. [RosValue("default")]
  4328. Default,
  4329. }
  4330. // Rate set to use
  4331. [RosValue("rate-set")]
  4332. public RateSetEnum? RateSet { get; set; }
  4333. // Set of channel frequencies that will be used by device.
  4334. [RosValue("scan-list")]
  4335. public String ScanList { get; set; }
  4336. [RosValue("security-profile")]
  4337. public RouterOS.InterfaceWirelessSecurityProfiles SecurityProfile { get; set; }
  4338. // Name that identifies wireless network.
  4339. [RosValue("ssid")]
  4340. public String Ssid { get; set; }
  4341. [RosValue("station-bridge-clone-mac")]
  4342. public MACAddress? StationBridgeCloneMac { get; set; }
  4343. // Rates to be supported in 802.11a or 802.11g standard
  4344. [RosValue("supported-rates-a/g")]
  4345. public String SupportedRatesAG { get; set; }
  4346. // Rates to be supported in 802.11b standard
  4347. [RosValue("supported-rates-b")]
  4348. public String SupportedRatesB { get; set; }
  4349. [RosValue("tdma-debug")]
  4350. public Int32? TdmaDebug { get; set; }
  4351. public enum TdmaOverrideRateEnum
  4352. {
  4353. [RosValue("12mbps")]
  4354. E12mbps,
  4355. [RosValue("18mbps")]
  4356. E18mbps,
  4357. [RosValue("24mbps")]
  4358. E24mbps,
  4359. [RosValue("36mbps")]
  4360. E36mbps,
  4361. [RosValue("48mbps")]
  4362. E48mbps,
  4363. }
  4364. [RosValue("tdma-override-rate")]
  4365. public TdmaOverrideRateEnum? TdmaOverrideRate { get; set; }
  4366. [RosValue("tdma-override-size")]
  4367. public Int32? TdmaOverrideSize { get; set; }
  4368. [RosValue("tdma-period-size")]
  4369. public Int32? TdmaPeriodSize { get; set; }
  4370. // Transmit power in dBm
  4371. [RosValue("tx-power")]
  4372. public String TxPower { get; set; }
  4373. public enum TxPowerModeEnum
  4374. {
  4375. [RosValue("all-rates-fixed")]
  4376. AllRatesFixed,
  4377. [RosValue("card-rates")]
  4378. CardRates,
  4379. [RosValue("default")]
  4380. Default,
  4381. [RosValue("manual-table")]
  4382. ManualTable,
  4383. }
  4384. // Transmit power mode for the card
  4385. [RosValue("tx-power-mode")]
  4386. public TxPowerModeEnum? TxPowerMode { get; set; }
  4387. public enum DisabledEnum
  4388. {
  4389. [RosValue("disabled")]
  4390. Disabled,
  4391. }
  4392. public enum UpdateStatsIntervalEnum
  4393. {
  4394. [RosValue("Interval")]
  4395. Interval,
  4396. }
  4397. public struct UpdateStatsIntervalType
  4398. {
  4399. private object value;
  4400. public DisabledEnum? Disabled
  4401. {
  4402. get { return value as DisabledEnum?; }
  4403. set { this.value = value; }
  4404. }
  4405. public static implicit operator UpdateStatsIntervalType(DisabledEnum? value)
  4406. {
  4407. return new UpdateStatsIntervalType() { value = value };
  4408. }public UpdateStatsIntervalEnum? State
  4409. {
  4410. get { return value as UpdateStatsIntervalEnum?; }
  4411. set { this.value = value; }
  4412. }
  4413. public static implicit operator UpdateStatsIntervalType(UpdateStatsIntervalEnum? value)
  4414. {
  4415. return new UpdateStatsIntervalType() { value = value };
  4416. }
  4417. public static UpdateStatsIntervalType Parse(string str, Connection conn)
  4418. {
  4419. try { return new UpdateStatsIntervalType() { value = TypeFormatter.ConvertFromString<DisabledEnum>(str, conn) }; }
  4420. catch(Exception) { }
  4421. try { return new UpdateStatsIntervalType() { value = TypeFormatter.ConvertFromString<UpdateStatsIntervalEnum>(str, conn) }; }
  4422. catch(Exception) { }
  4423. throw new NotSupportedException();
  4424. }
  4425. public override string ToString() { return value != null ? value.ToString() : null; }
  4426. }
  4427. // How often to update statistics in '/interface wireless registration-table'
  4428. [RosValue("update-stats-interval")]
  4429. public UpdateStatsIntervalType? UpdateStatsInterval { get; set; }
  4430. [RosValue("wds-cost-range")]
  4431. public String WdsCostRange { get; set; }
  4432. public enum TlsCertificateEnum
  4433. {
  4434. [RosValue("none")]
  4435. None,
  4436. }
  4437. public struct WdsDefaultBridgeType
  4438. {
  4439. private object value;
  4440. public TlsCertificateEnum? TlsCertificate
  4441. {
  4442. get { return value as TlsCertificateEnum?; }
  4443. set { this.value = value; }
  4444. }
  4445. public static implicit operator WdsDefaultBridgeType(TlsCertificateEnum? value)
  4446. {
  4447. return new WdsDefaultBridgeType() { value = value };
  4448. }public RouterOS.Interface WdsDefaultBridge
  4449. {
  4450. get { return value as RouterOS.Interface; }
  4451. set { this.value = value; }
  4452. }
  4453. public static implicit operator WdsDefaultBridgeType(RouterOS.Interface value)
  4454. {
  4455. return new WdsDefaultBridgeType() { value = value };
  4456. }
  4457. public static WdsDefaultBridgeType Parse(string str, Connection conn)
  4458. {
  4459. try { return new WdsDefaultBridgeType() { value = TypeFormatter.ConvertFromString<TlsCertificateEnum>(str, conn) }; }
  4460. catch(Exception) { }
  4461. try { return new WdsDefaultBridgeType() { value = TypeFormatter.ConvertFromString<RouterOS.Interface>(str, conn) }; }
  4462. catch(Exception) { }
  4463. throw new NotSupportedException();
  4464. }
  4465. public override string ToString() { return value != null ? value.ToString() : null; }
  4466. }
  4467. // Default bridge for WDS interface
  4468. [RosValue("wds-default-bridge")]
  4469. public WdsDefaultBridgeType? WdsDefaultBridge { get; set; }
  4470. [RosValue("wds-default-cost")]
  4471. public Int32? WdsDefaultCost { get; set; }
  4472. // Whether the AP will create WDS links with any other AP in this frequency
  4473. [RosValue("wds-ignore-ssid")]
  4474. public Boolean? WdsIgnoreSsid { get; set; }
  4475. public enum WdsModeEnum
  4476. {
  4477. [RosValue("disabled")]
  4478. Disabled,
  4479. [RosValue("dynamic")]
  4480. Dynamic,
  4481. [RosValue("dynamic-mesh")]
  4482. DynamicMesh,
  4483. [RosValue("static")]
  4484. Static,
  4485. [RosValue("static-mesh")]
  4486. StaticMesh,
  4487. }
  4488. // WDS mode
  4489. [RosValue("wds-mode")]
  4490. public WdsModeEnum? WdsMode { get; set; }
  4491. [RosValue("wireless-protocol")]
  4492. public String WirelessProtocol { get; set; }
  4493. public enum WmmSupportEnum
  4494. {
  4495. [RosValue("disabled")]
  4496. Disabled,
  4497. [RosValue("enabled")]
  4498. Enabled,
  4499. [RosValue("required")]
  4500. Required,
  4501. }
  4502. [RosValue("wmm-support")]
  4503. public WmmSupportEnum? WmmSupport { get; set; }
  4504. [RosValue("running", IsDynamic=true)]
  4505. public String Running { get; set; }
  4506. public enum InterfaceTypeType
  4507. {
  4508. [RosValue("Atheros 11N")]
  4509. Atheros11N,
  4510. [RosValue("Atheros AR521... ")]
  4511. AtherosAR521,
  4512. [RosValue("Atheros")]
  4513. Atheros,
  4514. [RosValue("AR5413")]
  4515. AR5413,
  4516. [RosValue("Atheros AR9271")]
  4517. AtherosAR9271,
  4518. [RosValue("Atheros AR9300")]
  4519. AtherosAR9300,
  4520. [RosValue("Prism")]
  4521. Prism,
  4522. [RosValue("virtual-AP")]
  4523. VirtualAP,
  4524. }
  4525. [RosValue("interface-type", IsDynamic=true)]
  4526. public InterfaceTypeType? InterfaceType { get; set; }
  4527. public static InterfaceWireless Parse(string str, Connection conn)
  4528. {
  4529. if(string.IsNullOrEmpty(str))
  4530. return null;
  4531. InterfaceWireless obj = new InterfaceWireless();
  4532. obj.FindByName(conn, str);
  4533. return obj;
  4534. }
  4535. public override string ToString() { return Name.ToString(); }
  4536. }
  4537. [RosObject("interface wireless access-list", CanAdd=true, CanSet=true, CanMove=true, CanGet=true, CanRemove=true, CanUnset=true)]
  4538. public class InterfaceWirelessAccessList : RosItemObject<InterfaceWirelessAccessList>
  4539. {
  4540. [RosValue("ap-tx-limit")]
  4541. public Int32? ApTxLimit { get; set; }
  4542. // Accept or not this client when ir tries to connect
  4543. [RosValue("authentication")]
  4544. public Boolean? Authentication { get; set; }
  4545. [RosValue("client-tx-limit")]
  4546. public Int32? ClientTxLimit { get; set; }
  4547. // Short description of the item
  4548. [RosValue("comment")]
  4549. public String Comment { get; set; }
  4550. // Defines whether item is ignored or used
  4551. [RosValue("disabled")]
  4552. public Boolean? Disabled { get; set; }
  4553. // Forward or not the client's frames to other wireless client
  4554. [RosValue("forwarding")]
  4555. public Boolean? Forwarding { get; set; }
  4556. public enum InterfaceEnum
  4557. {
  4558. [RosValue("all")]
  4559. All,
  4560. }
  4561. public struct InterfaceType
  4562. {
  4563. private object value;
  4564. public RouterOS.Interface Interface
  4565. {
  4566. get { return value as RouterOS.Interface; }
  4567. set { this.value = value; }
  4568. }
  4569. public static implicit operator InterfaceType(RouterOS.Interface value)
  4570. {
  4571. return new InterfaceType() { value = value };
  4572. }public InterfaceEnum? State
  4573. {
  4574. get { return value as InterfaceEnum?; }
  4575. set { this.value = value; }
  4576. }
  4577. public static implicit operator InterfaceType(InterfaceEnum? value)
  4578. {
  4579. return new InterfaceType() { value = value };
  4580. }
  4581. public static InterfaceType Parse(string str, Connection conn)
  4582. {
  4583. try { return new InterfaceType() { value = TypeFormatter.ConvertFromString<RouterOS.Interface>(str, conn) }; }
  4584. catch(Exception) { }
  4585. try { return new InterfaceType() { value = TypeFormatter.ConvertFromString<InterfaceEnum>(str, conn) }; }
  4586. catch(Exception) { }
  4587. throw new NotSupportedException();
  4588. }
  4589. public override string ToString() { return value != null ? value.ToString() : null; }
  4590. }
  4591. // AP interface
  4592. [RosValue("interface")]
  4593. public InterfaceType? Interface { get; set; }
  4594. // MAC address of the client
  4595. [RosValue("mac-address")]
  4596. public MACAddress? MacAddress { get; set; }
  4597. [RosValue("management-protection-key")]
  4598. public String ManagementProtectionKey { get; set; }
  4599. public enum PrivateAlgoEnum
  4600. {
  4601. [RosValue("104bit-wep")]
  4602. E104bitWep,
  4603. [RosValue("40bit-wep")]
  4604. E40bitWep,
  4605. [RosValue("aes-ccm")]
  4606. AesCcm,
  4607. [RosValue("none")]
  4608. None,
  4609. [RosValue("tkip")]
  4610. Tkip,
  4611. }
  4612. // Encryption algorithm to use
  4613. [RosValue("private-algo")]
  4614. public PrivateAlgoEnum? PrivateAlgo { get; set; }
  4615. // Private key of the client to validate during authentication
  4616. [RosValue("private-key")]
  4617. public String PrivateKey { get; set; }
  4618. [RosValue("private-pre-shared-key")]
  4619. public String PrivatePreSharedKey { get; set; }
  4620. [RosValue("signal-range")]
  4621. public String SignalRange { get; set; }
  4622. [RosValue("time", CanUnset=true)]
  4623. public String Time { get; set; }
  4624. }
  4625. [RosObject("interface wireless align", CanSet=true, CanGet=true)]
  4626. public class InterfaceWirelessAlign : RosValueObject
  4627. {
  4628. // Whether the interface will receive and transmit alignment packets or it will only receive them
  4629. [RosValue("active-mode")]
  4630. public Boolean? ActiveMode { get; set; }
  4631. // Signal-strength at which audion frequency will be the highest
  4632. [RosValue("audio-max")]
  4633. public String AudioMax { get; set; }
  4634. // Signal-strength at which audion frequency will be the lowest
  4635. [RosValue("audio-min")]
  4636. public String AudioMin { get; set; }
  4637. // MAC address of the remote host which will be listened
  4638. [RosValue("audio-monitor")]
  4639. public MACAddress? AudioMonitor { get; set; }
  4640. // MAC address of the remote host from which it's necessary to receive packets
  4641. [RosValue("filter-mac")]
  4642. public MACAddress? FilterMac { get; set; }
  4643. // Size of alignment packets that will be transmitted
  4644. [RosValue("frame-size")]
  4645. public Int32? FrameSize { get; set; }
  4646. // Number of frames that will be sent per second (in active-mode)
  4647. [RosValue("frames-per-second")]
  4648. public Int32? FramesPerSecond { get; set; }
  4649. // Whether the interface gathers the packets about other 802.11 standard packets or only alignment packets
  4650. [RosValue("receive-all")]
  4651. public Boolean? ReceiveAll { get; set; }
  4652. // Whether you want to accept packets from hosts with other ssid that yours
  4653. [RosValue("ssid-all")]
  4654. public Boolean? SsidAll { get; set; }
  4655. }
  4656. [RosObject("interface wireless connect-list", CanAdd=true, CanSet=true, CanMove=true, CanGet=true, CanRemove=true)]
  4657. public class InterfaceWirelessConnectList : RosItemObject<InterfaceWirelessConnectList>
  4658. {
  4659. [RosValue("area-prefix")]
  4660. public String AreaPrefix { get; set; }
  4661. // Short description of the item
  4662. [RosValue("comment")]
  4663. public String Comment { get; set; }
  4664. [RosValue("connect")]
  4665. public Boolean? Connect { get; set; }
  4666. // Defines whether item is ignored or used
  4667. [RosValue("disabled")]
  4668. public Boolean? Disabled { get; set; }
  4669. [RosValue("interface")]
  4670. public RouterOS.Interface Interface { get; set; }
  4671. [RosValue("mac-address")]
  4672. public MACAddress? MacAddress { get; set; }
  4673. public enum TlsCertificateEnum
  4674. {
  4675. [RosValue("none")]
  4676. None,
  4677. }
  4678. public struct SecurityProfileType
  4679. {
  4680. private object value;
  4681. public TlsCertificateEnum? TlsCertificate
  4682. {
  4683. get { return value as TlsCertificateEnum?; }
  4684. set { this.value = value; }
  4685. }
  4686. public static implicit operator SecurityProfileType(TlsCertificateEnum? value)
  4687. {
  4688. return new SecurityProfileType() { value = value };
  4689. }public RouterOS.InterfaceWirelessSecurityProfiles E5
  4690. {
  4691. get { return value as RouterOS.InterfaceWirelessSecurityProfiles; }
  4692. set { this.value = value; }
  4693. }
  4694. public static implicit operator SecurityProfileType(RouterOS.InterfaceWirelessSecurityProfiles value)
  4695. {
  4696. return new SecurityProfileType() { value = value };
  4697. }
  4698. public static SecurityProfileType Parse(string str, Connection conn)
  4699. {
  4700. try { return new SecurityProfileType() { value = TypeFormatter.ConvertFromString<TlsCertificateEnum>(str, conn) }; }
  4701. catch(Exception) { }
  4702. try { return new SecurityProfileType() { value = TypeFormatter.ConvertFromString<RouterOS.InterfaceWirelessSecurityProfiles>(str, conn) }; }
  4703. catch(Exception) { }
  4704. throw new NotSupportedException();
  4705. }
  4706. public override string ToString() { return value != null ? value.ToString() : null; }
  4707. }
  4708. [RosValue("security-profile")]
  4709. public SecurityProfileType? SecurityProfile { get; set; }
  4710. [RosValue("signal-range")]
  4711. public String SignalRange { get; set; }
  4712. [RosValue("ssid")]
  4713. public String Ssid { get; set; }
  4714. [RosValue("wireless-protocol")]
  4715. public String WirelessProtocol { get; set; }
  4716. }
  4717. [RosObject("interface wireless info", CanGet=true)]
  4718. public class InterfaceWirelessInfo : RosItemObject<InterfaceWirelessInfo>
  4719. {
  4720. public enum CapabilitiesType
  4721. {
  4722. [RosValue("ack-timeout-control")]
  4723. AckTimeoutControl,
  4724. [RosValue("alignment-mode")]
  4725. AlignmentMode,
  4726. [RosValue("burst-support")]
  4727. BurstSupport,
  4728. [RosValue("compression")]
  4729. Compression,
  4730. [RosValue("ht40-a")]
  4731. Ht40A,
  4732. [RosValue("ht40-g")]
  4733. Ht40G,
  4734. [RosValue("no-ant-mode")]
  4735. NoAntMode,
  4736. [RosValue("noise-floor-control")]
  4737. NoiseFloorControl,
  4738. [RosValue("nstreme")]
  4739. Nstreme,
  4740. [RosValue("nv2")]
  4741. Nv2,
  4742. [RosValue("power-channel")]
  4743. PowerChannel,
  4744. [RosValue("scanning")]
  4745. Scanning,
  4746. [RosValue("sniffing")]
  4747. Sniffing,
  4748. [RosValue("spectral-scan")]
  4749. SpectralScan,
  4750. [RosValue("tx-power-control")]
  4751. TxPowerControl,
  4752. [RosValue("virtual-ap")]
  4753. VirtualAp,
  4754. [RosValue("wmm")]
  4755. Wmm,
  4756. }
  4757. [RosValue("capabilities", IsDynamic=true)]
  4758. public CapabilitiesType? Capabilities { get; set; }
  4759. [RosValue("chip-info", IsDynamic=true)]
  4760. public String ChipInfo { get; set; }
  4761. public enum DefaultPeriodicCalibrationType
  4762. {
  4763. [RosValue("disabled")]
  4764. Disabled,
  4765. [RosValue("enabled")]
  4766. Enabled,
  4767. }
  4768. [RosValue("default-periodic-calibration", IsDynamic=true)]
  4769. public DefaultPeriodicCalibrationType? DefaultPeriodicCalibration { get; set; }
  4770. [RosValue("firmware", IsDynamic=true)]
  4771. public String Firmware { get; set; }
  4772. [RosValue("ht-chains", IsDynamic=true)]
  4773. public Int32? HtChains { get; set; }
  4774. public enum InterfaceTypeType
  4775. {
  4776. [RosValue("Atheros 11N")]
  4777. Atheros11N,
  4778. [RosValue("Atheros AR521... ")]
  4779. AtherosAR521,
  4780. [RosValue("Atheros")]
  4781. Atheros,
  4782. [RosValue("AR5413")]
  4783. AR5413,
  4784. [RosValue("Prism")]
  4785. Prism,
  4786. [RosValue("virtual-AP")]
  4787. VirtualAP,
  4788. }
  4789. [RosValue("interface-type", IsDynamic=true)]
  4790. public InterfaceTypeType? InterfaceType { get; set; }
  4791. [RosValue("name", IsDynamic=true)]
  4792. public String Name { get; set; }
  4793. [RosValue("pci-info", IsDynamic=true)]
  4794. public String PciInfo { get; set; }
  4795. [RosValue("supported-bands", IsDynamic=true)]
  4796. public String SupportedBands { get; set; }
  4797. public static InterfaceWirelessInfo Parse(string str, Connection conn)
  4798. {
  4799. if(string.IsNullOrEmpty(str))
  4800. return null;
  4801. InterfaceWirelessInfo obj = new InterfaceWirelessInfo();
  4802. obj.FindByName(conn, str);
  4803. return obj;
  4804. }
  4805. public override string ToString() { return Name.ToString(); }
  4806. }
  4807. [RosObject("interface wireless manual-tx-power-table", CanSet=true, CanGet=true)]
  4808. public class InterfaceWirelessManualTxPowerTable : RosItemObject<InterfaceWirelessManualTxPowerTable>
  4809. {
  4810. // Short description of the item
  4811. [RosValue("comment")]
  4812. public String Comment { get; set; }
  4813. // Define tx-power in dBm for each rate, separate by commas
  4814. [RosValue("manual-tx-powers")]
  4815. public String ManualTxPowers { get; set; }
  4816. [RosValue("name", IsDynamic=true)]
  4817. public String Name { get; set; }
  4818. public static InterfaceWirelessManualTxPowerTable Parse(string str, Connection conn)
  4819. {
  4820. if(string.IsNullOrEmpty(str))
  4821. return null;
  4822. InterfaceWirelessManualTxPowerTable obj = new InterfaceWirelessManualTxPowerTable();
  4823. obj.FindByName(conn, str);
  4824. return obj;
  4825. }
  4826. public override string ToString() { return Name.ToString(); }
  4827. }
  4828. [RosObject("interface wireless nstreme", CanSet=true, CanGet=true)]
  4829. public class InterfaceWirelessNstreme : RosItemObject<InterfaceWirelessNstreme>
  4830. {
  4831. // Short description of the item
  4832. [RosValue("comment")]
  4833. public String Comment { get; set; }
  4834. [RosValue("disable-csma")]
  4835. public Boolean? DisableCsma { get; set; }
  4836. // Whether to switch the card into the nstreme mode
  4837. [RosValue("enable-nstreme")]
  4838. public Boolean? EnableNstreme { get; set; }
  4839. // Whether to use polling for clients
  4840. [RosValue("enable-polling")]
  4841. public Boolean? EnablePolling { get; set; }
  4842. // Maximal frame size
  4843. [RosValue("framer-limit")]
  4844. public Int32? FramerLimit { get; set; }
  4845. public enum FramerPolicyEnum
  4846. {
  4847. [RosValue("best-fit")]
  4848. BestFit,
  4849. [RosValue("dynamic-size")]
  4850. DynamicSize,
  4851. [RosValue("exact-size")]
  4852. ExactSize,
  4853. [RosValue("none")]
  4854. None,
  4855. }
  4856. // The method how to combine frames
  4857. [RosValue("framer-policy")]
  4858. public FramerPolicyEnum? FramerPolicy { get; set; }
  4859. [RosValue("name", IsDynamic=true)]
  4860. public String Name { get; set; }
  4861. public static InterfaceWirelessNstreme Parse(string str, Connection conn)
  4862. {
  4863. if(string.IsNullOrEmpty(str))
  4864. return null;
  4865. InterfaceWirelessNstreme obj = new InterfaceWirelessNstreme();
  4866. obj.FindByName(conn, str);
  4867. return obj;
  4868. }
  4869. public override string ToString() { return Name.ToString(); }
  4870. }
  4871. [RosObject("interface wireless nstreme-dual", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  4872. public class InterfaceWirelessNstremeDual : RosItemObject<InterfaceWirelessNstremeDual>
  4873. {
  4874. public enum ArpEnum
  4875. {
  4876. [RosValue("disabled")]
  4877. Disabled,
  4878. [RosValue("enabled")]
  4879. Enabled,
  4880. [RosValue("proxy-arp")]
  4881. ProxyArp,
  4882. [RosValue("reply-only")]
  4883. ReplyOnly,
  4884. }
  4885. // Address Resolution Protocol
  4886. [RosValue("arp")]
  4887. public ArpEnum? Arp { get; set; }
  4888. // Short description of the item
  4889. [RosValue("comment")]
  4890. public String Comment { get; set; }
  4891. [RosValue("disable-csma")]
  4892. public Boolean? DisableCsma { get; set; }
  4893. // Whether the interface should always be treated as running even if there is no connection to a remote peer
  4894. [RosValue("disable-running-check")]
  4895. public Boolean? DisableRunningCheck { get; set; }
  4896. // Defines whether item is ignored or used
  4897. [RosValue("disabled")]
  4898. public Boolean? Disabled { get; set; }
  4899. // Maximal frame size
  4900. [RosValue("framer-limit")]
  4901. public Int32? FramerLimit { get; set; }
  4902. public enum FramerPolicyEnum
  4903. {
  4904. [RosValue("best-fit")]
  4905. BestFit,
  4906. [RosValue("exact-size")]
  4907. ExactSize,
  4908. [RosValue("none")]
  4909. None,
  4910. }
  4911. // The method how to combine frames
  4912. [RosValue("framer-policy")]
  4913. public FramerPolicyEnum? FramerPolicy { get; set; }
  4914. public enum HtChannelWidthEnum
  4915. {
  4916. [RosValue("2040mhz")]
  4917. E2040mhz,
  4918. [RosValue("20mhz")]
  4919. E20mhz,
  4920. [RosValue("40mhz")]
  4921. E40mhz,
  4922. }
  4923. [RosValue("ht-channel-width")]
  4924. public HtChannelWidthEnum? HtChannelWidth { get; set; }
  4925. public enum HtGuardIntervalEnum
  4926. {
  4927. [RosValue("both")]
  4928. Both,
  4929. [RosValue("long")]
  4930. Long,
  4931. [RosValue("short")]
  4932. Short,
  4933. }
  4934. [RosValue("ht-guard-interval")]
  4935. public HtGuardIntervalEnum? HtGuardInterval { get; set; }
  4936. [RosValue("ht-rates")]
  4937. public String HtRates { get; set; }
  4938. public enum HtStreamsEnum
  4939. {
  4940. [RosValue("both")]
  4941. Both,
  4942. [RosValue("double")]
  4943. Double,
  4944. [RosValue("single")]
  4945. Single,
  4946. }
  4947. [RosValue("ht-streams")]
  4948. public HtStreamsEnum? HtStreams { get; set; }
  4949. [RosValue("l2mtu")]
  4950. public UInt16? L2mtu { get; set; }
  4951. // Maximum Transmit Unit
  4952. [RosValue("mtu")]
  4953. public Int32? Mtu { get; set; }
  4954. // Reference name of the interface
  4955. [RosValue("name")]
  4956. public String Name { get; set; }
  4957. // Rates to be supported in 802.11a or 802.11g standard
  4958. [RosValue("rates-a/g")]
  4959. public String RatesAG { get; set; }
  4960. // Rates to be supported in 802.11b standard
  4961. [RosValue("rates-b")]
  4962. public String RatesB { get; set; }
  4963. // Which MAC address to connect to (this would be the remote receiver card's MAC address)
  4964. [RosValue("remote-mac")]
  4965. public MACAddress? RemoteMac { get; set; }
  4966. public enum RxBandEnum
  4967. {
  4968. [RosValue("2ghz-b")]
  4969. E2ghzB,
  4970. [RosValue("2ghz-g")]
  4971. E2ghzG,
  4972. [RosValue("2ghz-n")]
  4973. E2ghzN,
  4974. [RosValue("5ghz-a")]
  4975. E5ghzA,
  4976. [RosValue("5ghz-n")]
  4977. E5ghzN,
  4978. }
  4979. // Operating band of the receiving radio
  4980. [RosValue("rx-band")]
  4981. public RxBandEnum? RxBand { get; set; }
  4982. public enum RxChannelWidthEnum
  4983. {
  4984. [RosValue("10mhz")]
  4985. E10mhz,
  4986. [RosValue("20mhz")]
  4987. E20mhz,
  4988. [RosValue("40mhz")]
  4989. E40mhz,
  4990. [RosValue("5mhz")]
  4991. E5mhz,
  4992. }
  4993. [RosValue("rx-channel-width")]
  4994. public RxChannelWidthEnum? RxChannelWidth { get; set; }
  4995. // Frequency to use for receiving frames
  4996. [RosValue("rx-frequency")]
  4997. public Int32? RxFrequency { get; set; }
  4998. // Which radio should be used for receiving frames
  4999. [RosValue("rx-radio")]
  5000. public String RxRadio { get; set; }
  5001. public enum TxBandEnum
  5002. {
  5003. [RosValue("2ghz-b")]
  5004. E2ghzB,
  5005. [RosValue("2ghz-g")]
  5006. E2ghzG,
  5007. [RosValue("2ghz-n")]
  5008. E2ghzN,
  5009. [RosValue("5ghz-a")]
  5010. E5ghzA,
  5011. [RosValue("5ghz-n")]
  5012. E5ghzN,
  5013. }
  5014. // Operating band of the transmitting radio
  5015. [RosValue("tx-band")]
  5016. public TxBandEnum? TxBand { get; set; }
  5017. public enum TxChannelWidthEnum
  5018. {
  5019. [RosValue("10mhz")]
  5020. E10mhz,
  5021. [RosValue("20mhz")]
  5022. E20mhz,
  5023. [RosValue("40mhz")]
  5024. E40mhz,
  5025. [RosValue("5mhz")]
  5026. E5mhz,
  5027. }
  5028. [RosValue("tx-channel-width")]
  5029. public TxChannelWidthEnum? TxChannelWidth { get; set; }
  5030. // Frequency to use for transmitting frames
  5031. [RosValue("tx-frequency")]
  5032. public Int32? TxFrequency { get; set; }
  5033. // Which radio should be used for transmitting frames
  5034. [RosValue("tx-radio")]
  5035. public String TxRadio { get; set; }
  5036. [RosValue("mac-address", IsDynamic=true)]
  5037. public MACAddress? MacAddress { get; set; }
  5038. [RosValue("running", IsDynamic=true)]
  5039. public String Running { get; set; }
  5040. public static InterfaceWirelessNstremeDual Parse(string str, Connection conn)
  5041. {
  5042. if(string.IsNullOrEmpty(str))
  5043. return null;
  5044. InterfaceWirelessNstremeDual obj = new InterfaceWirelessNstremeDual();
  5045. obj.FindByName(conn, str);
  5046. return obj;
  5047. }
  5048. public override string ToString() { return Name.ToString(); }
  5049. }
  5050. [RosObject("interface wireless registration-table", CanGet=true, CanRemove=true)]
  5051. public class InterfaceWirelessRegistrationTable : RosItemObject<InterfaceWirelessRegistrationTable>
  5052. {
  5053. [RosValue("ap", IsDynamic=true)]
  5054. public String Ap { get; set; }
  5055. public enum AuthenticationTypeType
  5056. {
  5057. [RosValue("wpa-eap")]
  5058. WpaEap,
  5059. [RosValue("wpa-psk")]
  5060. WpaPsk,
  5061. [RosValue("wpa2-eap")]
  5062. Wpa2Eap,
  5063. [RosValue("wpa2-psk")]
  5064. Wpa2Psk,
  5065. }
  5066. [RosValue("authentication-type", IsDynamic=true)]
  5067. public AuthenticationTypeType? AuthenticationType { get; set; }
  5068. [RosValue("client-tx-limit", IsDynamic=true)]
  5069. public Int32? ClientTxLimit { get; set; }
  5070. [RosValue("compression", IsDynamic=true)]
  5071. public String Compression { get; set; }
  5072. public enum EncryptionType
  5073. {
  5074. [RosValue("104bit-wep")]
  5075. E104bitWep,
  5076. [RosValue("40bit-wep")]
  5077. E40bitWep,
  5078. [RosValue("aes-ccm")]
  5079. AesCcm,
  5080. [RosValue("none")]
  5081. None,
  5082. [RosValue("tkip")]
  5083. Tkip,
  5084. }
  5085. [RosValue("encryption", IsDynamic=true)]
  5086. public EncryptionType? Encryption { get; set; }
  5087. [RosValue("frames", IsDynamic=true)]
  5088. public Int32? Frames { get; set; }
  5089. [RosValue("framing-limit", IsDynamic=true)]
  5090. public Int32? FramingLimit { get; set; }
  5091. public enum GroupEncryptionType
  5092. {
  5093. [RosValue("104bit-wep")]
  5094. E104bitWep,
  5095. [RosValue("40bit-wep")]
  5096. E40bitWep,
  5097. [RosValue("aes-ccm")]
  5098. AesCcm,
  5099. [RosValue("none")]
  5100. None,
  5101. [RosValue("tkip")]
  5102. Tkip,
  5103. }
  5104. [RosValue("group-encryption", IsDynamic=true)]
  5105. public GroupEncryptionType? GroupEncryption { get; set; }
  5106. [RosValue("hw-frames", IsDynamic=true)]
  5107. public Int32? HwFrames { get; set; }
  5108. [RosValue("last-activity", IsDynamic=true)]
  5109. public TimeSpan? LastActivity { get; set; }
  5110. [RosValue("mac-address", IsDynamic=true)]
  5111. public MACAddress? MacAddress { get; set; }
  5112. [RosValue("nstreme", IsDynamic=true)]
  5113. public String Nstreme { get; set; }
  5114. [RosValue("packed-bytes", IsDynamic=true)]
  5115. public Int32? PackedBytes { get; set; }
  5116. [RosValue("packets", IsDynamic=true)]
  5117. public Int32? Packets { get; set; }
  5118. [RosValue("routeros-version", IsDynamic=true)]
  5119. public String RouterosVersion { get; set; }
  5120. [RosValue("rx-rate", IsDynamic=true)]
  5121. public String RxRate { get; set; }
  5122. [RosValue("signal-to-noise", IsDynamic=true)]
  5123. public String SignalToNoise { get; set; }
  5124. [RosValue("tdma-retx", IsDynamic=true)]
  5125. public Int32? TdmaRetx { get; set; }
  5126. [RosValue("tdma-timing-offset", IsDynamic=true)]
  5127. public String TdmaTimingOffset { get; set; }
  5128. [RosValue("tdma-winfull", IsDynamic=true)]
  5129. public Int32? TdmaWinfull { get; set; }
  5130. [RosValue("tx-frames-timed-out", IsDynamic=true)]
  5131. public Int32? TxFramesTimedOut { get; set; }
  5132. [RosValue("tx-signal-strength", IsDynamic=true)]
  5133. public String TxSignalStrength { get; set; }
  5134. [RosValue("uptime", IsDynamic=true)]
  5135. public TimeSpan? Uptime { get; set; }
  5136. [RosValue("wmm-enabled", IsDynamic=true)]
  5137. public String WmmEnabled { get; set; }
  5138. [RosValue("ack-timeout", IsDynamic=true)]
  5139. public Int32? AckTimeout { get; set; }
  5140. [RosValue("ap-tx-limit", IsDynamic=true)]
  5141. public Int32? ApTxLimit { get; set; }
  5142. [RosValue("bytes", IsDynamic=true)]
  5143. public Int32? Bytes { get; set; }
  5144. [RosValue("comment", IsDynamic=true)]
  5145. public String Comment { get; set; }
  5146. [RosValue("distance", IsDynamic=true)]
  5147. public Int32? Distance { get; set; }
  5148. [RosValue("frame-bytes", IsDynamic=true)]
  5149. public Int32? FrameBytes { get; set; }
  5150. [RosValue("framing-current-size", IsDynamic=true)]
  5151. public Int32? FramingCurrentSize { get; set; }
  5152. public enum FramingModeType
  5153. {
  5154. [RosValue("best-fit")]
  5155. BestFit,
  5156. [RosValue("exact-size")]
  5157. ExactSize,
  5158. [RosValue("none")]
  5159. None,
  5160. }
  5161. [RosValue("framing-mode", IsDynamic=true)]
  5162. public FramingModeType? FramingMode { get; set; }
  5163. [RosValue("hw-frame-bytes", IsDynamic=true)]
  5164. public Int32? HwFrameBytes { get; set; }
  5165. [RosValue("interface", IsDynamic=true)]
  5166. public RouterOS.Interface Interface { get; set; }
  5167. [RosValue("last-ip", IsDynamic=true)]
  5168. public IPAddress LastIp { get; set; }
  5169. [RosValue("management-protection", IsDynamic=true)]
  5170. public String ManagementProtection { get; set; }
  5171. [RosValue("p-throughput", IsDynamic=true)]
  5172. public Int32? PThroughput { get; set; }
  5173. [RosValue("packed-frames", IsDynamic=true)]
  5174. public Int32? PackedFrames { get; set; }
  5175. [RosValue("radio-name", IsDynamic=true)]
  5176. public String RadioName { get; set; }
  5177. public struct RxCcqType
  5178. {
  5179. public Int32 Value { get; set; }
  5180. public static RxCcqType Parse(string str)
  5181. {
  5182. if (str.EndsWith("%"))
  5183. str = str.Substring(0, str.Length - "%".Length);
  5184. return new Parser() { Value = TypeFormatter.ConvertFromString<Int32>(str, null) };
  5185. }
  5186. public override string ToString()
  5187. {
  5188. return String.Concat(Value, "%");
  5189. }
  5190. public static implicit operator RxCcqType(Int32 value)
  5191. {
  5192. return new Parser() { Value = value };
  5193. }
  5194. public static implicit operator Int32(RxCcqType parser)
  5195. {
  5196. return parser.Value;
  5197. }
  5198. }
  5199. [RosValue("rx-ccq", IsDynamic=true)]
  5200. public RxCcqType? RxCcq { get; set; }
  5201. [RosValue("signal-strength-ch0", IsDynamic=true)]
  5202. public String SignalStrengthCh0 { get; set; }
  5203. [RosValue("signal-strength-ch1", IsDynamic=true)]
  5204. public String SignalStrengthCh1 { get; set; }
  5205. [RosValue("signal-strength-ch2", IsDynamic=true)]
  5206. public String SignalStrengthCh2 { get; set; }
  5207. [RosValue("strength-at-rates", IsDynamic=true)]
  5208. public String StrengthAtRates { get; set; }
  5209. [RosValue("tdma-rx-size", IsDynamic=true)]
  5210. public Int32? TdmaRxSize { get; set; }
  5211. [RosValue("tdma-tx-size", IsDynamic=true)]
  5212. public Int32? TdmaTxSize { get; set; }
  5213. public struct TxCcqType
  5214. {
  5215. public Int32 Value { get; set; }
  5216. public static TxCcqType Parse(string str)
  5217. {
  5218. if (str.EndsWith("%"))
  5219. str = str.Substring(0, str.Length - "%".Length);
  5220. return new Parser() { Value = TypeFormatter.ConvertFromString<Int32>(str, null) };
  5221. }
  5222. public override string ToString()
  5223. {
  5224. return String.Concat(Value, "%");
  5225. }
  5226. public static implicit operator TxCcqType(Int32 value)
  5227. {
  5228. return new Parser() { Value = value };
  5229. }
  5230. public static implicit operator Int32(TxCcqType parser)
  5231. {
  5232. return parser.Value;
  5233. }
  5234. }
  5235. [RosValue("tx-ccq", IsDynamic=true)]
  5236. public TxCcqType? TxCcq { get; set; }
  5237. [RosValue("tx-rate", IsDynamic=true)]
  5238. public String TxRate { get; set; }
  5239. [RosValue("tx-signal-strength-ch0", IsDynamic=true)]
  5240. public String TxSignalStrengthCh0 { get; set; }
  5241. [RosValue("tx-signal-strength-ch1", IsDynamic=true)]
  5242. public String TxSignalStrengthCh1 { get; set; }
  5243. [RosValue("tx-signal-strength-ch2", IsDynamic=true)]
  5244. public String TxSignalStrengthCh2 { get; set; }
  5245. [RosValue("wds", IsDynamic=true)]
  5246. public String Wds { get; set; }
  5247. }
  5248. [RosObject("interface wireless security-profiles", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  5249. public class InterfaceWirelessSecurityProfiles : RosItemObject<InterfaceWirelessSecurityProfiles>
  5250. {
  5251. [RosValue("authentication-types")]
  5252. public String AuthenticationTypes { get; set; }
  5253. // Short description of the item
  5254. [RosValue("comment")]
  5255. public String Comment { get; set; }
  5256. public enum MethodEnum
  5257. {
  5258. [RosValue("eap-tls")]
  5259. EapTls,
  5260. [RosValue("passthrough")]
  5261. Passthrough,
  5262. }
  5263. [RosValue("eap-methods")]
  5264. public MethodEnum[] EapMethods { get; set; }
  5265. [RosValue("group-ciphers")]
  5266. public String GroupCiphers { get; set; }
  5267. public enum GroupKeyUpdateEnum
  5268. {
  5269. [RosValue("GroupKeyUpdate")]
  5270. GroupKeyUpdate,
  5271. }
  5272. // How often to update group key
  5273. [RosValue("group-key-update")]
  5274. public GroupKeyUpdateEnum? GroupKeyUpdate { get; set; }
  5275. [RosValue("interim-update")]
  5276. public TimeSpan? InterimUpdate { get; set; }
  5277. public enum ManagementProtectionEnum
  5278. {
  5279. [RosValue("allowed")]
  5280. Allowed,
  5281. [RosValue("disabled")]
  5282. Disabled,
  5283. [RosValue("required")]
  5284. Required,
  5285. }
  5286. [RosValue("management-protection")]
  5287. public ManagementProtectionEnum? ManagementProtection { get; set; }
  5288. [RosValue("management-protection-key")]
  5289. public String ManagementProtectionKey { get; set; }
  5290. public enum ModeEnum
  5291. {
  5292. [RosValue("dynamic-keys")]
  5293. DynamicKeys,
  5294. [RosValue("none")]
  5295. None,
  5296. [RosValue("static-keys-optional")]
  5297. StaticKeysOptional,
  5298. [RosValue("static-keys-required")]
  5299. StaticKeysRequired,
  5300. }
  5301. // Security mode
  5302. [RosValue("mode")]
  5303. public ModeEnum? Mode { get; set; }
  5304. // Descriptive name for the security profile
  5305. [RosValue("name")]
  5306. public String Name { get; set; }
  5307. [RosValue("radius-eap-accounting")]
  5308. public Boolean? RadiusEapAccounting { get; set; }
  5309. [RosValue("radius-mac-accounting")]
  5310. public Boolean? RadiusMacAccounting { get; set; }
  5311. // Whether to use Radius server MAC authentication or not
  5312. [RosValue("radius-mac-authentication")]
  5313. public Boolean? RadiusMacAuthentication { get; set; }
  5314. public enum RadiusMacCachingDisableEnum
  5315. {
  5316. [RosValue("disabled")]
  5317. Disabled,
  5318. }
  5319. public struct RadiusMacCachingType
  5320. {
  5321. private object value;
  5322. public RadiusMacCachingDisableEnum? RadiusMacCachingDisable
  5323. {
  5324. get { return value as RadiusMacCachingDisableEnum?; }
  5325. set { this.value = value; }
  5326. }
  5327. public static implicit operator RadiusMacCachingType(RadiusMacCachingDisableEnum? value)
  5328. {
  5329. return new RadiusMacCachingType() { value = value };
  5330. }public TimeSpan? RadiusMacCachingTime
  5331. {
  5332. get { return value as TimeSpan?; }
  5333. set { this.value = value; }
  5334. }
  5335. public static implicit operator RadiusMacCachingType(TimeSpan? value)
  5336. {
  5337. return new RadiusMacCachingType() { value = value };
  5338. }
  5339. public static RadiusMacCachingType Parse(string str, Connection conn)
  5340. {
  5341. try { return new RadiusMacCachingType() { value = TypeFormatter.ConvertFromString<RadiusMacCachingDisableEnum>(str, conn) }; }
  5342. catch(Exception) { }
  5343. try { return new RadiusMacCachingType() { value = TypeFormatter.ConvertFromString<TimeSpan>(str, conn) }; }
  5344. catch(Exception) { }
  5345. throw new NotSupportedException();
  5346. }
  5347. public override string ToString() { return value != null ? value.ToString() : null; }
  5348. }
  5349. [RosValue("radius-mac-caching")]
  5350. public RadiusMacCachingType? RadiusMacCaching { get; set; }
  5351. [RosValue("radius-mac-format")]
  5352. public String RadiusMacFormat { get; set; }
  5353. public enum RadiusMacModeEnum
  5354. {
  5355. [RosValue("as-username")]
  5356. AsUsername,
  5357. [RosValue("as-username-and-password")]
  5358. AsUsernameAndPassword,
  5359. }
  5360. [RosValue("radius-mac-mode")]
  5361. public RadiusMacModeEnum? RadiusMacMode { get; set; }
  5362. public enum StaticAlgo0Enum
  5363. {
  5364. [RosValue("104bit-wep")]
  5365. E104bitWep,
  5366. [RosValue("40bit-wep")]
  5367. E40bitWep,
  5368. [RosValue("aes-ccm")]
  5369. AesCcm,
  5370. [RosValue("none")]
  5371. None,
  5372. [RosValue("tkip")]
  5373. Tkip,
  5374. }
  5375. // 1st encryption algorithm to use
  5376. [RosValue("static-algo-0")]
  5377. public StaticAlgo0Enum? StaticAlgo0 { get; set; }
  5378. public enum StaticAlgo1Enum
  5379. {
  5380. [RosValue("104bit-wep")]
  5381. E104bitWep,
  5382. [RosValue("40bit-wep")]
  5383. E40bitWep,
  5384. [RosValue("aes-ccm")]
  5385. AesCcm,
  5386. [RosValue("none")]
  5387. None,
  5388. [RosValue("tkip")]
  5389. Tkip,
  5390. }
  5391. // 2nd encryption algorithm to use
  5392. [RosValue("static-algo-1")]
  5393. public StaticAlgo1Enum? StaticAlgo1 { get; set; }
  5394. public enum StaticAlgo2Enum
  5395. {
  5396. [RosValue("104bit-wep")]
  5397. E104bitWep,
  5398. [RosValue("40bit-wep")]
  5399. E40bitWep,
  5400. [RosValue("aes-ccm")]
  5401. AesCcm,
  5402. [RosValue("none")]
  5403. None,
  5404. [RosValue("tkip")]
  5405. Tkip,
  5406. }
  5407. // 3rd encryption algorithm to use
  5408. [RosValue("static-algo-2")]
  5409. public StaticAlgo2Enum? StaticAlgo2 { get; set; }
  5410. public enum StaticAlgo3Enum
  5411. {
  5412. [RosValue("104bit-wep")]
  5413. E104bitWep,
  5414. [RosValue("40bit-wep")]
  5415. E40bitWep,
  5416. [RosValue("aes-ccm")]
  5417. AesCcm,
  5418. [RosValue("none")]
  5419. None,
  5420. [RosValue("tkip")]
  5421. Tkip,
  5422. }
  5423. // 4th encryption algorithm to use
  5424. [RosValue("static-algo-3")]
  5425. public StaticAlgo3Enum? StaticAlgo3 { get; set; }
  5426. // Hexadecimal key which will be used to encrypt packets with algo-0
  5427. [RosValue("static-key-0")]
  5428. public String StaticKey0 { get; set; }
  5429. // Hexadecimal key which will be used to encrypt packets with algo-1
  5430. [RosValue("static-key-1")]
  5431. public String StaticKey1 { get; set; }
  5432. // Hexadecimal key which will be used to encrypt packets with algo-2
  5433. [RosValue("static-key-2")]
  5434. public String StaticKey2 { get; set; }
  5435. // Hexadecimal key which will be used to encrypt packets with algo-3
  5436. [RosValue("static-key-3")]
  5437. public String StaticKey3 { get; set; }
  5438. public enum StaticStaPrivateAlgoEnum
  5439. {
  5440. [RosValue("104bit-wep")]
  5441. E104bitWep,
  5442. [RosValue("40bit-wep")]
  5443. E40bitWep,
  5444. [RosValue("aes-ccm")]
  5445. AesCcm,
  5446. [RosValue("none")]
  5447. None,
  5448. [RosValue("tkip")]
  5449. Tkip,
  5450. }
  5451. // Algorithm to use if the sta-private-key is set
  5452. [RosValue("static-sta-private-algo")]
  5453. public StaticStaPrivateAlgoEnum? StaticStaPrivateAlgo { get; set; }
  5454. // Private encryption key for the station
  5455. [RosValue("static-sta-private-key")]
  5456. public String StaticStaPrivateKey { get; set; }
  5457. public enum StaticTransmitKeyEnum
  5458. {
  5459. [RosValue("key-0")]
  5460. Key0,
  5461. [RosValue("key-1")]
  5462. Key1,
  5463. [RosValue("key-2")]
  5464. Key2,
  5465. [RosValue("key-3")]
  5466. Key3,
  5467. }
  5468. // Key to use for broadcast packets
  5469. [RosValue("static-transmit-key")]
  5470. public StaticTransmitKeyEnum? StaticTransmitKey { get; set; }
  5471. [RosValue("supplicant-identity")]
  5472. public String SupplicantIdentity { get; set; }
  5473. [RosValue("tls-certificate")]
  5474. public String TlsCertificate { get; set; }
  5475. public enum TlsModeEnum
  5476. {
  5477. [RosValue("dont-verify-certificate")]
  5478. DontVerifyCertificate,
  5479. [RosValue("no-certificates")]
  5480. NoCertificates,
  5481. [RosValue("verify-certificate")]
  5482. VerifyCertificate,
  5483. }
  5484. [RosValue("tls-mode")]
  5485. public TlsModeEnum? TlsMode { get; set; }
  5486. [RosValue("unicast-ciphers")]
  5487. public String UnicastCiphers { get; set; }
  5488. [RosValue("wpa-pre-shared-key")]
  5489. public String WpaPreSharedKey { get; set; }
  5490. [RosValue("wpa2-pre-shared-key")]
  5491. public String Wpa2PreSharedKey { get; set; }
  5492. public static InterfaceWirelessSecurityProfiles DefaultSecurityProfiles
  5493. {
  5494. get { return new InterfaceWirelessSecurityProfiles() { Id = 0 }; }
  5495. }
  5496. public static InterfaceWirelessSecurityProfiles Parse(string str, Connection conn)
  5497. {
  5498. if(string.IsNullOrEmpty(str))
  5499. return null;
  5500. InterfaceWirelessSecurityProfiles obj = new InterfaceWirelessSecurityProfiles();
  5501. obj.FindByName(conn, str);
  5502. return obj;
  5503. }
  5504. public override string ToString() { return Name.ToString(); }
  5505. }
  5506. [RosObject("interface wireless sniffer", CanSet=true, CanGet=true)]
  5507. public class InterfaceWirelessSniffer : RosValueObject
  5508. {
  5509. // How long to sniff each channel, if multiple-channels is set to yes
  5510. [RosValue("channel-time")]
  5511. public TimeSpan? ChannelTime { get; set; }
  5512. // Limits file-name's file size in KB
  5513. [RosValue("file-limit")]
  5514. public Int32? FileLimit { get; set; }
  5515. // Name of the file where to save packets in PCAP format
  5516. [RosValue("file-name")]
  5517. public String FileName { get; set; }
  5518. // How much memory to use for sniffed packets in KB
  5519. [RosValue("memory-limit")]
  5520. public Int32? MemoryLimit { get; set; }
  5521. // Whether to sniff multiple channels or a single channel
  5522. [RosValue("multiple-channels")]
  5523. public Boolean? MultipleChannels { get; set; }
  5524. // Sniff only wireless packet heders
  5525. [RosValue("only-headers")]
  5526. public Boolean? OnlyHeaders { get; set; }
  5527. // Whether to receive packets with CRC errors
  5528. [RosValue("receive-errors")]
  5529. public Boolean? ReceiveErrors { get; set; }
  5530. // Whether to send packets to server in TZSP format
  5531. [RosValue("streaming-enabled")]
  5532. public Boolean? StreamingEnabled { get; set; }
  5533. // How many packets per second the router will accept
  5534. [RosValue("streaming-max-rate")]
  5535. public Int32? StreamingMaxRate { get; set; }
  5536. // Streaming server's IP address
  5537. [RosValue("streaming-server")]
  5538. public IPAddress StreamingServer { get; set; }
  5539. }
  5540. [RosObject("interface wireless sniffer packet", CanGet=true)]
  5541. public class InterfaceWirelessSnifferPacket : RosItemObject<InterfaceWirelessSnifferPacket>
  5542. {
  5543. public enum BandType
  5544. {
  5545. [RosValue("2ghz-10mhz")]
  5546. E2ghz10mhz,
  5547. [RosValue("2ghz-40mhz")]
  5548. E2ghz40mhz,
  5549. [RosValue("2ghz-5mhz")]
  5550. E2ghz5mhz,
  5551. [RosValue("2ghz-b")]
  5552. E2ghzB,
  5553. [RosValue("2ghz-g")]
  5554. E2ghzG,
  5555. [RosValue("2ghz-n")]
  5556. E2ghzN,
  5557. [RosValue("2ghz-n-10mhz")]
  5558. E2ghzN10mhz,
  5559. [RosValue("2ghz-n-5mhz")]
  5560. E2ghzN5mhz,
  5561. [RosValue("5ghz-10mhz")]
  5562. E5ghz10mhz,
  5563. [RosValue("5ghz-40mhz")]
  5564. E5ghz40mhz,
  5565. [RosValue("5ghz-5mhz")]
  5566. E5ghz5mhz,
  5567. [RosValue("5ghz-a")]
  5568. E5ghzA,
  5569. [RosValue("5ghz-n")]
  5570. E5ghzN,
  5571. [RosValue("5ghz-n-10mhz")]
  5572. E5ghzN10mhz,
  5573. [RosValue("5ghz-n-5mhz")]
  5574. E5ghzN5mhz,
  5575. }
  5576. [RosValue("band", IsDynamic=true)]
  5577. public BandType? Band { get; set; }
  5578. [RosValue("crc-error", IsDynamic=true)]
  5579. public String CrcError { get; set; }
  5580. [RosValue("dst", IsDynamic=true)]
  5581. public MACAddress? Dst { get; set; }
  5582. [RosValue("freq", IsDynamic=true)]
  5583. public Int32? Freq { get; set; }
  5584. [RosValue("interface", IsDynamic=true)]
  5585. public RouterOS.Interface Interface { get; set; }
  5586. [RosValue("signal-at-rate", IsDynamic=true)]
  5587. public String SignalAtRate { get; set; }
  5588. [RosValue("src", IsDynamic=true)]
  5589. public MACAddress? Src { get; set; }
  5590. [RosValue("time", IsDynamic=true)]
  5591. public Single? Time { get; set; }
  5592. public enum TypeType
  5593. {
  5594. [RosValue("ack")]
  5595. Ack,
  5596. [RosValue("assoc-req")]
  5597. AssocReq,
  5598. [RosValue("assoc-resp")]
  5599. AssocResp,
  5600. [RosValue("atim")]
  5601. Atim,
  5602. [RosValue("auth")]
  5603. Auth,
  5604. [RosValue("beacon")]
  5605. Beacon,
  5606. [RosValue("cf-end")]
  5607. CfEnd,
  5608. [RosValue("cf-endack")]
  5609. CfEndack,
  5610. [RosValue("cts")]
  5611. Cts,
  5612. [RosValue("d-cfack")]
  5613. DCfack,
  5614. [RosValue("d-cfackpoll")]
  5615. DCfackpoll,
  5616. [RosValue("d-cfpoll")]
  5617. DCfpoll,
  5618. [RosValue("data")]
  5619. Data,
  5620. [RosValue("data-null")]
  5621. DataNull,
  5622. [RosValue("deauth")]
  5623. Deauth,
  5624. [RosValue("disassoc")]
  5625. Disassoc,
  5626. [RosValue("nd-cfack")]
  5627. NdCfack,
  5628. [RosValue("nd-cfackpoll")]
  5629. NdCfackpoll,
  5630. [RosValue("nd-cfpoll")]
  5631. NdCfpoll,
  5632. [RosValue("probe-req")]
  5633. ProbeReq,
  5634. [RosValue("probe-resp")]
  5635. ProbeResp,
  5636. [RosValue("ps-poll")]
  5637. PsPoll,
  5638. [RosValue("reassoc-req")]
  5639. ReassocReq,
  5640. [RosValue("reassoc-resp")]
  5641. ReassocResp,
  5642. [RosValue("rts")]
  5643. Rts,
  5644. }
  5645. [RosValue("type", IsDynamic=true)]
  5646. public TypeType? Type { get; set; }
  5647. }
  5648. [RosObject("interface wireless snooper", CanSet=true, CanGet=true)]
  5649. public class InterfaceWirelessSnooper : RosValueObject
  5650. {
  5651. // How long to snoop each channel, if multiple-channels is set to 'yes'
  5652. [RosValue("channel-time")]
  5653. public TimeSpan? ChannelTime { get; set; }
  5654. // Whether to snoop multiple channels or a single channel
  5655. [RosValue("multiple-channels")]
  5656. public Boolean? MultipleChannels { get; set; }
  5657. // Whether to receive packets with CRC errors
  5658. [RosValue("receive-errors")]
  5659. public Boolean? ReceiveErrors { get; set; }
  5660. }
  5661. [RosObject("interface wireless wds", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  5662. public class InterfaceWirelessWds : RosItemObject<InterfaceWirelessWds>
  5663. {
  5664. public enum ArpEnum
  5665. {
  5666. [RosValue("disabled")]
  5667. Disabled,
  5668. [RosValue("enabled")]
  5669. Enabled,
  5670. [RosValue("proxy-arp")]
  5671. ProxyArp,
  5672. [RosValue("reply-only")]
  5673. ReplyOnly,
  5674. }
  5675. // Address Resolution Protocol
  5676. [RosValue("arp")]
  5677. public ArpEnum? Arp { get; set; }
  5678. // Short description of the item
  5679. [RosValue("comment")]
  5680. public String Comment { get; set; }
  5681. [RosValue("disable-running-check")]
  5682. public Boolean? DisableRunningCheck { get; set; }
  5683. // Defines whether item is ignored or used
  5684. [RosValue("disabled")]
  5685. public Boolean? Disabled { get; set; }
  5686. [RosValue("l2mtu")]
  5687. public UInt16? L2mtu { get; set; }
  5688. // Wireless interface which will be used by WDS
  5689. [RosValue("master-interface")]
  5690. public RouterOS.Interface MasterInterface { get; set; }
  5691. // Maximum Transmit Unit
  5692. [RosValue("mtu")]
  5693. public Int32? Mtu { get; set; }
  5694. // Interface name
  5695. [RosValue("name")]
  5696. public String Name { get; set; }
  5697. // MAC address of the remote WDS host
  5698. [RosValue("wds-address")]
  5699. public MACAddress? WdsAddress { get; set; }
  5700. [RosValue("dynamic", IsDynamic=true)]
  5701. public String Dynamic { get; set; }
  5702. [RosValue("mac-address", IsDynamic=true)]
  5703. public MACAddress? MacAddress { get; set; }
  5704. [RosValue("running", IsDynamic=true)]
  5705. public String Running { get; set; }
  5706. public static InterfaceWirelessWds Parse(string str, Connection conn)
  5707. {
  5708. if(string.IsNullOrEmpty(str))
  5709. return null;
  5710. InterfaceWirelessWds obj = new InterfaceWirelessWds();
  5711. obj.FindByName(conn, str);
  5712. return obj;
  5713. }
  5714. public override string ToString() { return Name.ToString(); }
  5715. }
  5716. [RosObject("ip accounting", CanSet=true, CanGet=true)]
  5717. public class IpAccounting : RosValueObject
  5718. {
  5719. [RosValue("account-local-traffic")]
  5720. public Boolean? AccountLocalTraffic { get; set; }
  5721. // Defines whether the accounting is enabled or not
  5722. [RosValue("enabled")]
  5723. public Boolean? Enabled { get; set; }
  5724. // maximum number of IP pairs for the traffic accounting table
  5725. [RosValue("threshold")]
  5726. public Int32? Threshold { get; set; }
  5727. }
  5728. [RosObject("ip accounting snapshot", CanGet=true)]
  5729. public class IpAccountingSnapshot : RosItemObject<IpAccountingSnapshot>
  5730. {
  5731. [RosValue("bytes", IsDynamic=true)]
  5732. public Int32? Bytes { get; set; }
  5733. [RosValue("dst-address", IsDynamic=true)]
  5734. public IPAddress DstAddress { get; set; }
  5735. [RosValue("dst-user", IsDynamic=true)]
  5736. public String DstUser { get; set; }
  5737. [RosValue("packets", IsDynamic=true)]
  5738. public Int32? Packets { get; set; }
  5739. [RosValue("src-address", IsDynamic=true)]
  5740. public IPAddress SrcAddress { get; set; }
  5741. [RosValue("src-user", IsDynamic=true)]
  5742. public String SrcUser { get; set; }
  5743. }
  5744. [RosObject("ip accounting web-access", CanSet=true, CanGet=true)]
  5745. public class IpAccountingWebAccess : RosValueObject
  5746. {
  5747. // If yes, the router can be accessed from web
  5748. [RosValue("accessible-via-web")]
  5749. public Boolean? AccessibleViaWeb { get; set; }
  5750. // Address from which the router can be accessed
  5751. [RosValue("address")]
  5752. public IPPrefix? Address { get; set; }
  5753. }
  5754. [RosObject("ip address", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  5755. public class IpAddress : RosItemObject<IpAddress>
  5756. {
  5757. // Local IP address
  5758. [RosValue("address")]
  5759. public String Address { get; set; }
  5760. // Broadcast address
  5761. [RosValue("broadcast")]
  5762. public IPAddress Broadcast { get; set; }
  5763. // Short description of the item
  5764. [RosValue("comment")]
  5765. public String Comment { get; set; }
  5766. // Defines whether item is ignored or used
  5767. [RosValue("disabled")]
  5768. public Boolean? Disabled { get; set; }
  5769. // Interface name
  5770. [RosValue("interface")]
  5771. public RouterOS.Interface Interface { get; set; }
  5772. // Network mask
  5773. [RosValue("netmask")]
  5774. public IPAddress Netmask { get; set; }
  5775. // Network prefix
  5776. [RosValue("network")]
  5777. public IPAddress Network { get; set; }
  5778. [RosValue("actual-interface", IsDynamic=true)]
  5779. public RouterOS.Interface ActualInterface { get; set; }
  5780. [RosValue("dynamic", IsDynamic=true)]
  5781. public String Dynamic { get; set; }
  5782. [RosValue("invalid", IsDynamic=true)]
  5783. public String Invalid { get; set; }
  5784. }
  5785. [RosObject("ip arp", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  5786. public class IpArp : RosItemObject<IpArp>
  5787. {
  5788. // IP address
  5789. [RosValue("address")]
  5790. public IPAddress Address { get; set; }
  5791. // Short description of the item
  5792. [RosValue("comment")]
  5793. public String Comment { get; set; }
  5794. // Defines whether item is ignored or used
  5795. [RosValue("disabled")]
  5796. public Boolean? Disabled { get; set; }
  5797. // Interface name
  5798. [RosValue("interface")]
  5799. public RouterOS.Interface Interface { get; set; }
  5800. // MAC address
  5801. [RosValue("mac-address")]
  5802. public MACAddress? MacAddress { get; set; }
  5803. [RosValue("dynamic", IsDynamic=true)]
  5804. public String Dynamic { get; set; }
  5805. [RosValue("invalid", IsDynamic=true)]
  5806. public String Invalid { get; set; }
  5807. }
  5808. [RosObject("ip dhcp-client", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true, CanUnset=true)]
  5809. public class IpDhcpClient : RosItemObject<IpDhcpClient>
  5810. {
  5811. // Defines whether to add the default route to the gateway specified by DHCP server
  5812. [RosValue("add-default-route")]
  5813. public Boolean? AddDefaultRoute { get; set; }
  5814. // Client identifier (optional)
  5815. [RosValue("client-id")]
  5816. public String ClientId { get; set; }
  5817. // Short description of the item
  5818. [RosValue("comment")]
  5819. public String Comment { get; set; }
  5820. [RosValue("default-route-distance", CanUnset=true)]
  5821. public Int32? DefaultRouteDistance { get; set; }
  5822. // Defines whether item is ignored or used
  5823. [RosValue("disabled")]
  5824. public Boolean? Disabled { get; set; }
  5825. // Client host name (optional)
  5826. [RosValue("host-name")]
  5827. public String HostName { get; set; }
  5828. // Interface name
  5829. [RosValue("interface")]
  5830. public RouterOS.Interface Interface { get; set; }
  5831. // Whether to accept the DNS settings advertized by DHCP server
  5832. [RosValue("use-peer-dns")]
  5833. public Boolean? UsePeerDns { get; set; }
  5834. // Whether to accept the NTP settings advertized by DHCP server
  5835. [RosValue("use-peer-ntp")]
  5836. public Boolean? UsePeerNtp { get; set; }
  5837. [RosValue("address", IsDynamic=true)]
  5838. public IPAddress Address { get; set; }
  5839. [RosValue("dhcp-server", IsDynamic=true)]
  5840. public IPAddress DhcpServer { get; set; }
  5841. [RosValue("expires-after", IsDynamic=true)]
  5842. public TimeSpan? ExpiresAfter { get; set; }
  5843. [RosValue("gateway", IsDynamic=true)]
  5844. public IPAddress Gateway { get; set; }
  5845. [RosValue("invalid", IsDynamic=true)]
  5846. public String Invalid { get; set; }
  5847. [RosValue("netmask", IsDynamic=true)]
  5848. public IPAddress Netmask { get; set; }
  5849. [RosValue("primary-dns", IsDynamic=true)]
  5850. public IPAddress PrimaryDns { get; set; }
  5851. [RosValue("primary-ntp", IsDynamic=true)]
  5852. public IPAddress PrimaryNtp { get; set; }
  5853. [RosValue("secondary-dns", IsDynamic=true)]
  5854. public IPAddress SecondaryDns { get; set; }
  5855. [RosValue("secondary-ntp", IsDynamic=true)]
  5856. public IPAddress SecondaryNtp { get; set; }
  5857. public enum StatusType
  5858. {
  5859. [RosValue("bound")]
  5860. Bound,
  5861. [RosValue("error")]
  5862. Error,
  5863. [RosValue("stopped")]
  5864. Stopped,
  5865. }
  5866. [RosValue("status", IsDynamic=true)]
  5867. public StatusType? Status { get; set; }
  5868. }
  5869. [RosObject("ip dhcp-relay", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  5870. public class IpDhcpRelay : RosItemObject<IpDhcpRelay>
  5871. {
  5872. public enum ConstEnum
  5873. {
  5874. [RosValue("none")]
  5875. None,
  5876. }
  5877. public struct DelayThresholdType
  5878. {
  5879. private object value;
  5880. public ConstEnum? Const
  5881. {
  5882. get { return value as ConstEnum?; }
  5883. set { this.value = value; }
  5884. }
  5885. public static implicit operator DelayThresholdType(ConstEnum? value)
  5886. {
  5887. return new DelayThresholdType() { value = value };
  5888. }public TimeSpan? Time
  5889. {
  5890. get { return value as TimeSpan?; }
  5891. set { this.value = value; }
  5892. }
  5893. public static implicit operator DelayThresholdType(TimeSpan? value)
  5894. {
  5895. return new DelayThresholdType() { value = value };
  5896. }
  5897. public static DelayThresholdType Parse(string str, Connection conn)
  5898. {
  5899. try { return new DelayThresholdType() { value = TypeFormatter.ConvertFromString<ConstEnum>(str, conn) }; }
  5900. catch(Exception) { }
  5901. try { return new DelayThresholdType() { value = TypeFormatter.ConvertFromString<TimeSpan>(str, conn) }; }
  5902. catch(Exception) { }
  5903. throw new NotSupportedException();
  5904. }
  5905. public override string ToString() { return value != null ? value.ToString() : null; }
  5906. }
  5907. // If secs field in DHCP packet is smaller than delay-threshold, then this packet is ignored
  5908. [RosValue("delay-threshold")]
  5909. public DelayThresholdType? DelayThreshold { get; set; }
  5910. // List of DHCP servers
  5911. [RosValue("dhcp-server")]
  5912. public IPAddress[] DhcpServer { get; set; }
  5913. // Defines whether item is ignored or used
  5914. [RosValue("disabled")]
  5915. public Boolean? Disabled { get; set; }
  5916. // Interface
  5917. [RosValue("interface")]
  5918. public RouterOS.Interface Interface { get; set; }
  5919. // Local address for relay identification
  5920. [RosValue("local-address")]
  5921. public IPAddress LocalAddress { get; set; }
  5922. // Name of DHCP relay
  5923. [RosValue("name")]
  5924. public String Name { get; set; }
  5925. [RosValue("invalid", IsDynamic=true)]
  5926. public String Invalid { get; set; }
  5927. public static IpDhcpRelay Parse(string str, Connection conn)
  5928. {
  5929. if(string.IsNullOrEmpty(str))
  5930. return null;
  5931. IpDhcpRelay obj = new IpDhcpRelay();
  5932. obj.FindByName(conn, str);
  5933. return obj;
  5934. }
  5935. public override string ToString() { return Name.ToString(); }
  5936. }
  5937. [RosObject("ip dhcp-server", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  5938. public class IpDhcpServer : RosItemObject<IpDhcpServer>
  5939. {
  5940. // Defines whether to add dynamic ARP entry
  5941. [RosValue("add-arp")]
  5942. public Boolean? AddArp { get; set; }
  5943. // IP address pool
  5944. [RosValue("address-pool")]
  5945. public String AddressPool { get; set; }
  5946. // Send all replies as broadcast
  5947. [RosValue("always-broadcast")]
  5948. public Boolean? AlwaysBroadcast { get; set; }
  5949. public enum AuthoritativeEnum
  5950. {
  5951. [RosValue("after-10sec-delay")]
  5952. After10secDelay,
  5953. [RosValue("after-2sec-delay")]
  5954. After2secDelay,
  5955. [RosValue("no")]
  5956. No,
  5957. [RosValue("yes")]
  5958. Yes,
  5959. }
  5960. // This is the only DHCP server for the network
  5961. [RosValue("authoritative")]
  5962. public AuthoritativeEnum? Authoritative { get; set; }
  5963. public enum EnumEnum
  5964. {
  5965. [RosValue("forever")]
  5966. Forever,
  5967. [RosValue("lease-time")]
  5968. LeaseTime,
  5969. }
  5970. public struct BootpLeaseTimeType
  5971. {
  5972. private object value;
  5973. public EnumEnum? Enum
  5974. {
  5975. get { return value as EnumEnum?; }
  5976. set { this.value = value; }
  5977. }
  5978. public static implicit operator BootpLeaseTimeType(EnumEnum? value)
  5979. {
  5980. return new BootpLeaseTimeType() { value = value };
  5981. }public TimeSpan? Time
  5982. {
  5983. get { return value as TimeSpan?; }
  5984. set { this.value = value; }
  5985. }
  5986. public static implicit operator BootpLeaseTimeType(TimeSpan? value)
  5987. {
  5988. return new BootpLeaseTimeType() { value = value };
  5989. }
  5990. public static BootpLeaseTimeType Parse(string str, Connection conn)
  5991. {
  5992. try { return new BootpLeaseTimeType() { value = TypeFormatter.ConvertFromString<EnumEnum>(str, conn) }; }
  5993. catch(Exception) { }
  5994. try { return new BootpLeaseTimeType() { value = TypeFormatter.ConvertFromString<TimeSpan>(str, conn) }; }
  5995. catch(Exception) { }
  5996. throw new NotSupportedException();
  5997. }
  5998. public override string ToString() { return value != null ? value.ToString() : null; }
  5999. }
  6000. [RosValue("bootp-lease-time")]
  6001. public BootpLeaseTimeType? BootpLeaseTime { get; set; }
  6002. public enum BootpSupportEnum
  6003. {
  6004. [RosValue("dynamic")]
  6005. Dynamic,
  6006. [RosValue("none")]
  6007. None,
  6008. [RosValue("static")]
  6009. Static,
  6010. }
  6011. // Support for BOOTP clients
  6012. [RosValue("bootp-support")]
  6013. public BootpSupportEnum? BootpSupport { get; set; }
  6014. public struct DelayThresholdType
  6015. {
  6016. private object value;
  6017. public EnumEnum? Enum
  6018. {
  6019. get { return value as EnumEnum?; }
  6020. set { this.value = value; }
  6021. }
  6022. public static implicit operator DelayThresholdType(EnumEnum? value)
  6023. {
  6024. return new DelayThresholdType() { value = value };
  6025. }public TimeSpan? Time
  6026. {
  6027. get { return value as TimeSpan?; }
  6028. set { this.value = value; }
  6029. }
  6030. public static implicit operator DelayThresholdType(TimeSpan? value)
  6031. {
  6032. return new DelayThresholdType() { value = value };
  6033. }
  6034. public static DelayThresholdType Parse(string str, Connection conn)
  6035. {
  6036. try { return new DelayThresholdType() { value = TypeFormatter.ConvertFromString<EnumEnum>(str, conn) }; }
  6037. catch(Exception) { }
  6038. try { return new DelayThresholdType() { value = TypeFormatter.ConvertFromString<TimeSpan>(str, conn) }; }
  6039. catch(Exception) { }
  6040. throw new NotSupportedException();
  6041. }
  6042. public override string ToString() { return value != null ? value.ToString() : null; }
  6043. }
  6044. // If secs field in DHCP packet is smaller than delay-threshold, then this packet is ignored
  6045. [RosValue("delay-threshold")]
  6046. public DelayThresholdType? DelayThreshold { get; set; }
  6047. // Defines whether item is ignored or used
  6048. [RosValue("disabled")]
  6049. public Boolean? Disabled { get; set; }
  6050. // Interface
  6051. [RosValue("interface")]
  6052. public RouterOS.Interface Interface { get; set; }
  6053. // Lease time
  6054. [RosValue("lease-time")]
  6055. public TimeSpan? LeaseTime { get; set; }
  6056. // Name of DHCP server
  6057. [RosValue("name")]
  6058. public String Name { get; set; }
  6059. // DHCP relay address
  6060. [RosValue("relay")]
  6061. public IPAddress Relay { get; set; }
  6062. // Source address
  6063. [RosValue("src-address")]
  6064. public IPAddress SrcAddress { get; set; }
  6065. // Use RADIUS server for authentication
  6066. [RosValue("use-radius")]
  6067. public Boolean? UseRadius { get; set; }
  6068. [RosValue("invalid", IsDynamic=true)]
  6069. public String Invalid { get; set; }
  6070. public static IpDhcpServer Parse(string str, Connection conn)
  6071. {
  6072. if(string.IsNullOrEmpty(str))
  6073. return null;
  6074. IpDhcpServer obj = new IpDhcpServer();
  6075. obj.FindByName(conn, str);
  6076. return obj;
  6077. }
  6078. public override string ToString() { return Name.ToString(); }
  6079. }
  6080. [RosObject("ip dhcp-server alert", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  6081. public class IpDhcpServerAlert : RosItemObject<IpDhcpServerAlert>
  6082. {
  6083. public enum SymbolicNamesEnum
  6084. {
  6085. [RosValue("none")]
  6086. None,
  6087. }
  6088. public struct AlertTimeoutType
  6089. {
  6090. private object value;
  6091. public SymbolicNamesEnum? SymbolicNames
  6092. {
  6093. get { return value as SymbolicNamesEnum?; }
  6094. set { this.value = value; }
  6095. }
  6096. public static implicit operator AlertTimeoutType(SymbolicNamesEnum? value)
  6097. {
  6098. return new AlertTimeoutType() { value = value };
  6099. }public TimeSpan? TimeInterval
  6100. {
  6101. get { return value as TimeSpan?; }
  6102. set { this.value = value; }
  6103. }
  6104. public static implicit operator AlertTimeoutType(TimeSpan? value)
  6105. {
  6106. return new AlertTimeoutType() { value = value };
  6107. }
  6108. public static AlertTimeoutType Parse(string str, Connection conn)
  6109. {
  6110. try { return new AlertTimeoutType() { value = TypeFormatter.ConvertFromString<SymbolicNamesEnum>(str, conn) }; }
  6111. catch(Exception) { }
  6112. try { return new AlertTimeoutType() { value = TypeFormatter.ConvertFromString<TimeSpan>(str, conn) }; }
  6113. catch(Exception) { }
  6114. throw new NotSupportedException();
  6115. }
  6116. public override string ToString() { return value != null ? value.ToString() : null; }
  6117. }
  6118. // Time, after which alert will be forgotten
  6119. [RosValue("alert-timeout")]
  6120. public AlertTimeoutType? AlertTimeout { get; set; }
  6121. // Short description of the item
  6122. [RosValue("comment")]
  6123. public String Comment { get; set; }
  6124. // Defines whether item is ignored or used
  6125. [RosValue("disabled")]
  6126. public Boolean? Disabled { get; set; }
  6127. // Interface, on which to run rogue DHCP server finder
  6128. [RosValue("interface")]
  6129. public RouterOS.Interface Interface { get; set; }
  6130. // Script to run, when an unknown DHCP server is detected
  6131. [RosValue("on-alert")]
  6132. public String OnAlert { get; set; }
  6133. // List of MAC addresses of valid DHCP servers
  6134. [RosValue("valid-server")]
  6135. public MACAddress[] ValidServer { get; set; }
  6136. [RosValue("invalid", IsDynamic=true)]
  6137. public String Invalid { get; set; }
  6138. [RosValue("unknown-server", IsDynamic=true)]
  6139. public MACAddress? UnknownServer { get; set; }
  6140. }
  6141. [RosObject("ip dhcp-server config", CanSet=true, CanGet=true)]
  6142. public class IpDhcpServerConfig : RosValueObject
  6143. {
  6144. public enum SymbolicNamesEnum
  6145. {
  6146. [RosValue("immediately")]
  6147. Immediately,
  6148. [RosValue("never")]
  6149. Never,
  6150. }
  6151. public struct StoreLeasesDiskType
  6152. {
  6153. private object value;
  6154. public SymbolicNamesEnum? SymbolicNames
  6155. {
  6156. get { return value as SymbolicNamesEnum?; }
  6157. set { this.value = value; }
  6158. }
  6159. public static implicit operator StoreLeasesDiskType(SymbolicNamesEnum? value)
  6160. {
  6161. return new StoreLeasesDiskType() { value = value };
  6162. }public TimeSpan? TimeInterval
  6163. {
  6164. get { return value as TimeSpan?; }
  6165. set { this.value = value; }
  6166. }
  6167. public static implicit operator StoreLeasesDiskType(TimeSpan? value)
  6168. {
  6169. return new StoreLeasesDiskType() { value = value };
  6170. }
  6171. public static StoreLeasesDiskType Parse(string str, Connection conn)
  6172. {
  6173. try { return new StoreLeasesDiskType() { value = TypeFormatter.ConvertFromString<SymbolicNamesEnum>(str, conn) }; }
  6174. catch(Exception) { }
  6175. try { return new StoreLeasesDiskType() { value = TypeFormatter.ConvertFromString<TimeSpan>(str, conn) }; }
  6176. catch(Exception) { }
  6177. throw new NotSupportedException();
  6178. }
  6179. public override string ToString() { return value != null ? value.ToString() : null; }
  6180. }
  6181. // How frequently leases should be stored on disk
  6182. [RosValue("store-leases-disk")]
  6183. public StoreLeasesDiskType? StoreLeasesDisk { get; set; }
  6184. }
  6185. [RosObject("ip dhcp-server lease", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  6186. public class IpDhcpServerLease : RosItemObject<IpDhcpServerLease>
  6187. {
  6188. // Assigns an individual address to the client
  6189. [RosValue("address")]
  6190. public String Address { get; set; }
  6191. [RosValue("address-list")]
  6192. public String AddressList { get; set; }
  6193. // Send all replies as broadcast
  6194. [RosValue("always-broadcast")]
  6195. public Boolean? AlwaysBroadcast { get; set; }
  6196. // Block access for this client
  6197. [RosValue("block-access")]
  6198. public Boolean? BlockAccess { get; set; }
  6199. // Client identifier
  6200. [RosValue("client-id")]
  6201. public String ClientId { get; set; }
  6202. // Short description of the item
  6203. [RosValue("comment")]
  6204. public String Comment { get; set; }
  6205. // Defines whether item is ignored or used
  6206. [RosValue("disabled")]
  6207. public Boolean? Disabled { get; set; }
  6208. // Lease time
  6209. [RosValue("lease-time")]
  6210. public TimeSpan? LeaseTime { get; set; }
  6211. // MAC address
  6212. [RosValue("mac-address")]
  6213. public MACAddress? MacAddress { get; set; }
  6214. // Bit rate limit for the client
  6215. [RosValue("rate-limit")]
  6216. public String RateLimit { get; set; }
  6217. public enum ServerEnum
  6218. {
  6219. [RosValue("all")]
  6220. All,
  6221. }
  6222. public struct ServerType
  6223. {
  6224. private object value;
  6225. public ServerEnum? Server
  6226. {
  6227. get { return value as ServerEnum?; }
  6228. set { this.value = value; }
  6229. }
  6230. public static implicit operator ServerType(ServerEnum? value)
  6231. {
  6232. return new ServerType() { value = value };
  6233. }public RouterOS.IpDhcpServer E7
  6234. {
  6235. get { return value as RouterOS.IpDhcpServer; }
  6236. set { this.value = value; }
  6237. }
  6238. public static implicit operator ServerType(RouterOS.IpDhcpServer value)
  6239. {
  6240. return new ServerType() { value = value };
  6241. }
  6242. public static ServerType Parse(string str, Connection conn)
  6243. {
  6244. try { return new ServerType() { value = TypeFormatter.ConvertFromString<ServerEnum>(str, conn) }; }
  6245. catch(Exception) { }
  6246. try { return new ServerType() { value = TypeFormatter.ConvertFromString<RouterOS.IpDhcpServer>(str, conn) }; }
  6247. catch(Exception) { }
  6248. throw new NotSupportedException();
  6249. }
  6250. public override string ToString() { return value != null ? value.ToString() : null; }
  6251. }
  6252. // Server name which serves this client
  6253. [RosValue("server")]
  6254. public ServerType? Server { get; set; }
  6255. // Use source mac address instead
  6256. [RosValue("use-src-mac")]
  6257. public Boolean? UseSrcMac { get; set; }
  6258. [RosValue("active-address", IsDynamic=true)]
  6259. public IPAddress ActiveAddress { get; set; }
  6260. [RosValue("active-client-id", IsDynamic=true)]
  6261. public String ActiveClientId { get; set; }
  6262. [RosValue("active-mac-address", IsDynamic=true)]
  6263. public MACAddress? ActiveMacAddress { get; set; }
  6264. [RosValue("active-server", IsDynamic=true)]
  6265. public RouterOS.IpDhcpServer ActiveServer { get; set; }
  6266. [RosValue("agent-circuit-id", IsDynamic=true)]
  6267. public String AgentCircuitId { get; set; }
  6268. [RosValue("agent-remote-id", IsDynamic=true)]
  6269. public String AgentRemoteId { get; set; }
  6270. [RosValue("blocked", IsDynamic=true)]
  6271. public String Blocked { get; set; }
  6272. [RosValue("dynamic", IsDynamic=true)]
  6273. public String Dynamic { get; set; }
  6274. [RosValue("expires-after", IsDynamic=true)]
  6275. public TimeSpan? ExpiresAfter { get; set; }
  6276. [RosValue("host-name", IsDynamic=true)]
  6277. public String HostName { get; set; }
  6278. [RosValue("last-seen", IsDynamic=true)]
  6279. public TimeSpan? LastSeen { get; set; }
  6280. [RosValue("radius", IsDynamic=true)]
  6281. public String Radius { get; set; }
  6282. [RosValue("src-mac-address", IsDynamic=true)]
  6283. public MACAddress? SrcMacAddress { get; set; }
  6284. public enum StatusType
  6285. {
  6286. [RosValue("authorizing")]
  6287. Authorizing,
  6288. [RosValue("bound")]
  6289. Bound,
  6290. [RosValue("busy")]
  6291. Busy,
  6292. [RosValue("offered")]
  6293. Offered,
  6294. [RosValue("testing")]
  6295. Testing,
  6296. [RosValue("waiting")]
  6297. Waiting,
  6298. }
  6299. [RosValue("status", IsDynamic=true)]
  6300. public StatusType? Status { get; set; }
  6301. }
  6302. [RosObject("ip dhcp-server network", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  6303. public class IpDhcpServerNetwork : RosItemObject<IpDhcpServerNetwork>
  6304. {
  6305. // Network address
  6306. [RosValue("address")]
  6307. public String Address { get; set; }
  6308. // Boot file name
  6309. [RosValue("boot-file-name")]
  6310. public String BootFileName { get; set; }
  6311. // Short description of the item
  6312. [RosValue("comment")]
  6313. public String Comment { get; set; }
  6314. [RosValue("dhcp-option")]
  6315. public RouterOS.IpDhcpServerOption[] DhcpOption { get; set; }
  6316. // DNS server address
  6317. [RosValue("dns-server")]
  6318. public IPAddress[] DnsServer { get; set; }
  6319. // Domain name
  6320. [RosValue("domain")]
  6321. public String Domain { get; set; }
  6322. // Default gateway
  6323. [RosValue("gateway")]
  6324. public IPAddress[] Gateway { get; set; }
  6325. // Network mask to give out
  6326. [RosValue("netmask")]
  6327. public String Netmask { get; set; }
  6328. // IP address of next server to use in bootstrap
  6329. [RosValue("next-server")]
  6330. public IPAddress NextServer { get; set; }
  6331. // NTP server
  6332. [RosValue("ntp-server")]
  6333. public IPAddress[] NtpServer { get; set; }
  6334. // WINS server
  6335. [RosValue("wins-server")]
  6336. public IPAddress[] WinsServer { get; set; }
  6337. }
  6338. [RosObject("ip dhcp-server option", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  6339. public class IpDhcpServerOption : RosItemObject<IpDhcpServerOption>
  6340. {
  6341. // DHCP option code
  6342. [RosValue("code")]
  6343. public Int32? Code { get; set; }
  6344. // Descriptive name of the option
  6345. [RosValue("name")]
  6346. public String Name { get; set; }
  6347. // Parameter's value in form of a string
  6348. [RosValue("value")]
  6349. public String Value { get; set; }
  6350. public static IpDhcpServerOption Parse(string str, Connection conn)
  6351. {
  6352. if(string.IsNullOrEmpty(str))
  6353. return null;
  6354. IpDhcpServerOption obj = new IpDhcpServerOption();
  6355. obj.FindByName(conn, str);
  6356. return obj;
  6357. }
  6358. public override string ToString() { return Name.ToString(); }
  6359. }
  6360. [RosObject("ip dns", CanSet=true, CanGet=true)]
  6361. public class IpDns : RosValueObject
  6362. {
  6363. // Allow requests from network
  6364. [RosValue("allow-remote-requests")]
  6365. public Boolean? AllowRemoteRequests { get; set; }
  6366. // Specifies maximum time-to-live for cache records
  6367. [RosValue("cache-max-ttl")]
  6368. public TimeSpan? CacheMaxTtl { get; set; }
  6369. // DNS cache size in kB
  6370. [RosValue("cache-size")]
  6371. public String CacheSize { get; set; }
  6372. [RosValue("max-udp-packet-size")]
  6373. public Int32? MaxUdpPacketSize { get; set; }
  6374. public struct ServerType
  6375. {
  6376. private object value;
  6377. public IPAddress Ip
  6378. {
  6379. get { return value as IPAddress; }
  6380. set { this.value = value; }
  6381. }
  6382. public static implicit operator ServerType(IPAddress value)
  6383. {
  6384. return new ServerType() { value = value };
  6385. }public IPv6Address Ipv6
  6386. {
  6387. get { return value as IPv6Address; }
  6388. set { this.value = value; }
  6389. }
  6390. public static implicit operator ServerType(IPv6Address value)
  6391. {
  6392. return new ServerType() { value = value };
  6393. }
  6394. public static ServerType Parse(string str, Connection conn)
  6395. {
  6396. try { return new ServerType() { value = TypeFormatter.ConvertFromString<IPAddress>(str, conn) }; }
  6397. catch(Exception) { }
  6398. try { return new ServerType() { value = TypeFormatter.ConvertFromString<IPv6Address>(str, conn) }; }
  6399. catch(Exception) { }
  6400. throw new NotSupportedException();
  6401. }
  6402. public override string ToString() { return value != null ? value.ToString() : null; }
  6403. }
  6404. [RosValue("servers")]
  6405. public ServerType[] Servers { get; set; }
  6406. }
  6407. [RosObject("ip dns cache", CanSet=true, CanGet=true)]
  6408. public class IpDnsCache : RosItemObject<IpDnsCache>
  6409. {
  6410. public struct AddressType
  6411. {
  6412. private object value;
  6413. public IPAddress Ip
  6414. {
  6415. get { return value as IPAddress; }
  6416. set { this.value = value; }
  6417. }
  6418. public static implicit operator AddressType(IPAddress value)
  6419. {
  6420. return new AddressType() { value = value };
  6421. }public IPv6Address Ipv6
  6422. {
  6423. get { return value as IPv6Address; }
  6424. set { this.value = value; }
  6425. }
  6426. public static implicit operator AddressType(IPv6Address value)
  6427. {
  6428. return new AddressType() { value = value };
  6429. }
  6430. public static AddressType Parse(string str, Connection conn)
  6431. {
  6432. try { return new AddressType() { value = TypeFormatter.ConvertFromString<IPAddress>(str, conn) }; }
  6433. catch(Exception) { }
  6434. try { return new AddressType() { value = TypeFormatter.ConvertFromString<IPv6Address>(str, conn) }; }
  6435. catch(Exception) { }
  6436. throw new NotSupportedException();
  6437. }
  6438. public override string ToString() { return value != null ? value.ToString() : null; }
  6439. }
  6440. // IP address of DNS host
  6441. [RosValue("address")]
  6442. public AddressType? Address { get; set; }
  6443. // The name of DNS host
  6444. [RosValue("name")]
  6445. public String Name { get; set; }
  6446. // Time To Live
  6447. [RosValue("ttl")]
  6448. public TimeSpan? Ttl { get; set; }
  6449. [RosValue("static", IsDynamic=true)]
  6450. public String Static { get; set; }
  6451. public static IpDnsCache Parse(string str, Connection conn)
  6452. {
  6453. if(string.IsNullOrEmpty(str))
  6454. return null;
  6455. IpDnsCache obj = new IpDnsCache();
  6456. obj.FindByName(conn, str);
  6457. return obj;
  6458. }
  6459. public override string ToString() { return Name.ToString(); }
  6460. }
  6461. [RosObject("ip dns cache all", CanSet=true, CanGet=true)]
  6462. public class IpDnsCacheAll : RosItemObject<IpDnsCacheAll>
  6463. {
  6464. // The data which is in the specific resource record
  6465. [RosValue("data")]
  6466. public String Data { get; set; }
  6467. // Time value that specifies the upper limit on the time interval that can elapse before the zone is no longer authoritative
  6468. [RosValue("expire")]
  6469. public Int32? Expire { get; set; }
  6470. // Minimum TTL field that should be exported with any record from this zone
  6471. [RosValue("minimum")]
  6472. public Int32? Minimum { get; set; }
  6473. // The name of the DNS entry
  6474. [RosValue("name")]
  6475. public String Name { get; set; }
  6476. // Time interval before the zone should be refreshed
  6477. [RosValue("refresh")]
  6478. public Int32? Refresh { get; set; }
  6479. // Person responsible for this zone
  6480. [RosValue("responsible")]
  6481. public String Responsible { get; set; }
  6482. // Time interval that should elapse before a failed refresh should be retried
  6483. [RosValue("retry")]
  6484. public Int32? Retry { get; set; }
  6485. // Version number of original copy of the zone
  6486. [RosValue("serial")]
  6487. public Int32? Serial { get; set; }
  6488. // Time To Live
  6489. [RosValue("ttl")]
  6490. public TimeSpan? Ttl { get; set; }
  6491. public enum TypeEnum
  6492. {
  6493. [RosValue("A")]
  6494. A,
  6495. [RosValue("AAAA")]
  6496. AAAA,
  6497. [RosValue("CNAME")]
  6498. CNAME,
  6499. [RosValue("HINFO")]
  6500. HINFO,
  6501. [RosValue("MB")]
  6502. MB,
  6503. }
  6504. // The type of the resource record
  6505. [RosValue("type")]
  6506. public TypeEnum? Type { get; set; }
  6507. [RosValue("negative", IsDynamic=true)]
  6508. public String Negative { get; set; }
  6509. [RosValue("static", IsDynamic=true)]
  6510. public String Static { get; set; }
  6511. public static IpDnsCacheAll Parse(string str, Connection conn)
  6512. {
  6513. if(string.IsNullOrEmpty(str))
  6514. return null;
  6515. IpDnsCacheAll obj = new IpDnsCacheAll();
  6516. obj.FindByName(conn, str);
  6517. return obj;
  6518. }
  6519. public override string ToString() { return Name.ToString(); }
  6520. }
  6521. [RosObject("ip dns static", CanAdd=true, CanSet=true, CanMove=true, CanGet=true, CanRemove=true)]
  6522. public class IpDnsStatic : RosItemObject<IpDnsStatic>
  6523. {
  6524. public struct AddressType
  6525. {
  6526. private object value;
  6527. public IPAddress Ip
  6528. {
  6529. get { return value as IPAddress; }
  6530. set { this.value = value; }
  6531. }
  6532. public static implicit operator AddressType(IPAddress value)
  6533. {
  6534. return new AddressType() { value = value };
  6535. }public IPv6Address Ipv6
  6536. {
  6537. get { return value as IPv6Address; }
  6538. set { this.value = value; }
  6539. }
  6540. public static implicit operator AddressType(IPv6Address value)
  6541. {
  6542. return new AddressType() { value = value };
  6543. }
  6544. public static AddressType Parse(string str, Connection conn)
  6545. {
  6546. try { return new AddressType() { value = TypeFormatter.ConvertFromString<IPAddress>(str, conn) }; }
  6547. catch(Exception) { }
  6548. try { return new AddressType() { value = TypeFormatter.ConvertFromString<IPv6Address>(str, conn) }; }
  6549. catch(Exception) { }
  6550. throw new NotSupportedException();
  6551. }
  6552. public override string ToString() { return value != null ? value.ToString() : null; }
  6553. }
  6554. // IP address
  6555. [RosValue("address")]
  6556. public AddressType? Address { get; set; }
  6557. // Short description of the item
  6558. [RosValue("comment")]
  6559. public String Comment { get; set; }
  6560. // Defines whether item is ignored or used
  6561. [RosValue("disabled")]
  6562. public Boolean? Disabled { get; set; }
  6563. // Host name
  6564. [RosValue("name")]
  6565. public String Name { get; set; }
  6566. // Time To Live
  6567. [RosValue("ttl")]
  6568. public TimeSpan? Ttl { get; set; }
  6569. [RosValue("dynamic", IsDynamic=true)]
  6570. public String Dynamic { get; set; }
  6571. [RosValue("regexp", IsDynamic=true)]
  6572. public String Regexp { get; set; }
  6573. public static IpDnsStatic Parse(string str, Connection conn)
  6574. {
  6575. if(string.IsNullOrEmpty(str))
  6576. return null;
  6577. IpDnsStatic obj = new IpDnsStatic();
  6578. obj.FindByName(conn, str);
  6579. return obj;
  6580. }
  6581. public override string ToString() { return Name.ToString(); }
  6582. }
  6583. [RosObject("ip firewall address-list", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  6584. public class IpFirewallAddressList : RosItemObject<IpFirewallAddressList>
  6585. {
  6586. [RosValue("address")]
  6587. public IPAddress Address { get; set; }
  6588. // Short description of the item
  6589. [RosValue("comment")]
  6590. public String Comment { get; set; }
  6591. // Defines whether item is ignored or used
  6592. [RosValue("disabled")]
  6593. public Boolean? Disabled { get; set; }
  6594. [RosValue("list")]
  6595. public String List { get; set; }
  6596. [RosValue("dynamic", IsDynamic=true)]
  6597. public String Dynamic { get; set; }
  6598. }
  6599. [RosObject("ip firewall calea", CanAdd=true, CanSet=true, CanMove=true, CanGet=true, CanRemove=true, CanUnset=true)]
  6600. public class IpFirewallCalea : RosItemObject<IpFirewallCalea>
  6601. {
  6602. public enum ActionEnum
  6603. {
  6604. [RosValue("sniff")]
  6605. Sniff,
  6606. [RosValue("sniff-pc")]
  6607. SniffPc,
  6608. }
  6609. [RosValue("action")]
  6610. public ActionEnum? Action { get; set; }
  6611. [RosValue("address-list")]
  6612. public String AddressList { get; set; }
  6613. [RosValue("address-list-timeout")]
  6614. public TimeSpan? AddressListTimeout { get; set; }
  6615. public enum ChainEnum
  6616. {
  6617. [RosValue("forward")]
  6618. Forward,
  6619. [RosValue("input")]
  6620. Input,
  6621. [RosValue("output")]
  6622. Output,
  6623. [RosValue("postrouting")]
  6624. Postrouting,
  6625. [RosValue("prerouting")]
  6626. Prerouting,
  6627. }
  6628. [RosValue("chain")]
  6629. public ChainEnum? Chain { get; set; }
  6630. // Short description of the item
  6631. [RosValue("comment")]
  6632. public String Comment { get; set; }
  6633. public struct ConnectionBytesType
  6634. {
  6635. public Int32 From { get; set; }
  6636. public Int32 To { get; set; }
  6637. public static ConnectionBytesType Parse(string str)
  6638. {
  6639. string[] strs = str.Split('-');
  6640. if (strs.Length == 2)
  6641. return new ConnectionBytesType() { From = TypeFormatter.ConvertFromString<Int32>(strs[0], null), To = TypeFormatter.ConvertFromString<Int32>(strs[1], null) };
  6642. else if (strs.Length == 1)
  6643. return new ConnectionBytesType() { From = TypeFormatter.ConvertFromString<Int32>(strs[0], null) };
  6644. else
  6645. throw new InvalidOperationException();
  6646. }
  6647. public override string ToString()
  6648. {
  6649. if(To != null)
  6650. return String.Concat(From, '-', To);
  6651. else
  6652. return From.ToString();
  6653. }
  6654. }
  6655. [RosValue("connection-bytes", CanUnset=true)]
  6656. public ConnectionBytesType? ConnectionBytes { get; set; }
  6657. [RosValue("connection-limit", CanUnset=true)]
  6658. public String ConnectionLimit { get; set; }
  6659. [RosValue("connection-mark", CanUnset=true)]
  6660. public String ConnectionMark { get; set; }
  6661. [RosValue("connection-rate", CanUnset=true)]
  6662. public String ConnectionRate { get; set; }
  6663. [RosValue("connection-type", CanUnset=true)]
  6664. public String ConnectionType { get; set; }
  6665. [RosValue("content", CanUnset=true)]
  6666. public String Content { get; set; }
  6667. // Defines whether item is ignored or used
  6668. [RosValue("disabled")]
  6669. public Boolean? Disabled { get; set; }
  6670. [RosValue("dscp", CanUnset=true)]
  6671. public String Dscp { get; set; }
  6672. [RosValue("dst-address", CanUnset=true)]
  6673. public String DstAddress { get; set; }
  6674. [RosValue("dst-address-list", CanUnset=true)]
  6675. public String DstAddressList { get; set; }
  6676. [RosValue("dst-address-type", CanUnset=true)]
  6677. public String DstAddressType { get; set; }
  6678. [RosValue("dst-limit", CanUnset=true)]
  6679. public String DstLimit { get; set; }
  6680. [RosValue("dst-port", CanUnset=true)]
  6681. public String DstPort { get; set; }
  6682. [RosValue("fragment", CanUnset=true)]
  6683. public Boolean? Fragment { get; set; }
  6684. [RosValue("hotspot", CanUnset=true)]
  6685. public String Hotspot { get; set; }
  6686. [RosValue("icmp-options", CanUnset=true)]
  6687. public String IcmpOptions { get; set; }
  6688. [RosValue("in-bridge-port", CanUnset=true)]
  6689. public String InBridgePort { get; set; }
  6690. [RosValue("in-interface", CanUnset=true)]
  6691. public String InInterface { get; set; }
  6692. [RosValue("ingress-priority", CanUnset=true)]
  6693. public String IngressPriority { get; set; }
  6694. public enum Ipv4OptionsEnum
  6695. {
  6696. [RosValue("any")]
  6697. Any,
  6698. [RosValue("loose-source-routing")]
  6699. LooseSourceRouting,
  6700. [RosValue("no-record-route")]
  6701. NoRecordRoute,
  6702. [RosValue("no-router-alert")]
  6703. NoRouterAlert,
  6704. [RosValue("no-source-routing")]
  6705. NoSourceRouting,
  6706. }
  6707. [RosValue("ipv4-options", CanUnset=true)]
  6708. public Ipv4OptionsEnum? Ipv4Options { get; set; }
  6709. [RosValue("layer7-protocol", CanUnset=true)]
  6710. public String Layer7Protocol { get; set; }
  6711. [RosValue("limit", CanUnset=true)]
  6712. public String Limit { get; set; }
  6713. [RosValue("log-prefix")]
  6714. public String LogPrefix { get; set; }
  6715. [RosValue("nth", CanUnset=true)]
  6716. public String Nth { get; set; }
  6717. [RosValue("out-bridge-port", CanUnset=true)]
  6718. public String OutBridgePort { get; set; }
  6719. [RosValue("out-interface", CanUnset=true)]
  6720. public String OutInterface { get; set; }
  6721. [RosValue("packet-mark", CanUnset=true)]
  6722. public String PacketMark { get; set; }
  6723. [RosValue("packet-size", CanUnset=true)]
  6724. public String PacketSize { get; set; }
  6725. [RosValue("per-connection-classifier", CanUnset=true)]
  6726. public String PerConnectionClassifier { get; set; }
  6727. [RosValue("port", CanUnset=true)]
  6728. public String Port { get; set; }
  6729. [RosValue("protocol", CanUnset=true)]
  6730. public String Protocol { get; set; }
  6731. [RosValue("psd", CanUnset=true)]
  6732. public String Psd { get; set; }
  6733. [RosValue("random", CanUnset=true)]
  6734. public Int32? Random { get; set; }
  6735. [RosValue("routing-mark", CanUnset=true)]
  6736. public String RoutingMark { get; set; }
  6737. [RosValue("routing-table", CanUnset=true)]
  6738. public String RoutingTable { get; set; }
  6739. [RosValue("sniff-id")]
  6740. public Int32? SniffId { get; set; }
  6741. [RosValue("sniff-target")]
  6742. public IPAddress SniffTarget { get; set; }
  6743. [RosValue("sniff-target-port")]
  6744. public Int32? SniffTargetPort { get; set; }
  6745. [RosValue("src-address", CanUnset=true)]
  6746. public String SrcAddress { get; set; }
  6747. [RosValue("src-address-list", CanUnset=true)]
  6748. public String SrcAddressList { get; set; }
  6749. [RosValue("src-address-type", CanUnset=true)]
  6750. public String SrcAddressType { get; set; }
  6751. [RosValue("src-mac-address", CanUnset=true)]
  6752. public String SrcMacAddress { get; set; }
  6753. [RosValue("src-port", CanUnset=true)]
  6754. public String SrcPort { get; set; }
  6755. [RosValue("tcp-mss", CanUnset=true)]
  6756. public String TcpMss { get; set; }
  6757. [RosValue("time", CanUnset=true)]
  6758. public String Time { get; set; }
  6759. [RosValue("ttl", CanUnset=true)]
  6760. public String Ttl { get; set; }
  6761. [RosValue("invalid", IsDynamic=true)]
  6762. public String Invalid { get; set; }
  6763. [RosValue("packets", IsDynamic=true)]
  6764. public Int64? Packets { get; set; }
  6765. [RosValue("bytes", IsDynamic=true)]
  6766. public Int64? Bytes { get; set; }
  6767. [RosValue("dynamic", IsDynamic=true)]
  6768. public String Dynamic { get; set; }
  6769. }
  6770. [RosObject("ip firewall connection", CanGet=true, CanRemove=true)]
  6771. public class IpFirewallConnection : RosItemObject<IpFirewallConnection>
  6772. {
  6773. [RosValue("assured", IsDynamic=true)]
  6774. public String Assured { get; set; }
  6775. [RosValue("connection-mark", IsDynamic=true)]
  6776. public String ConnectionMark { get; set; }
  6777. [RosValue("connection-type", IsDynamic=true)]
  6778. public String ConnectionType { get; set; }
  6779. [RosValue("dst-address", IsDynamic=true)]
  6780. public IPAddress DstAddress { get; set; }
  6781. [RosValue("gre-key", IsDynamic=true)]
  6782. public Int32? GreKey { get; set; }
  6783. [RosValue("gre-protocol", IsDynamic=true)]
  6784. public Int32? GreProtocol { get; set; }
  6785. [RosValue("gre-version", IsDynamic=true)]
  6786. public Int32? GreVersion { get; set; }
  6787. [RosValue("icmp-code", IsDynamic=true)]
  6788. public Int32? IcmpCode { get; set; }
  6789. [RosValue("icmp-id", IsDynamic=true)]
  6790. public Int32? IcmpId { get; set; }
  6791. [RosValue("icmp-type", IsDynamic=true)]
  6792. public Int32? IcmpType { get; set; }
  6793. public enum P2pType
  6794. {
  6795. [RosValue("bit-torrent")]
  6796. BitTorrent,
  6797. [RosValue("blubster")]
  6798. Blubster,
  6799. [RosValue("direct-connect")]
  6800. DirectConnect,
  6801. [RosValue("edonkey")]
  6802. Edonkey,
  6803. [RosValue("fasttrack")]
  6804. Fasttrack,
  6805. [RosValue("gnutella")]
  6806. Gnutella,
  6807. [RosValue("none")]
  6808. None,
  6809. [RosValue("soulseek")]
  6810. Soulseek,
  6811. [RosValue("winmx")]
  6812. Winmx,
  6813. }
  6814. [RosValue("p2p", IsDynamic=true)]
  6815. public P2pType? P2p { get; set; }
  6816. public enum ProtocolType
  6817. {
  6818. [RosValue("ddp")]
  6819. Ddp,
  6820. [RosValue("egp")]
  6821. Egp,
  6822. [RosValue("encap")]
  6823. Encap,
  6824. [RosValue("ggp")]
  6825. Ggp,
  6826. [RosValue("gre")]
  6827. Gre,
  6828. [RosValue("hmp")]
  6829. Hmp,
  6830. [RosValue("icmp")]
  6831. Icmp,
  6832. [RosValue("icmpv6")]
  6833. Icmpv6,
  6834. [RosValue("idpr-cmtp")]
  6835. IdprCmtp,
  6836. [RosValue("igmp")]
  6837. Igmp,
  6838. [RosValue("ipencap")]
  6839. Ipencap,
  6840. [RosValue("ipip")]
  6841. Ipip,
  6842. [RosValue("ipsec-ah")]
  6843. IpsecAh,
  6844. [RosValue("ipsec-esp")]
  6845. IpsecEsp,
  6846. [RosValue("iso-tp4")]
  6847. IsoTp4,
  6848. [RosValue("ospf")]
  6849. Ospf,
  6850. [RosValue("pim")]
  6851. Pim,
  6852. [RosValue("pup")]
  6853. Pup,
  6854. [RosValue("rdp")]
  6855. Rdp,
  6856. [RosValue("rspf")]
  6857. Rspf,
  6858. [RosValue("st")]
  6859. St,
  6860. [RosValue("tcp")]
  6861. Tcp,
  6862. [RosValue("udp")]
  6863. Udp,
  6864. [RosValue("vmtp")]
  6865. Vmtp,
  6866. [RosValue("vrrp")]
  6867. Vrrp,
  6868. [RosValue("xns-idp")]
  6869. XnsIdp,
  6870. [RosValue("xtp")]
  6871. Xtp,
  6872. }
  6873. [RosValue("protocol", IsDynamic=true)]
  6874. public ProtocolType? Protocol { get; set; }
  6875. [RosValue("reply-dst-address", IsDynamic=true)]
  6876. public IPAddress ReplyDstAddress { get; set; }
  6877. [RosValue("reply-src-address", IsDynamic=true)]
  6878. public IPAddress ReplySrcAddress { get; set; }
  6879. public enum SeenType
  6880. {
  6881. [RosValue("assured")]
  6882. Assured,
  6883. [RosValue("connection-mark")]
  6884. ConnectionMark,
  6885. [RosValue("connection-type")]
  6886. ConnectionType,
  6887. [RosValue("dst-address")]
  6888. DstAddress,
  6889. [RosValue("gre-key")]
  6890. GreKey,
  6891. [RosValue("gre-protocol")]
  6892. GreProtocol,
  6893. [RosValue("gre-version")]
  6894. GreVersion,
  6895. [RosValue("icmp-code")]
  6896. IcmpCode,
  6897. [RosValue("icmp-id")]
  6898. IcmpId,
  6899. [RosValue("icmp-type")]
  6900. IcmpType,
  6901. [RosValue("p2p")]
  6902. P2p,
  6903. [RosValue("protocol")]
  6904. Protocol,
  6905. [RosValue("reply-dst-address")]
  6906. ReplyDstAddress,
  6907. [RosValue("reply-src-address")]
  6908. ReplySrcAddress,
  6909. [RosValue("seen")]
  6910. Seen,
  6911. [RosValue("reply")]
  6912. Reply,
  6913. [RosValue("src-address")]
  6914. SrcAddress,
  6915. [RosValue("tcp-state")]
  6916. TcpState,
  6917. [RosValue("timeout")]
  6918. Timeout,
  6919. }
  6920. [RosValue("seen", IsDynamic=true)]
  6921. public SeenType? Seen { get; set; }
  6922. public enum ReplyType
  6923. {
  6924. [RosValue("assured")]
  6925. Assured,
  6926. [RosValue("connection-mark")]
  6927. ConnectionMark,
  6928. [RosValue("connection-type")]
  6929. ConnectionType,
  6930. [RosValue("dst-address")]
  6931. DstAddress,
  6932. [RosValue("gre-key")]
  6933. GreKey,
  6934. [RosValue("gre-protocol")]
  6935. GreProtocol,
  6936. [RosValue("gre-version")]
  6937. GreVersion,
  6938. [RosValue("icmp-code")]
  6939. IcmpCode,
  6940. [RosValue("icmp-id")]
  6941. IcmpId,
  6942. [RosValue("icmp-type")]
  6943. IcmpType,
  6944. [RosValue("p2p")]
  6945. P2p,
  6946. [RosValue("protocol")]
  6947. Protocol,
  6948. [RosValue("reply-dst-address")]
  6949. ReplyDstAddress,
  6950. [RosValue("reply-src-address")]
  6951. ReplySrcAddress,
  6952. [RosValue("seen")]
  6953. Seen,
  6954. [RosValue("reply")]
  6955. Reply,
  6956. [RosValue("src-address")]
  6957. SrcAddress,
  6958. [RosValue("tcp-state")]
  6959. TcpState,
  6960. [RosValue("timeout")]
  6961. Timeout,
  6962. }
  6963. [RosValue("reply", IsDynamic=true)]
  6964. public ReplyType? Reply { get; set; }
  6965. [RosValue("src-address", IsDynamic=true)]
  6966. public IPAddress SrcAddress { get; set; }
  6967. public enum TcpStateType
  6968. {
  6969. [RosValue("close")]
  6970. Close,
  6971. [RosValue("close-wait")]
  6972. CloseWait,
  6973. [RosValue("established")]
  6974. Established,
  6975. [RosValue("fin-wait")]
  6976. FinWait,
  6977. [RosValue("last-ack")]
  6978. LastAck,
  6979. [RosValue("listen")]
  6980. Listen,
  6981. [RosValue("none")]
  6982. None,
  6983. [RosValue("syn-recv")]
  6984. SynRecv,
  6985. [RosValue("syn-sent")]
  6986. SynSent,
  6987. [RosValue("time-wait")]
  6988. TimeWait,
  6989. }
  6990. [RosValue("tcp-state", IsDynamic=true)]
  6991. public TcpStateType? TcpState { get; set; }
  6992. [RosValue("timeout", IsDynamic=true)]
  6993. public TimeSpan? Timeout { get; set; }
  6994. }
  6995. [RosObject("ip firewall connection tracking", CanSet=true, CanGet=true)]
  6996. public class IpFirewallConnectionTracking : RosValueObject
  6997. {
  6998. [RosValue("enabled")]
  6999. public Boolean? Enabled { get; set; }
  7000. [RosValue("generic-timeout")]
  7001. public TimeSpan? GenericTimeout { get; set; }
  7002. [RosValue("icmp-timeout")]
  7003. public TimeSpan? IcmpTimeout { get; set; }
  7004. [RosValue("tcp-close-timeout")]
  7005. public TimeSpan? TcpCloseTimeout { get; set; }
  7006. [RosValue("tcp-close-wait-timeout")]
  7007. public TimeSpan? TcpCloseWaitTimeout { get; set; }
  7008. [RosValue("tcp-established-timeout")]
  7009. public TimeSpan? TcpEstablishedTimeout { get; set; }
  7010. [RosValue("tcp-fin-wait-timeout")]
  7011. public TimeSpan? TcpFinWaitTimeout { get; set; }
  7012. [RosValue("tcp-last-ack-timeout")]
  7013. public TimeSpan? TcpLastAckTimeout { get; set; }
  7014. [RosValue("tcp-syn-received-timeout")]
  7015. public TimeSpan? TcpSynReceivedTimeout { get; set; }
  7016. [RosValue("tcp-syn-sent-timeout")]
  7017. public TimeSpan? TcpSynSentTimeout { get; set; }
  7018. [RosValue("tcp-syncookie")]
  7019. public Boolean? TcpSyncookie { get; set; }
  7020. [RosValue("tcp-time-wait-timeout")]
  7021. public TimeSpan? TcpTimeWaitTimeout { get; set; }
  7022. [RosValue("udp-stream-timeout")]
  7023. public TimeSpan? UdpStreamTimeout { get; set; }
  7024. [RosValue("udp-timeout")]
  7025. public TimeSpan? UdpTimeout { get; set; }
  7026. }
  7027. [RosObject("ip firewall filter", CanAdd=true, CanSet=true, CanMove=true, CanGet=true, CanRemove=true, CanUnset=true)]
  7028. public class IpFirewallFilter : RosItemObject<IpFirewallFilter>
  7029. {
  7030. public enum ActionEnum
  7031. {
  7032. [RosValue("accept")]
  7033. Accept,
  7034. [RosValue("add-dst-to-address-list")]
  7035. AddDstToAddressList,
  7036. [RosValue("add-src-to-address-list")]
  7037. AddSrcToAddressList,
  7038. [RosValue("drop")]
  7039. Drop,
  7040. [RosValue("jump")]
  7041. Jump,
  7042. }
  7043. // Action to undertake if the packet matches the rule
  7044. [RosValue("action")]
  7045. public ActionEnum? Action { get; set; }
  7046. // Address list in which marked address put
  7047. [RosValue("address-list")]
  7048. public String AddressList { get; set; }
  7049. // Time interval after which address remove from address list
  7050. [RosValue("address-list-timeout")]
  7051. public TimeSpan? AddressListTimeout { get; set; }
  7052. public enum ChainEnum
  7053. {
  7054. [RosValue("forward")]
  7055. Forward,
  7056. [RosValue("input")]
  7057. Input,
  7058. [RosValue("output")]
  7059. Output,
  7060. }
  7061. // The name of the chain through which packets are traversing
  7062. [RosValue("chain")]
  7063. public ChainEnum? Chain { get; set; }
  7064. // Short description of the item
  7065. [RosValue("comment")]
  7066. public String Comment { get; set; }
  7067. public struct ConnectionBytesType
  7068. {
  7069. public Int32 From { get; set; }
  7070. public Int32 To { get; set; }
  7071. public static ConnectionBytesType Parse(string str)
  7072. {
  7073. string[] strs = str.Split('-');
  7074. if (strs.Length == 2)
  7075. return new ConnectionBytesType() { From = TypeFormatter.ConvertFromString<Int32>(strs[0], null), To = TypeFormatter.ConvertFromString<Int32>(strs[1], null) };
  7076. else if (strs.Length == 1)
  7077. return new ConnectionBytesType() { From = TypeFormatter.ConvertFromString<Int32>(strs[0], null) };
  7078. else
  7079. throw new InvalidOperationException();
  7080. }
  7081. public override string ToString()
  7082. {
  7083. if(To != null)
  7084. return String.Concat(From, '-', To);
  7085. else
  7086. return From.ToString();
  7087. }
  7088. }
  7089. // Match packets with given bytes or byte range
  7090. [RosValue("connection-bytes", CanUnset=true)]
  7091. public ConnectionBytesType? ConnectionBytes { get; set; }
  7092. // Restrict connection limit per address or address block
  7093. [RosValue("connection-limit", CanUnset=true)]
  7094. public String ConnectionLimit { get; set; }
  7095. // Matches packets marked via mangle facility with particular connection mark
  7096. [RosValue("connection-mark", CanUnset=true)]
  7097. public String ConnectionMark { get; set; }
  7098. [RosValue("connection-rate", CanUnset=true)]
  7099. public String ConnectionRate { get; set; }
  7100. public enum ConnectionStateEnum
  7101. {
  7102. [RosValue("established")]
  7103. Established,
  7104. [RosValue("invalid")]
  7105. Invalid,
  7106. [RosValue("new")]
  7107. New,
  7108. [RosValue("related")]
  7109. Related,
  7110. }
  7111. // Interprets the connection tracking analysis data for a particular packet
  7112. [RosValue("connection-state", CanUnset=true)]
  7113. public ConnectionStateEnum? ConnectionState { get; set; }
  7114. // Match packets with given connection type
  7115. [RosValue("connection-type", CanUnset=true)]
  7116. public String ConnectionType { get; set; }
  7117. // The text packets should contain in order to match the rule
  7118. [RosValue("content", CanUnset=true)]
  7119. public String Content { get; set; }
  7120. // Defines whether item is ignored or used
  7121. [RosValue("disabled")]
  7122. public Boolean? Disabled { get; set; }
  7123. [RosValue("dscp", CanUnset=true)]
  7124. public String Dscp { get; set; }
  7125. // Destination address with mask
  7126. [RosValue("dst-address", CanUnset=true)]
  7127. public String DstAddress { get; set; }
  7128. // Destination address list name in which packet place
  7129. [RosValue("dst-address-list", CanUnset=true)]
  7130. public String DstAddressList { get; set; }
  7131. // Destination address type
  7132. [RosValue("dst-address-type", CanUnset=true)]
  7133. public String DstAddressType { get; set; }
  7134. // Packet limitation per time with burst to dst-address, dst-port or src-address
  7135. [RosValue("dst-limit", CanUnset=true)]
  7136. public String DstLimit { get; set; }
  7137. // Destination port number or range
  7138. [RosValue("dst-port", CanUnset=true)]
  7139. public String DstPort { get; set; }
  7140. [RosValue("fragment", CanUnset=true)]
  7141. public Boolean? Fragment { get; set; }
  7142. // Matches packets received from clients against various Hot-Spot
  7143. [RosValue("hotspot", CanUnset=true)]
  7144. public String Hotspot { get; set; }
  7145. // Matches ICMP Type:Code fields
  7146. [RosValue("icmp-options", CanUnset=true)]
  7147. public String IcmpOptions { get; set; }
  7148. [RosValue("in-bridge-port", CanUnset=true)]
  7149. public String InBridgePort { get; set; }
  7150. // Interface the packet has entered the router through
  7151. [RosValue("in-interface", CanUnset=true)]
  7152. public String InInterface { get; set; }
  7153. [RosValue("ingress-priority", CanUnset=true)]
  7154. public String IngressPriority { get; set; }
  7155. public enum Ipv4OptionsEnum
  7156. {
  7157. [RosValue("any")]
  7158. Any,
  7159. [RosValue("loose-source-routing")]
  7160. LooseSourceRouting,
  7161. [RosValue("no-record-route")]
  7162. NoRecordRoute,
  7163. [RosValue("no-router-alert")]
  7164. NoRouterAlert,
  7165. [RosValue("no-source-routing")]
  7166. NoSourceRouting,
  7167. }
  7168. // Match ipv4 header options
  7169. [RosValue("ipv4-options", CanUnset=true)]
  7170. public Ipv4OptionsEnum? Ipv4Options { get; set; }
  7171. public enum JumpTargetEnum
  7172. {
  7173. [RosValue("forward")]
  7174. Forward,
  7175. [RosValue("input")]
  7176. Input,
  7177. [RosValue("output")]
  7178. Output,
  7179. }
  7180. // Name of the target chain, if the action=jump is used
  7181. [RosValue("jump-target")]
  7182. public JumpTargetEnum? JumpTarget { get; set; }
  7183. [RosValue("layer7-protocol", CanUnset=true)]
  7184. public String Layer7Protocol { get; set; }
  7185. // Setup burst, how many times to use it in during time interval measured in seconds
  7186. [RosValue("limit", CanUnset=true)]
  7187. public String Limit { get; set; }
  7188. // Creates all logs with specific prefix
  7189. [RosValue("log-prefix")]
  7190. public String LogPrefix { get; set; }
  7191. // Match nth packets received by the rule
  7192. [RosValue("nth", CanUnset=true)]
  7193. public String Nth { get; set; }
  7194. // Matches the bridge port physical output device added to a bridge device
  7195. [RosValue("out-bridge-port", CanUnset=true)]
  7196. public String OutBridgePort { get; set; }
  7197. // Interface the packet has leaved the router through
  7198. [RosValue("out-interface", CanUnset=true)]
  7199. public String OutInterface { get; set; }
  7200. // P2P program to match
  7201. [RosValue("p2p", CanUnset=true)]
  7202. public String P2p { get; set; }
  7203. // Matches packets marked via mangle facility with particular packet mark
  7204. [RosValue("packet-mark", CanUnset=true)]
  7205. public String PacketMark { get; set; }
  7206. // Packet size or range in bytes
  7207. [RosValue("packet-size", CanUnset=true)]
  7208. public String PacketSize { get; set; }
  7209. [RosValue("per-connection-classifier", CanUnset=true)]
  7210. public String PerConnectionClassifier { get; set; }
  7211. [RosValue("port", CanUnset=true)]
  7212. public String Port { get; set; }
  7213. // Protocol name or number
  7214. [RosValue("protocol", CanUnset=true)]
  7215. public String Protocol { get; set; }
  7216. // Detect TCP un UDP scans
  7217. [RosValue("psd", CanUnset=true)]
  7218. public String Psd { get; set; }
  7219. // Match packets randomly with given propability
  7220. [RosValue("random", CanUnset=true)]
  7221. public Int32? Random { get; set; }
  7222. public enum RejectWithEnum
  7223. {
  7224. [RosValue("icmp-admin-prohibited")]
  7225. IcmpAdminProhibited,
  7226. [RosValue("icmp-host-prohibited")]
  7227. IcmpHostProhibited,
  7228. [RosValue("icmp-host-unreachable")]
  7229. IcmpHostUnreachable,
  7230. [RosValue("icmp-net-prohibited")]
  7231. IcmpNetProhibited,
  7232. [RosValue("icmp-network-unreachable")]
  7233. IcmpNetworkUnreachable,
  7234. }
  7235. // Alters the reply packet of reject action
  7236. [RosValue("reject-with")]
  7237. public RejectWithEnum? RejectWith { get; set; }
  7238. // Matches packets marked by mangle facility with particular routing mark
  7239. [RosValue("routing-mark", CanUnset=true)]
  7240. public String RoutingMark { get; set; }
  7241. [RosValue("routing-table", CanUnset=true)]
  7242. public String RoutingTable { get; set; }
  7243. // Source address with mask
  7244. [RosValue("src-address", CanUnset=true)]
  7245. public String SrcAddress { get; set; }
  7246. // Matches source address of a packet against user-defined address list
  7247. [RosValue("src-address-list", CanUnset=true)]
  7248. public String SrcAddressList { get; set; }
  7249. // Source IP address type
  7250. [RosValue("src-address-type", CanUnset=true)]
  7251. public String SrcAddressType { get; set; }
  7252. // Source MAC address
  7253. [RosValue("src-mac-address", CanUnset=true)]
  7254. public String SrcMacAddress { get; set; }
  7255. // Source-port number
  7256. [RosValue("src-port", CanUnset=true)]
  7257. public String SrcPort { get; set; }
  7258. // TCP flags to match
  7259. [RosValue("tcp-flags", CanUnset=true)]
  7260. public String TcpFlags { get; set; }
  7261. // TCP Maximum Segment Size value
  7262. [RosValue("tcp-mss", CanUnset=true)]
  7263. public String TcpMss { get; set; }
  7264. // Packet arrival time and date or locally generated packets departure time and date
  7265. [RosValue("time", CanUnset=true)]
  7266. public String Time { get; set; }
  7267. [RosValue("ttl", CanUnset=true)]
  7268. public String Ttl { get; set; }
  7269. [RosValue("invalid", IsDynamic=true)]
  7270. public String Invalid { get; set; }
  7271. [RosValue("packets", IsDynamic=true)]
  7272. public Int64? Packets { get; set; }
  7273. [RosValue("bytes", IsDynamic=true)]
  7274. public Int64? Bytes { get; set; }
  7275. [RosValue("dynamic", IsDynamic=true)]
  7276. public String Dynamic { get; set; }
  7277. }
  7278. [RosObject("ip firewall layer7-protocol", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  7279. public class IpFirewallLayer7Protocol : RosItemObject<IpFirewallLayer7Protocol>
  7280. {
  7281. // Short description of the item
  7282. [RosValue("comment")]
  7283. public String Comment { get; set; }
  7284. [RosValue("name")]
  7285. public String Name { get; set; }
  7286. [RosValue("regexp")]
  7287. public String Regexp { get; set; }
  7288. public static IpFirewallLayer7Protocol Parse(string str, Connection conn)
  7289. {
  7290. if(string.IsNullOrEmpty(str))
  7291. return null;
  7292. IpFirewallLayer7Protocol obj = new IpFirewallLayer7Protocol();
  7293. obj.FindByName(conn, str);
  7294. return obj;
  7295. }
  7296. public override string ToString() { return Name.ToString(); }
  7297. }
  7298. [RosObject("ip firewall mangle", CanAdd=true, CanSet=true, CanMove=true, CanGet=true, CanRemove=true, CanUnset=true)]
  7299. public class IpFirewallMangle : RosItemObject<IpFirewallMangle>
  7300. {
  7301. public enum ActionEnum
  7302. {
  7303. [RosValue("accept")]
  7304. Accept,
  7305. [RosValue("add-dst-to-address-list")]
  7306. AddDstToAddressList,
  7307. [RosValue("add-src-to-address-list")]
  7308. AddSrcToAddressList,
  7309. [RosValue("change-dscp")]
  7310. ChangeDscp,
  7311. [RosValue("change-mss")]
  7312. ChangeMss,
  7313. }
  7314. // Action to undertake if the packet matches the rule
  7315. [RosValue("action")]
  7316. public ActionEnum? Action { get; set; }
  7317. // Address list in which marked address put
  7318. [RosValue("address-list")]
  7319. public String AddressList { get; set; }
  7320. // Time interval after which address remove from address list
  7321. [RosValue("address-list-timeout")]
  7322. public TimeSpan? AddressListTimeout { get; set; }
  7323. public enum ChainEnum
  7324. {
  7325. [RosValue("forward")]
  7326. Forward,
  7327. [RosValue("input")]
  7328. Input,
  7329. [RosValue("output")]
  7330. Output,
  7331. [RosValue("postrouting")]
  7332. Postrouting,
  7333. [RosValue("prerouting")]
  7334. Prerouting,
  7335. }
  7336. // Chains through which packets are traversing
  7337. [RosValue("chain")]
  7338. public ChainEnum? Chain { get; set; }
  7339. // Short description of the item
  7340. [RosValue("comment")]
  7341. public String Comment { get; set; }
  7342. public struct ConnectionBytesType
  7343. {
  7344. public Int32 From { get; set; }
  7345. public Int32 To { get; set; }
  7346. public static ConnectionBytesType Parse(string str)
  7347. {
  7348. string[] strs = str.Split('-');
  7349. if (strs.Length == 2)
  7350. return new ConnectionBytesType() { From = TypeFormatter.ConvertFromString<Int32>(strs[0], null), To = TypeFormatter.ConvertFromString<Int32>(strs[1], null) };
  7351. else if (strs.Length == 1)
  7352. return new ConnectionBytesType() { From = TypeFormatter.ConvertFromString<Int32>(strs[0], null) };
  7353. else
  7354. throw new InvalidOperationException();
  7355. }
  7356. public override string ToString()
  7357. {
  7358. if(To != null)
  7359. return String.Concat(From, '-', To);
  7360. else
  7361. return From.ToString();
  7362. }
  7363. }
  7364. // Match packets with given bytes or byte range
  7365. [RosValue("connection-bytes", CanUnset=true)]
  7366. public ConnectionBytesType? ConnectionBytes { get; set; }
  7367. // Restrict connection limit per address or address block
  7368. [RosValue("connection-limit", CanUnset=true)]
  7369. public String ConnectionLimit { get; set; }
  7370. // Mark connection
  7371. [RosValue("connection-mark", CanUnset=true)]
  7372. public String ConnectionMark { get; set; }
  7373. [RosValue("connection-rate", CanUnset=true)]
  7374. public String ConnectionRate { get; set; }
  7375. public enum ConnectionStateEnum
  7376. {
  7377. [RosValue("established")]
  7378. Established,
  7379. [RosValue("invalid")]
  7380. Invalid,
  7381. [RosValue("new")]
  7382. New,
  7383. [RosValue("related")]
  7384. Related,
  7385. }
  7386. [RosValue("connection-state", CanUnset=true)]
  7387. public ConnectionStateEnum? ConnectionState { get; set; }
  7388. // Match packets with given connection type
  7389. [RosValue("connection-type", CanUnset=true)]
  7390. public String ConnectionType { get; set; }
  7391. // The text packets should contain in order to match the rule
  7392. [RosValue("content", CanUnset=true)]
  7393. public String Content { get; set; }
  7394. // Defines whether item is ignored or used
  7395. [RosValue("disabled")]
  7396. public Boolean? Disabled { get; set; }
  7397. [RosValue("dscp", CanUnset=true)]
  7398. public String Dscp { get; set; }
  7399. // Destination address with mask
  7400. [RosValue("dst-address", CanUnset=true)]
  7401. public String DstAddress { get; set; }
  7402. // Destination address list name in which packet will be placed
  7403. [RosValue("dst-address-list", CanUnset=true)]
  7404. public String DstAddressList { get; set; }
  7405. // Destination address type
  7406. [RosValue("dst-address-type", CanUnset=true)]
  7407. public String DstAddressType { get; set; }
  7408. // Packet limitation per time with burst to dst-address, dst-port or src-address
  7409. [RosValue("dst-limit", CanUnset=true)]
  7410. public String DstLimit { get; set; }
  7411. // Destination port number or range
  7412. [RosValue("dst-port", CanUnset=true)]
  7413. public String DstPort { get; set; }
  7414. [RosValue("fragment", CanUnset=true)]
  7415. public Boolean? Fragment { get; set; }
  7416. // Matches packets received from clients against various Hot-Spot
  7417. [RosValue("hotspot", CanUnset=true)]
  7418. public String Hotspot { get; set; }
  7419. // Matches ICMP Type:Code fields
  7420. [RosValue("icmp-options", CanUnset=true)]
  7421. public String IcmpOptions { get; set; }
  7422. // Matches the bridge port physical input device added to a bridge device
  7423. [RosValue("in-bridge-port", CanUnset=true)]
  7424. public String InBridgePort { get; set; }
  7425. // Interface the packet has entered the router through
  7426. [RosValue("in-interface", CanUnset=true)]
  7427. public String InInterface { get; set; }
  7428. [RosValue("ingress-priority", CanUnset=true)]
  7429. public String IngressPriority { get; set; }
  7430. public enum Ipv4OptionsEnum
  7431. {
  7432. [RosValue("any")]
  7433. Any,
  7434. [RosValue("loose-source-routing")]
  7435. LooseSourceRouting,
  7436. [RosValue("no-record-route")]
  7437. NoRecordRoute,
  7438. [RosValue("no-router-alert")]
  7439. NoRouterAlert,
  7440. [RosValue("no-source-routing")]
  7441. NoSourceRouting,
  7442. }
  7443. // Match ipv4 header options
  7444. [RosValue("ipv4-options", CanUnset=true)]
  7445. public Ipv4OptionsEnum? Ipv4Options { get; set; }
  7446. public enum JumpTargetEnum
  7447. {
  7448. [RosValue("forward")]
  7449. Forward,
  7450. [RosValue("input")]
  7451. Input,
  7452. [RosValue("output")]
  7453. Output,
  7454. [RosValue("postrouting")]
  7455. Postrouting,
  7456. [RosValue("prerouting")]
  7457. Prerouting,
  7458. }
  7459. // Name of the target chain, if the action=jump is used
  7460. [RosValue("jump-target")]
  7461. public JumpTargetEnum? JumpTarget { get; set; }
  7462. [RosValue("layer7-protocol", CanUnset=true)]
  7463. public String Layer7Protocol { get; set; }
  7464. // Setup burst, how many times to use it in during time interval measured in seconds
  7465. [RosValue("limit", CanUnset=true)]
  7466. public String Limit { get; set; }
  7467. // Creates all logs with specific prefix
  7468. [RosValue("log-prefix")]
  7469. public String LogPrefix { get; set; }
  7470. // Specify the new value of the connection mark to be used in conjunction with action=mark-connection
  7471. [RosValue("new-connection-mark")]
  7472. public String NewConnectionMark { get; set; }
  7473. [RosValue("new-dscp")]
  7474. public Int32? NewDscp { get; set; }
  7475. public enum MssActionEnum
  7476. {
  7477. [RosValue("clamp-to-pmtu")]
  7478. ClampToPmtu,
  7479. }
  7480. public struct NewMssType
  7481. {
  7482. private object value;
  7483. public MssActionEnum? MssAction
  7484. {
  7485. get { return value as MssActionEnum?; }
  7486. set { this.value = value; }
  7487. }
  7488. public static implicit operator NewMssType(MssActionEnum? value)
  7489. {
  7490. return new NewMssType() { value = value };
  7491. }public Int32? MssValue
  7492. {
  7493. get { return value as Int32?; }
  7494. set { this.value = value; }
  7495. }
  7496. public static implicit operator NewMssType(Int32? value)
  7497. {
  7498. return new NewMssType() { value = value };
  7499. }
  7500. public static NewMssType Parse(string str, Connection conn)
  7501. {
  7502. try { return new NewMssType() { value = TypeFormatter.ConvertFromString<MssActionEnum>(str, conn) }; }
  7503. catch(Exception) { }
  7504. try { return new NewMssType() { value = TypeFormatter.ConvertFromString<Int32>(str, conn) }; }
  7505. catch(Exception) { }
  7506. throw new NotSupportedException();
  7507. }
  7508. public override string ToString() { return value != null ? value.ToString() : null; }
  7509. }
  7510. // Specify MSS value to be used in conjunction with action=change-mss
  7511. [RosValue("new-mss")]
  7512. public NewMssType? NewMss { get; set; }
  7513. // Specify the new value of the packet mark to be used in conjunction with action=mark-packet
  7514. [RosValue("new-packet-mark")]
  7515. public String NewPacketMark { get; set; }
  7516. public enum NewPriorityEnum
  7517. {
  7518. [RosValue("from-dscp")]
  7519. FromDscp,
  7520. [RosValue("from-ingress")]
  7521. FromIngress,
  7522. }
  7523. [RosValue("new-priority")]
  7524. public NewPriorityEnum? NewPriority { get; set; }
  7525. // Specify the new value of the routing mark used in conjunction with action=mark-routing
  7526. [RosValue("new-routing-mark")]
  7527. public String NewRoutingMark { get; set; }
  7528. // Specify the new TTL field value used in conjunction with action=change-ttl
  7529. [RosValue("new-ttl")]
  7530. public String NewTtl { get; set; }
  7531. // Match nth packets received by the rule
  7532. [RosValue("nth", CanUnset=true)]
  7533. public String Nth { get; set; }
  7534. // Matches the bridge port physical output device added to a bridge device
  7535. [RosValue("out-bridge-port", CanUnset=true)]
  7536. public String OutBridgePort { get; set; }
  7537. // Interface the packet will leave the router through
  7538. [RosValue("out-interface", CanUnset=true)]
  7539. public String OutInterface { get; set; }
  7540. // P2P program to match
  7541. [RosValue("p2p", CanUnset=true)]
  7542. public String P2p { get; set; }
  7543. // Matches packets marked via mangle facility with particular packet mark
  7544. [RosValue("packet-mark", CanUnset=true)]
  7545. public String PacketMark { get; set; }
  7546. // Packet size or range in bytes
  7547. [RosValue("packet-size", CanUnset=true)]
  7548. public String PacketSize { get; set; }
  7549. [RosValue("passthrough")]
  7550. public Boolean? Passthrough { get; set; }
  7551. [RosValue("per-connection-classifier", CanUnset=true)]
  7552. public String PerConnectionClassifier { get; set; }
  7553. [RosValue("port", CanUnset=true)]
  7554. public String Port { get; set; }
  7555. // Protocol name or number
  7556. [RosValue("protocol", CanUnset=true)]
  7557. public String Protocol { get; set; }
  7558. // Detect TCP un UDP scans
  7559. [RosValue("psd", CanUnset=true)]
  7560. public String Psd { get; set; }
  7561. // Match packets randomly with given propability
  7562. [RosValue("random", CanUnset=true)]
  7563. public Int32? Random { get; set; }
  7564. // Mark name for policy routing
  7565. [RosValue("routing-mark", CanUnset=true)]
  7566. public String RoutingMark { get; set; }
  7567. [RosValue("routing-table", CanUnset=true)]
  7568. public String RoutingTable { get; set; }
  7569. // Source address with mask
  7570. [RosValue("src-address", CanUnset=true)]
  7571. public String SrcAddress { get; set; }
  7572. // Source address list name in which packet will be placed
  7573. [RosValue("src-address-list", CanUnset=true)]
  7574. public String SrcAddressList { get; set; }
  7575. // Source IP address type
  7576. [RosValue("src-address-type", CanUnset=true)]
  7577. public String SrcAddressType { get; set; }
  7578. // Source MAC address
  7579. [RosValue("src-mac-address", CanUnset=true)]
  7580. public String SrcMacAddress { get; set; }
  7581. // Source-port number
  7582. [RosValue("src-port", CanUnset=true)]
  7583. public String SrcPort { get; set; }
  7584. // TCP flags to match
  7585. [RosValue("tcp-flags", CanUnset=true)]
  7586. public String TcpFlags { get; set; }
  7587. // TCP Maximum Segment Size value
  7588. [RosValue("tcp-mss", CanUnset=true)]
  7589. public String TcpMss { get; set; }
  7590. // Packet arrival time and date or locally generated packets departure time and date
  7591. [RosValue("time", CanUnset=true)]
  7592. public String Time { get; set; }
  7593. [RosValue("ttl", CanUnset=true)]
  7594. public String Ttl { get; set; }
  7595. [RosValue("invalid", IsDynamic=true)]
  7596. public String Invalid { get; set; }
  7597. [RosValue("bytes", IsDynamic=true)]
  7598. public Int64? Bytes { get; set; }
  7599. [RosValue("dynamic", IsDynamic=true)]
  7600. public String Dynamic { get; set; }
  7601. [RosValue("packets", IsDynamic=true)]
  7602. public Int64? Packets { get; set; }
  7603. }
  7604. [RosObject("ip firewall nat", CanAdd=true, CanSet=true, CanMove=true, CanGet=true, CanRemove=true, CanUnset=true)]
  7605. public class IpFirewallNat : RosItemObject<IpFirewallNat>
  7606. {
  7607. public enum ActionEnum
  7608. {
  7609. [RosValue("accept")]
  7610. Accept,
  7611. [RosValue("add-dst-to-address-list")]
  7612. AddDstToAddressList,
  7613. [RosValue("add-src-to-address-list")]
  7614. AddSrcToAddressList,
  7615. [RosValue("dst-nat")]
  7616. DstNat,
  7617. [RosValue("jump")]
  7618. Jump,
  7619. }
  7620. // Action to undertake if the packet matches the rule
  7621. [RosValue("action")]
  7622. public ActionEnum? Action { get; set; }
  7623. // Specifies the name of the address list to collect IP addresses from rules having
  7624. [RosValue("address-list")]
  7625. public String AddressList { get; set; }
  7626. // Time interval after which the address will be removed from the address list specified by address-list parameter
  7627. [RosValue("address-list-timeout")]
  7628. public TimeSpan? AddressListTimeout { get; set; }
  7629. public enum ChainEnum
  7630. {
  7631. [RosValue("dstnat")]
  7632. Dstnat,
  7633. [RosValue("srcnat")]
  7634. Srcnat,
  7635. }
  7636. // The name of the chain through which packets are traversing
  7637. [RosValue("chain")]
  7638. public ChainEnum? Chain { get; set; }
  7639. // Short description of the item
  7640. [RosValue("comment")]
  7641. public String Comment { get; set; }
  7642. public struct ConnectionBytesType
  7643. {
  7644. public Int32 From { get; set; }
  7645. public Int32 To { get; set; }
  7646. public static ConnectionBytesType Parse(string str)
  7647. {
  7648. string[] strs = str.Split('-');
  7649. if (strs.Length == 2)
  7650. return new ConnectionBytesType() { From = TypeFormatter.ConvertFromString<Int32>(strs[0], null), To = TypeFormatter.ConvertFromString<Int32>(strs[1], null) };
  7651. else if (strs.Length == 1)
  7652. return new ConnectionBytesType() { From = TypeFormatter.ConvertFromString<Int32>(strs[0], null) };
  7653. else
  7654. throw new InvalidOperationException();
  7655. }
  7656. public override string ToString()
  7657. {
  7658. if(To != null)
  7659. return String.Concat(From, '-', To);
  7660. else
  7661. return From.ToString();
  7662. }
  7663. }
  7664. // Match packets with given bytes or byte range
  7665. [RosValue("connection-bytes", CanUnset=true)]
  7666. public ConnectionBytesType? ConnectionBytes { get; set; }
  7667. // Restrict connection limit per address or address block
  7668. [RosValue("connection-limit", CanUnset=true)]
  7669. public String ConnectionLimit { get; set; }
  7670. // Matches packets marked via mangle facility with particular connection mark
  7671. [RosValue("connection-mark", CanUnset=true)]
  7672. public String ConnectionMark { get; set; }
  7673. [RosValue("connection-rate", CanUnset=true)]
  7674. public String ConnectionRate { get; set; }
  7675. // Match packets with given connection type
  7676. [RosValue("connection-type", CanUnset=true)]
  7677. public String ConnectionType { get; set; }
  7678. // The text packets should contain in order to match the rule
  7679. [RosValue("content", CanUnset=true)]
  7680. public String Content { get; set; }
  7681. // Defines whether item is ignored or used
  7682. [RosValue("disabled")]
  7683. public Boolean? Disabled { get; set; }
  7684. [RosValue("dscp", CanUnset=true)]
  7685. public String Dscp { get; set; }
  7686. // Destination address with mask
  7687. [RosValue("dst-address", CanUnset=true)]
  7688. public String DstAddress { get; set; }
  7689. // Destination address list name in which packet place
  7690. [RosValue("dst-address-list", CanUnset=true)]
  7691. public String DstAddressList { get; set; }
  7692. // Destination address type
  7693. [RosValue("dst-address-type", CanUnset=true)]
  7694. public String DstAddressType { get; set; }
  7695. // Packet limitation per time with burst to dst-address, dst-port or src-address
  7696. [RosValue("dst-limit", CanUnset=true)]
  7697. public String DstLimit { get; set; }
  7698. // Destination port number or range
  7699. [RosValue("dst-port", CanUnset=true)]
  7700. public String DstPort { get; set; }
  7701. [RosValue("fragment", CanUnset=true)]
  7702. public Boolean? Fragment { get; set; }
  7703. // Matches packets received from clients against various Hot-Spot
  7704. [RosValue("hotspot", CanUnset=true)]
  7705. public String Hotspot { get; set; }
  7706. // Matches ICMP Type:Code fields
  7707. [RosValue("icmp-options", CanUnset=true)]
  7708. public String IcmpOptions { get; set; }
  7709. // Matches the bridge port physical input device added to a bridge device
  7710. [RosValue("in-bridge-port", CanUnset=true)]
  7711. public String InBridgePort { get; set; }
  7712. // Interface the packet has entered the router through
  7713. [RosValue("in-interface", CanUnset=true)]
  7714. public String InInterface { get; set; }
  7715. [RosValue("ingress-priority", CanUnset=true)]
  7716. public String IngressPriority { get; set; }
  7717. public enum Ipv4OptionsEnum
  7718. {
  7719. [RosValue("any")]
  7720. Any,
  7721. [RosValue("loose-source-routing")]
  7722. LooseSourceRouting,
  7723. [RosValue("no-record-route")]
  7724. NoRecordRoute,
  7725. [RosValue("no-router-alert")]
  7726. NoRouterAlert,
  7727. [RosValue("no-source-routing")]
  7728. NoSourceRouting,
  7729. }
  7730. // Match ipv4 header options
  7731. [RosValue("ipv4-options", CanUnset=true)]
  7732. public Ipv4OptionsEnum? Ipv4Options { get; set; }
  7733. public enum JumpTargetEnum
  7734. {
  7735. [RosValue("dstnat")]
  7736. Dstnat,
  7737. [RosValue("srcnat")]
  7738. Srcnat,
  7739. }
  7740. // Name of the target chain, if the action=jump is used
  7741. [RosValue("jump-target")]
  7742. public JumpTargetEnum? JumpTarget { get; set; }
  7743. [RosValue("layer7-protocol", CanUnset=true)]
  7744. public String Layer7Protocol { get; set; }
  7745. // Setup burst, how many times to use it in during time interval measured in seconds
  7746. [RosValue("limit", CanUnset=true)]
  7747. public String Limit { get; set; }
  7748. // Creates all logs with specific prefix
  7749. [RosValue("log-prefix")]
  7750. public String LogPrefix { get; set; }
  7751. // Match nth packets received by the rule
  7752. [RosValue("nth", CanUnset=true)]
  7753. public String Nth { get; set; }
  7754. // Matches the bridge port physical output device added to a bridge device
  7755. [RosValue("out-bridge-port", CanUnset=true)]
  7756. public String OutBridgePort { get; set; }
  7757. // Interface the packet has leaved the router through
  7758. [RosValue("out-interface", CanUnset=true)]
  7759. public String OutInterface { get; set; }
  7760. // Matches packets marked via mangle facility with particular packet mark
  7761. [RosValue("packet-mark", CanUnset=true)]
  7762. public String PacketMark { get; set; }
  7763. // Packet size or range in bytes
  7764. [RosValue("packet-size", CanUnset=true)]
  7765. public String PacketSize { get; set; }
  7766. [RosValue("per-connection-classifier", CanUnset=true)]
  7767. public String PerConnectionClassifier { get; set; }
  7768. // Destination port
  7769. [RosValue("port", CanUnset=true)]
  7770. public String Port { get; set; }
  7771. // Protocol name or number
  7772. [RosValue("protocol", CanUnset=true)]
  7773. public String Protocol { get; set; }
  7774. // Detect TCP un UDP scans
  7775. [RosValue("psd", CanUnset=true)]
  7776. public String Psd { get; set; }
  7777. // Match packets randomly with given propability
  7778. [RosValue("random", CanUnset=true)]
  7779. public Int32? Random { get; set; }
  7780. // Matches packets marked by mangle facility with particular routing mark
  7781. [RosValue("routing-mark", CanUnset=true)]
  7782. public String RoutingMark { get; set; }
  7783. [RosValue("routing-table", CanUnset=true)]
  7784. public String RoutingTable { get; set; }
  7785. // Specifies whether to account or not to account for destination IP address when selecting a new source IP address for packets matched by rules with action=same
  7786. [RosValue("same-not-by-dst")]
  7787. public Boolean? SameNotByDst { get; set; }
  7788. // Source address with mask
  7789. [RosValue("src-address", CanUnset=true)]
  7790. public String SrcAddress { get; set; }
  7791. // Matches source address of a packet against user-defined address list
  7792. [RosValue("src-address-list", CanUnset=true)]
  7793. public String SrcAddressList { get; set; }
  7794. // Source IP address type
  7795. [RosValue("src-address-type", CanUnset=true)]
  7796. public String SrcAddressType { get; set; }
  7797. // Source MAC address
  7798. [RosValue("src-mac-address", CanUnset=true)]
  7799. public String SrcMacAddress { get; set; }
  7800. // Source-port number
  7801. [RosValue("src-port", CanUnset=true)]
  7802. public String SrcPort { get; set; }
  7803. // TCP Maximum Segment Size value
  7804. [RosValue("tcp-mss", CanUnset=true)]
  7805. public String TcpMss { get; set; }
  7806. // Packet arrival time and date or locally generated packets departure time and date
  7807. [RosValue("time", CanUnset=true)]
  7808. public String Time { get; set; }
  7809. public struct ToAddressesType
  7810. {
  7811. public IPAddress Min { get; set; }
  7812. public IPAddress Max { get; set; }
  7813. public static ToAddressesType Parse(string str)
  7814. {
  7815. string[] strs = str.Split('-');
  7816. if (strs.Length == 2)
  7817. return new ToAddressesType() { Min = TypeFormatter.ConvertFromString<IPAddress>(strs[0], null), Max = TypeFormatter.ConvertFromString<IPAddress>(strs[1], null) };
  7818. else if (strs.Length == 1)
  7819. return new ToAddressesType() { Min = TypeFormatter.ConvertFromString<IPAddress>(strs[0], null) };
  7820. else
  7821. throw new InvalidOperationException();
  7822. }
  7823. public override string ToString()
  7824. {
  7825. if(Max != null)
  7826. return String.Concat(Min, '-', Max);
  7827. else
  7828. return Min.ToString();
  7829. }
  7830. }
  7831. // Address or address range to replace original address of an IP packet with
  7832. [RosValue("to-addresses", CanUnset=true)]
  7833. public ToAddressesType? ToAddresses { get; set; }
  7834. public struct ToPortsType
  7835. {
  7836. public Int32 Min { get; set; }
  7837. public Int32 Max { get; set; }
  7838. public static ToPortsType Parse(string str)
  7839. {
  7840. string[] strs = str.Split('-');
  7841. if (strs.Length == 2)
  7842. return new ToPortsType() { Min = TypeFormatter.ConvertFromString<Int32>(strs[0], null), Max = TypeFormatter.ConvertFromString<Int32>(strs[1], null) };
  7843. else if (strs.Length == 1)
  7844. return new ToPortsType() { Min = TypeFormatter.ConvertFromString<Int32>(strs[0], null) };
  7845. else
  7846. throw new InvalidOperationException();
  7847. }
  7848. public override string ToString()
  7849. {
  7850. if(Max != null)
  7851. return String.Concat(Min, '-', Max);
  7852. else
  7853. return Min.ToString();
  7854. }
  7855. }
  7856. // Port or port range to replace original port of an IP packet with
  7857. [RosValue("to-ports", CanUnset=true)]
  7858. public ToPortsType? ToPorts { get; set; }
  7859. [RosValue("ttl", CanUnset=true)]
  7860. public String Ttl { get; set; }
  7861. [RosValue("invalid", IsDynamic=true)]
  7862. public String Invalid { get; set; }
  7863. [RosValue("bytes", IsDynamic=true)]
  7864. public Int64? Bytes { get; set; }
  7865. [RosValue("dynamic", IsDynamic=true)]
  7866. public String Dynamic { get; set; }
  7867. [RosValue("packets", IsDynamic=true)]
  7868. public Int64? Packets { get; set; }
  7869. }
  7870. [RosObject("ip firewall service-port", CanSet=true, CanGet=true)]
  7871. public class IpFirewallServicePort : RosItemObject<IpFirewallServicePort>
  7872. {
  7873. // Defines whether item is ignored or used
  7874. [RosValue("disabled")]
  7875. public Boolean? Disabled { get; set; }
  7876. // Port number
  7877. [RosValue("ports")]
  7878. public Int32[] Ports { get; set; }
  7879. [RosValue("invalid", IsDynamic=true)]
  7880. public String Invalid { get; set; }
  7881. [RosValue("name", IsDynamic=true)]
  7882. public String Name { get; set; }
  7883. public static IpFirewallServicePort FtpServicePort
  7884. {
  7885. get { return new IpFirewallServicePort() { Id = 1 }; }
  7886. }
  7887. public static IpFirewallServicePort TftpServicePort
  7888. {
  7889. get { return new IpFirewallServicePort() { Id = 2 }; }
  7890. }
  7891. public static IpFirewallServicePort IrcServicePort
  7892. {
  7893. get { return new IpFirewallServicePort() { Id = 3 }; }
  7894. }
  7895. public static IpFirewallServicePort H323ServicePort
  7896. {
  7897. get { return new IpFirewallServicePort() { Id = 4 }; }
  7898. }
  7899. public static IpFirewallServicePort SipServicePort
  7900. {
  7901. get { return new IpFirewallServicePort() { Id = 5 }; }
  7902. }
  7903. public static IpFirewallServicePort PptpServicePort
  7904. {
  7905. get { return new IpFirewallServicePort() { Id = 6 }; }
  7906. }
  7907. public static IpFirewallServicePort Parse(string str, Connection conn)
  7908. {
  7909. if(string.IsNullOrEmpty(str))
  7910. return null;
  7911. IpFirewallServicePort obj = new IpFirewallServicePort();
  7912. obj.FindByName(conn, str);
  7913. return obj;
  7914. }
  7915. public override string ToString() { return Name.ToString(); }
  7916. }
  7917. [RosObject("ip hotspot", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  7918. public class IpHotspot : RosItemObject<IpHotspot>
  7919. {
  7920. // IP address pool name
  7921. [RosValue("address-pool")]
  7922. public String AddressPool { get; set; }
  7923. public enum AddressesPerMacEnum
  7924. {
  7925. [RosValue("unlimited")]
  7926. Unlimited,
  7927. }
  7928. // Maximum count of IP addresses for one MAC address
  7929. [RosValue("addresses-per-mac")]
  7930. public AddressesPerMacEnum? AddressesPerMac { get; set; }
  7931. // Defines whether item is ignored or used
  7932. [RosValue("disabled")]
  7933. public Boolean? Disabled { get; set; }
  7934. public enum SymbolicNamesEnum
  7935. {
  7936. [RosValue("none")]
  7937. None,
  7938. }
  7939. public struct IdleTimeoutType
  7940. {
  7941. private object value;
  7942. public SymbolicNamesEnum? SymbolicNames
  7943. {
  7944. get { return value as SymbolicNamesEnum?; }
  7945. set { this.value = value; }
  7946. }
  7947. public static implicit operator IdleTimeoutType(SymbolicNamesEnum? value)
  7948. {
  7949. return new IdleTimeoutType() { value = value };
  7950. }public TimeSpan? TimeInterval
  7951. {
  7952. get { return value as TimeSpan?; }
  7953. set { this.value = value; }
  7954. }
  7955. public static implicit operator IdleTimeoutType(TimeSpan? value)
  7956. {
  7957. return new IdleTimeoutType() { value = value };
  7958. }
  7959. public static IdleTimeoutType Parse(string str, Connection conn)
  7960. {
  7961. try { return new IdleTimeoutType() { value = TypeFormatter.ConvertFromString<SymbolicNamesEnum>(str, conn) }; }
  7962. catch(Exception) { }
  7963. try { return new IdleTimeoutType() { value = TypeFormatter.ConvertFromString<TimeSpan>(str, conn) }; }
  7964. catch(Exception) { }
  7965. throw new NotSupportedException();
  7966. }
  7967. public override string ToString() { return value != null ? value.ToString() : null; }
  7968. }
  7969. // Maximal period of inactivity for unauthorized clients
  7970. [RosValue("idle-timeout")]
  7971. public IdleTimeoutType? IdleTimeout { get; set; }
  7972. // Interface to run HotSpot service on
  7973. [RosValue("interface")]
  7974. public RouterOS.Interface Interface { get; set; }
  7975. public struct KeepaliveTimeoutType
  7976. {
  7977. private object value;
  7978. public SymbolicNamesEnum? SymbolicNames
  7979. {
  7980. get { return value as SymbolicNamesEnum?; }
  7981. set { this.value = value; }
  7982. }
  7983. public static implicit operator KeepaliveTimeoutType(SymbolicNamesEnum? value)
  7984. {
  7985. return new KeepaliveTimeoutType() { value = value };
  7986. }public TimeSpan? TimeInterval
  7987. {
  7988. get { return value as TimeSpan?; }
  7989. set { this.value = value; }
  7990. }
  7991. public static implicit operator KeepaliveTimeoutType(TimeSpan? value)
  7992. {
  7993. return new KeepaliveTimeoutType() { value = value };
  7994. }
  7995. public static KeepaliveTimeoutType Parse(string str, Connection conn)
  7996. {
  7997. try { return new KeepaliveTimeoutType() { value = TypeFormatter.ConvertFromString<SymbolicNamesEnum>(str, conn) }; }
  7998. catch(Exception) { }
  7999. try { return new KeepaliveTimeoutType() { value = TypeFormatter.ConvertFromString<TimeSpan>(str, conn) }; }
  8000. catch(Exception) { }
  8001. throw new NotSupportedException();
  8002. }
  8003. public override string ToString() { return value != null ? value.ToString() : null; }
  8004. }
  8005. // Keepalive timeout for unauthorized clients
  8006. [RosValue("keepalive-timeout")]
  8007. public KeepaliveTimeoutType? KeepaliveTimeout { get; set; }
  8008. // HotSpot name
  8009. [RosValue("name")]
  8010. public String Name { get; set; }
  8011. // Configuration for hotspot server
  8012. [RosValue("profile")]
  8013. public RouterOS.InterfaceWirelessSecurityProfiles Profile { get; set; }
  8014. [RosValue("invalid", IsDynamic=true)]
  8015. public String Invalid { get; set; }
  8016. [RosValue("ip-of-dns-name", IsDynamic=true)]
  8017. public IPAddress IpOfDnsName { get; set; }
  8018. [RosValue("proxy-status", IsDynamic=true)]
  8019. public String ProxyStatus { get; set; }
  8020. public static IpHotspot Parse(string str, Connection conn)
  8021. {
  8022. if(string.IsNullOrEmpty(str))
  8023. return null;
  8024. IpHotspot obj = new IpHotspot();
  8025. obj.FindByName(conn, str);
  8026. return obj;
  8027. }
  8028. public override string ToString() { return Name.ToString(); }
  8029. }
  8030. [RosObject("ip hotspot active", CanAdd=true, CanGet=true, CanRemove=true)]
  8031. public class IpHotspotActive : RosItemObject<IpHotspotActive>
  8032. {
  8033. [RosValue("address", IsDynamic=true)]
  8034. public IPAddress Address { get; set; }
  8035. public enum AdvertisementType
  8036. {
  8037. [RosValue("disabled")]
  8038. Disabled,
  8039. [RosValue("pending")]
  8040. Pending,
  8041. [RosValue("pending,block")]
  8042. PendingBlock,
  8043. [RosValue("sleeping")]
  8044. Sleeping,
  8045. }
  8046. [RosValue("advertisement", IsDynamic=true)]
  8047. public AdvertisementType? Advertisement { get; set; }
  8048. [RosValue("blocked", IsDynamic=true)]
  8049. public String Blocked { get; set; }
  8050. [RosValue("bytes-in", IsDynamic=true)]
  8051. public Int64? BytesIn { get; set; }
  8052. [RosValue("bytes-out", IsDynamic=true)]
  8053. public Int64? BytesOut { get; set; }
  8054. [RosValue("domain", IsDynamic=true)]
  8055. public String Domain { get; set; }
  8056. [RosValue("idle-time", IsDynamic=true)]
  8057. public TimeSpan? IdleTime { get; set; }
  8058. [RosValue("idle-timeout", IsDynamic=true)]
  8059. public TimeSpan? IdleTimeout { get; set; }
  8060. [RosValue("keepalive-timeout", IsDynamic=true)]
  8061. public TimeSpan? KeepaliveTimeout { get; set; }
  8062. [RosValue("limit-bytes-in", IsDynamic=true)]
  8063. public Int64? LimitBytesIn { get; set; }
  8064. [RosValue("limit-bytes-out", IsDynamic=true)]
  8065. public Int64? LimitBytesOut { get; set; }
  8066. [RosValue("limit-bytes-total", IsDynamic=true)]
  8067. public Int64? LimitBytesTotal { get; set; }
  8068. [RosValue("login-by", IsDynamic=true)]
  8069. public String LoginBy { get; set; }
  8070. [RosValue("mac-address", IsDynamic=true)]
  8071. public MACAddress? MacAddress { get; set; }
  8072. [RosValue("packets-in", IsDynamic=true)]
  8073. public Int64? PacketsIn { get; set; }
  8074. [RosValue("packets-out", IsDynamic=true)]
  8075. public Int64? PacketsOut { get; set; }
  8076. [RosValue("radius", IsDynamic=true)]
  8077. public String Radius { get; set; }
  8078. [RosValue("server", IsDynamic=true)]
  8079. public String Server { get; set; }
  8080. [RosValue("session-time-left", IsDynamic=true)]
  8081. public TimeSpan? SessionTimeLeft { get; set; }
  8082. [RosValue("uptime", IsDynamic=true)]
  8083. public TimeSpan? Uptime { get; set; }
  8084. [RosValue("user", IsDynamic=true)]
  8085. public String User { get; set; }
  8086. }
  8087. [RosObject("ip hotspot cookie", CanAdd=true, CanGet=true, CanRemove=true)]
  8088. public class IpHotspotCookie : RosItemObject<IpHotspotCookie>
  8089. {
  8090. [RosValue("domain", IsDynamic=true)]
  8091. public String Domain { get; set; }
  8092. [RosValue("expires-in", IsDynamic=true)]
  8093. public TimeSpan? ExpiresIn { get; set; }
  8094. [RosValue("mac-address", IsDynamic=true)]
  8095. public MACAddress? MacAddress { get; set; }
  8096. [RosValue("user", IsDynamic=true)]
  8097. public String User { get; set; }
  8098. }
  8099. [RosObject("ip hotspot host", CanGet=true, CanRemove=true)]
  8100. public class IpHotspotHost : RosItemObject<IpHotspotHost>
  8101. {
  8102. [RosValue("address", IsDynamic=true)]
  8103. public IPAddress Address { get; set; }
  8104. [RosValue("authorized", IsDynamic=true)]
  8105. public String Authorized { get; set; }
  8106. [RosValue("bridge-port", IsDynamic=true)]
  8107. public RouterOS.Interface BridgePort { get; set; }
  8108. [RosValue("bypassed", IsDynamic=true)]
  8109. public String Bypassed { get; set; }
  8110. [RosValue("bytes-in", IsDynamic=true)]
  8111. public Int64? BytesIn { get; set; }
  8112. [RosValue("bytes-out", IsDynamic=true)]
  8113. public Int64? BytesOut { get; set; }
  8114. [RosValue("comment", IsDynamic=true)]
  8115. public String Comment { get; set; }
  8116. [RosValue("dynamic", IsDynamic=true)]
  8117. public String Dynamic { get; set; }
  8118. [RosValue("found-by", IsDynamic=true)]
  8119. public String FoundBy { get; set; }
  8120. [RosValue("host-dead-time", IsDynamic=true)]
  8121. public TimeSpan? HostDeadTime { get; set; }
  8122. [RosValue("http-proxy", IsDynamic=true)]
  8123. public IPAddress HttpProxy { get; set; }
  8124. [RosValue("idle-time", IsDynamic=true)]
  8125. public TimeSpan? IdleTime { get; set; }
  8126. [RosValue("idle-timeout", IsDynamic=true)]
  8127. public TimeSpan? IdleTimeout { get; set; }
  8128. [RosValue("keepalive-timeout", IsDynamic=true)]
  8129. public TimeSpan? KeepaliveTimeout { get; set; }
  8130. [RosValue("mac-address", IsDynamic=true)]
  8131. public MACAddress? MacAddress { get; set; }
  8132. [RosValue("packets-in", IsDynamic=true)]
  8133. public Int64? PacketsIn { get; set; }
  8134. [RosValue("packets-out", IsDynamic=true)]
  8135. public Int64? PacketsOut { get; set; }
  8136. [RosValue("server", IsDynamic=true)]
  8137. public String Server { get; set; }
  8138. [RosValue("static", IsDynamic=true)]
  8139. public String Static { get; set; }
  8140. [RosValue("to-address", IsDynamic=true)]
  8141. public IPAddress ToAddress { get; set; }
  8142. [RosValue("uptime", IsDynamic=true)]
  8143. public TimeSpan? Uptime { get; set; }
  8144. }
  8145. [RosObject("ip hotspot ip-binding", CanAdd=true, CanSet=true, CanMove=true, CanGet=true, CanRemove=true)]
  8146. public class IpHotspotIpBinding : RosItemObject<IpHotspotIpBinding>
  8147. {
  8148. // IP address of client
  8149. [RosValue("address")]
  8150. public IPAddress Address { get; set; }
  8151. // Short description of the item
  8152. [RosValue("comment")]
  8153. public String Comment { get; set; }
  8154. // Defines whether item is ignored or used
  8155. [RosValue("disabled")]
  8156. public Boolean? Disabled { get; set; }
  8157. // MAC address of client
  8158. [RosValue("mac-address")]
  8159. public MACAddress? MacAddress { get; set; }
  8160. // The name of the server the client is connecting to
  8161. [RosValue("server")]
  8162. public String Server { get; set; }
  8163. // IP address to translate to
  8164. [RosValue("to-address")]
  8165. public IPAddress ToAddress { get; set; }
  8166. public enum TypeEnum
  8167. {
  8168. [RosValue("blocked")]
  8169. Blocked,
  8170. [RosValue("bypassed")]
  8171. Bypassed,
  8172. [RosValue("regular")]
  8173. Regular,
  8174. }
  8175. // Type of the static binding entry
  8176. [RosValue("type")]
  8177. public TypeEnum? Type { get; set; }
  8178. [RosValue("blocked", IsDynamic=true)]
  8179. public String Blocked { get; set; }
  8180. [RosValue("bypassed", IsDynamic=true)]
  8181. public String Bypassed { get; set; }
  8182. }
  8183. [RosObject("ip hotspot profile", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  8184. public class IpHotspotProfile : RosItemObject<IpHotspotProfile>
  8185. {
  8186. // DNS name of the HotSpot server
  8187. [RosValue("dns-name")]
  8188. public String DnsName { get; set; }
  8189. // IP address for HotSpot service
  8190. [RosValue("hotspot-address")]
  8191. public IPAddress HotspotAddress { get; set; }
  8192. // Name of the directory, which stores the HTML servlet pages
  8193. [RosValue("html-directory")]
  8194. public String HtmlDirectory { get; set; }
  8195. // Validity time of HTTP cookies
  8196. [RosValue("http-cookie-lifetime")]
  8197. public TimeSpan? HttpCookieLifetime { get; set; }
  8198. // IP of the proxy server the HotSpot service will use as a proxy server for all those clients configured to use some unknown proxy servers
  8199. [RosValue("http-proxy")]
  8200. public String HttpProxy { get; set; }
  8201. // Authentication method to use
  8202. [RosValue("login-by")]
  8203. public String LoginBy { get; set; }
  8204. [RosValue("mac-auth-password")]
  8205. public String MacAuthPassword { get; set; }
  8206. [RosValue("name")]
  8207. public String Name { get; set; }
  8208. [RosValue("nas-port-type")]
  8209. public String NasPortType { get; set; }
  8210. // Enable or disable accounting
  8211. [RosValue("radius-accounting")]
  8212. public Boolean? RadiusAccounting { get; set; }
  8213. [RosValue("radius-default-domain")]
  8214. public String RadiusDefaultDomain { get; set; }
  8215. public enum SymbolicNamesEnum
  8216. {
  8217. [RosValue("received")]
  8218. Received,
  8219. }
  8220. public struct RadiusInterimUpdateType
  8221. {
  8222. private object value;
  8223. public SymbolicNamesEnum? SymbolicNames
  8224. {
  8225. get { return value as SymbolicNamesEnum?; }
  8226. set { this.value = value; }
  8227. }
  8228. public static implicit operator RadiusInterimUpdateType(SymbolicNamesEnum? value)
  8229. {
  8230. return new RadiusInterimUpdateType() { value = value };
  8231. }public TimeSpan? TimeInterval
  8232. {
  8233. get { return value as TimeSpan?; }
  8234. set { this.value = value; }
  8235. }
  8236. public static implicit operator RadiusInterimUpdateType(TimeSpan? value)
  8237. {
  8238. return new RadiusInterimUpdateType() { value = value };
  8239. }
  8240. public static RadiusInterimUpdateType Parse(string str, Connection conn)
  8241. {
  8242. try { return new RadiusInterimUpdateType() { value = TypeFormatter.ConvertFromString<SymbolicNamesEnum>(str, conn) }; }
  8243. catch(Exception) { }
  8244. try { return new RadiusInterimUpdateType() { value = TypeFormatter.ConvertFromString<TimeSpan>(str, conn) }; }
  8245. catch(Exception) { }
  8246. throw new NotSupportedException();
  8247. }
  8248. public override string ToString() { return value != null ? value.ToString() : null; }
  8249. }
  8250. // Interim-Update time interval
  8251. [RosValue("radius-interim-update")]
  8252. public RadiusInterimUpdateType? RadiusInterimUpdate { get; set; }
  8253. [RosValue("radius-location-id")]
  8254. public String RadiusLocationId { get; set; }
  8255. [RosValue("radius-location-name")]
  8256. public String RadiusLocationName { get; set; }
  8257. [RosValue("radius-mac-format")]
  8258. public String RadiusMacFormat { get; set; }
  8259. // Data rate limitation
  8260. [RosValue("rate-limit")]
  8261. public String RateLimit { get; set; }
  8262. // Default SMTP server to be used to redirect unconditionally all user SMTP requests to
  8263. [RosValue("smtp-server")]
  8264. public IPAddress SmtpServer { get; set; }
  8265. // Whether to split username from domain name when the username is given in "user@domain" or in "domain\user" format
  8266. [RosValue("split-user-domain")]
  8267. public Boolean? SplitUserDomain { get; set; }
  8268. // Name of the SSL certificate to use for HTTPS authentication
  8269. [RosValue("ssl-certificate")]
  8270. public String SslCertificate { get; set; }
  8271. [RosValue("trial-uptime")]
  8272. public String TrialUptime { get; set; }
  8273. [RosValue("trial-user-profile")]
  8274. public RouterOS.InterfaceWirelessSecurityProfiles TrialUserProfile { get; set; }
  8275. // Use RADIUS for AAA
  8276. [RosValue("use-radius")]
  8277. public Boolean? UseRadius { get; set; }
  8278. [RosValue("default", IsDynamic=true)]
  8279. public String Default { get; set; }
  8280. public static IpHotspotProfile DefaultProfile
  8281. {
  8282. get { return new IpHotspotProfile() { Id = 0 }; }
  8283. }
  8284. public static IpHotspotProfile Parse(string str, Connection conn)
  8285. {
  8286. if(string.IsNullOrEmpty(str))
  8287. return null;
  8288. IpHotspotProfile obj = new IpHotspotProfile();
  8289. obj.FindByName(conn, str);
  8290. return obj;
  8291. }
  8292. public override string ToString() { return Name.ToString(); }
  8293. }
  8294. [RosObject("ip hotspot service-port", CanSet=true, CanGet=true)]
  8295. public class IpHotspotServicePort : RosItemObject<IpHotspotServicePort>
  8296. {
  8297. // Defines whether item is ignored or used
  8298. [RosValue("disabled")]
  8299. public Boolean? Disabled { get; set; }
  8300. // List of ports for this service
  8301. [RosValue("ports")]
  8302. public Int32[] Ports { get; set; }
  8303. [RosValue("name", IsDynamic=true)]
  8304. public String Name { get; set; }
  8305. public static IpHotspotServicePort FtpServicePort
  8306. {
  8307. get { return new IpHotspotServicePort() { Id = 1 }; }
  8308. }
  8309. public static IpHotspotServicePort Parse(string str, Connection conn)
  8310. {
  8311. if(string.IsNullOrEmpty(str))
  8312. return null;
  8313. IpHotspotServicePort obj = new IpHotspotServicePort();
  8314. obj.FindByName(conn, str);
  8315. return obj;
  8316. }
  8317. public override string ToString() { return Name.ToString(); }
  8318. }
  8319. [RosObject("ip hotspot user", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  8320. public class IpHotspotUser : RosItemObject<IpHotspotUser>
  8321. {
  8322. // Static IP address
  8323. [RosValue("address")]
  8324. public IPAddress Address { get; set; }
  8325. // Short description of the item
  8326. [RosValue("comment")]
  8327. public String Comment { get; set; }
  8328. // Defines whether item is ignored or used
  8329. [RosValue("disabled")]
  8330. public Boolean? Disabled { get; set; }
  8331. [RosValue("email")]
  8332. public String Email { get; set; }
  8333. // Total uploaded byte limit for user
  8334. [RosValue("limit-bytes-in")]
  8335. public Int64? LimitBytesIn { get; set; }
  8336. // Total downloaded byte limit for user
  8337. [RosValue("limit-bytes-out")]
  8338. public Int64? LimitBytesOut { get; set; }
  8339. // Total transferred byte limit for user
  8340. [RosValue("limit-bytes-total")]
  8341. public Int64? LimitBytesTotal { get; set; }
  8342. // Total uptime limit for user
  8343. [RosValue("limit-uptime")]
  8344. public TimeSpan? LimitUptime { get; set; }
  8345. // Static MAC address
  8346. [RosValue("mac-address")]
  8347. public MACAddress? MacAddress { get; set; }
  8348. // User name
  8349. [RosValue("name")]
  8350. public String Name { get; set; }
  8351. // User password
  8352. [RosValue("password")]
  8353. public String Password { get; set; }
  8354. // List of profiles for local HotSpot users
  8355. [RosValue("profile")]
  8356. public RouterOS.InterfaceWirelessSecurityProfiles Profile { get; set; }
  8357. // User routes
  8358. [RosValue("routes")]
  8359. public String Routes { get; set; }
  8360. // Which server is this user allowed to log in to
  8361. [RosValue("server")]
  8362. public String Server { get; set; }
  8363. [RosValue("bytes-in", IsDynamic=true)]
  8364. public Int64? BytesIn { get; set; }
  8365. [RosValue("bytes-out", IsDynamic=true)]
  8366. public Int64? BytesOut { get; set; }
  8367. [RosValue("dynamic", IsDynamic=true)]
  8368. public String Dynamic { get; set; }
  8369. [RosValue("packets-in", IsDynamic=true)]
  8370. public Int64? PacketsIn { get; set; }
  8371. [RosValue("packets-out", IsDynamic=true)]
  8372. public Int64? PacketsOut { get; set; }
  8373. [RosValue("uptime", IsDynamic=true)]
  8374. public TimeSpan? Uptime { get; set; }
  8375. public static IpHotspotUser Parse(string str, Connection conn)
  8376. {
  8377. if(string.IsNullOrEmpty(str))
  8378. return null;
  8379. IpHotspotUser obj = new IpHotspotUser();
  8380. obj.FindByName(conn, str);
  8381. return obj;
  8382. }
  8383. public override string ToString() { return Name.ToString(); }
  8384. }
  8385. [RosObject("ip hotspot user profile", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true, CanUnset=true)]
  8386. public class IpHotspotUserProfile : RosItemObject<IpHotspotUserProfile>
  8387. {
  8388. [RosValue("address-list")]
  8389. public String AddressList { get; set; }
  8390. // The IP poll name which the users will be given IP addresses from
  8391. [RosValue("address-pool")]
  8392. public String AddressPool { get; set; }
  8393. // Whether to enable forced advertisement popups for this profile
  8394. [RosValue("advertise")]
  8395. public Boolean? Advertise { get; set; }
  8396. // Set of intervals between showing advertisement popups
  8397. [RosValue("advertise-interval")]
  8398. public String AdvertiseInterval { get; set; }
  8399. public enum SymbolicNamesEnum
  8400. {
  8401. [RosValue("immediately")]
  8402. Immediately,
  8403. [RosValue("never")]
  8404. Never,
  8405. }
  8406. public struct AdvertiseTimeoutType
  8407. {
  8408. private object value;
  8409. public SymbolicNamesEnum? SymbolicNames
  8410. {
  8411. get { return value as SymbolicNamesEnum?; }
  8412. set { this.value = value; }
  8413. }
  8414. public static implicit operator AdvertiseTimeoutType(SymbolicNamesEnum? value)
  8415. {
  8416. return new AdvertiseTimeoutType() { value = value };
  8417. }public TimeSpan? TimeInterval
  8418. {
  8419. get { return value as TimeSpan?; }
  8420. set { this.value = value; }
  8421. }
  8422. public static implicit operator AdvertiseTimeoutType(TimeSpan? value)
  8423. {
  8424. return new AdvertiseTimeoutType() { value = value };
  8425. }
  8426. public static AdvertiseTimeoutType Parse(string str, Connection conn)
  8427. {
  8428. try { return new AdvertiseTimeoutType() { value = TypeFormatter.ConvertFromString<SymbolicNamesEnum>(str, conn) }; }
  8429. catch(Exception) { }
  8430. try { return new AdvertiseTimeoutType() { value = TypeFormatter.ConvertFromString<TimeSpan>(str, conn) }; }
  8431. catch(Exception) { }
  8432. throw new NotSupportedException();
  8433. }
  8434. public override string ToString() { return value != null ? value.ToString() : null; }
  8435. }
  8436. // How long to wait for advertisement to be shown, before blocking network access with walled-garden
  8437. [RosValue("advertise-timeout")]
  8438. public AdvertiseTimeoutType? AdvertiseTimeout { get; set; }
  8439. // List of URLs to show as advertisement popups
  8440. [RosValue("advertise-url")]
  8441. public String AdvertiseUrl { get; set; }
  8442. public struct IdleTimeoutType
  8443. {
  8444. private object value;
  8445. public SymbolicNamesEnum? SymbolicNames
  8446. {
  8447. get { return value as SymbolicNamesEnum?; }
  8448. set { this.value = value; }
  8449. }
  8450. public static implicit operator IdleTimeoutType(SymbolicNamesEnum? value)
  8451. {
  8452. return new IdleTimeoutType() { value = value };
  8453. }public TimeSpan? TimeInterval
  8454. {
  8455. get { return value as TimeSpan?; }
  8456. set { this.value = value; }
  8457. }
  8458. public static implicit operator IdleTimeoutType(TimeSpan? value)
  8459. {
  8460. return new IdleTimeoutType() { value = value };
  8461. }
  8462. public static IdleTimeoutType Parse(string str, Connection conn)
  8463. {
  8464. try { return new IdleTimeoutType() { value = TypeFormatter.ConvertFromString<SymbolicNamesEnum>(str, conn) }; }
  8465. catch(Exception) { }
  8466. try { return new IdleTimeoutType() { value = TypeFormatter.ConvertFromString<TimeSpan>(str, conn) }; }
  8467. catch(Exception) { }
  8468. throw new NotSupportedException();
  8469. }
  8470. public override string ToString() { return value != null ? value.ToString() : null; }
  8471. }
  8472. // Maximal period of inactivity for authorized clients
  8473. [RosValue("idle-timeout", CanUnset=true)]
  8474. public IdleTimeoutType? IdleTimeout { get; set; }
  8475. // Name of the firewall chain applied to incoming packets of the users of this profile
  8476. [RosValue("incoming-filter")]
  8477. public String IncomingFilter { get; set; }
  8478. // packet mark put on all the packets from every user of this profile automatically
  8479. [RosValue("incoming-packet-mark")]
  8480. public String IncomingPacketMark { get; set; }
  8481. public struct KeepaliveTimeoutType
  8482. {
  8483. private object value;
  8484. public SymbolicNamesEnum? SymbolicNames
  8485. {
  8486. get { return value as SymbolicNamesEnum?; }
  8487. set { this.value = value; }
  8488. }
  8489. public static implicit operator KeepaliveTimeoutType(SymbolicNamesEnum? value)
  8490. {
  8491. return new KeepaliveTimeoutType() { value = value };
  8492. }public TimeSpan? TimeInterval
  8493. {
  8494. get { return value as TimeSpan?; }
  8495. set { this.value = value; }
  8496. }
  8497. public static implicit operator KeepaliveTimeoutType(TimeSpan? value)
  8498. {
  8499. return new KeepaliveTimeoutType() { value = value };
  8500. }
  8501. public static KeepaliveTimeoutType Parse(string str, Connection conn)
  8502. {
  8503. try { return new KeepaliveTimeoutType() { value = TypeFormatter.ConvertFromString<SymbolicNamesEnum>(str, conn) }; }
  8504. catch(Exception) { }
  8505. try { return new KeepaliveTimeoutType() { value = TypeFormatter.ConvertFromString<TimeSpan>(str, conn) }; }
  8506. catch(Exception) { }
  8507. throw new NotSupportedException();
  8508. }
  8509. public override string ToString() { return value != null ? value.ToString() : null; }
  8510. }
  8511. // Keepalive timeout for authorized clients
  8512. [RosValue("keepalive-timeout", CanUnset=true)]
  8513. public KeepaliveTimeoutType? KeepaliveTimeout { get; set; }
  8514. // Profile reference name
  8515. [RosValue("name")]
  8516. public String Name { get; set; }
  8517. // script name to launch after a user has logged in
  8518. [RosValue("on-login")]
  8519. public String OnLogin { get; set; }
  8520. // script name to launch after a user has logged out
  8521. [RosValue("on-logout")]
  8522. public String OnLogout { get; set; }
  8523. public enum OpenStatusPageEnum
  8524. {
  8525. [RosValue("always")]
  8526. Always,
  8527. [RosValue("http-login")]
  8528. HttpLogin,
  8529. }
  8530. // Whether to show status page also for users authenticated using mac login method
  8531. [RosValue("open-status-page")]
  8532. public OpenStatusPageEnum? OpenStatusPage { get; set; }
  8533. // Name of the firewall chain applied to outgoing packets from the users of this profile
  8534. [RosValue("outgoing-filter")]
  8535. public String OutgoingFilter { get; set; }
  8536. // packet mark put on all the packets to every user of this profile automatically
  8537. [RosValue("outgoing-packet-mark")]
  8538. public String OutgoingPacketMark { get; set; }
  8539. // Data rate limitation
  8540. [RosValue("rate-limit")]
  8541. public String RateLimit { get; set; }
  8542. // Maximal allowed session time for the client
  8543. [RosValue("session-timeout")]
  8544. public TimeSpan? SessionTimeout { get; set; }
  8545. public enum SharedUsersEnum
  8546. {
  8547. [RosValue("unlimited")]
  8548. Unlimited,
  8549. }
  8550. // Maximal number of simultaneously logged in users with the same username
  8551. [RosValue("shared-users")]
  8552. public SharedUsersEnum? SharedUsers { get; set; }
  8553. public struct StatusAutorefreshType
  8554. {
  8555. private object value;
  8556. public SymbolicNamesEnum? SymbolicNames
  8557. {
  8558. get { return value as SymbolicNamesEnum?; }
  8559. set { this.value = value; }
  8560. }
  8561. public static implicit operator StatusAutorefreshType(SymbolicNamesEnum? value)
  8562. {
  8563. return new StatusAutorefreshType() { value = value };
  8564. }public TimeSpan? TimeInterval
  8565. {
  8566. get { return value as TimeSpan?; }
  8567. set { this.value = value; }
  8568. }
  8569. public static implicit operator StatusAutorefreshType(TimeSpan? value)
  8570. {
  8571. return new StatusAutorefreshType() { value = value };
  8572. }
  8573. public static StatusAutorefreshType Parse(string str, Connection conn)
  8574. {
  8575. try { return new StatusAutorefreshType() { value = TypeFormatter.ConvertFromString<SymbolicNamesEnum>(str, conn) }; }
  8576. catch(Exception) { }
  8577. try { return new StatusAutorefreshType() { value = TypeFormatter.ConvertFromString<TimeSpan>(str, conn) }; }
  8578. catch(Exception) { }
  8579. throw new NotSupportedException();
  8580. }
  8581. public override string ToString() { return value != null ? value.ToString() : null; }
  8582. }
  8583. // HotSpot servlet status page autorefresh interval
  8584. [RosValue("status-autorefresh")]
  8585. public StatusAutorefreshType? StatusAutorefresh { get; set; }
  8586. // Whether to use transparent HTTP proxy for the authorized users of this profile
  8587. [RosValue("transparent-proxy")]
  8588. public Boolean? TransparentProxy { get; set; }
  8589. [RosValue("default", IsDynamic=true)]
  8590. public String Default { get; set; }
  8591. public static IpHotspotUserProfile DefaultProfile
  8592. {
  8593. get { return new IpHotspotUserProfile() { Id = 0 }; }
  8594. }
  8595. public static IpHotspotUserProfile Parse(string str, Connection conn)
  8596. {
  8597. if(string.IsNullOrEmpty(str))
  8598. return null;
  8599. IpHotspotUserProfile obj = new IpHotspotUserProfile();
  8600. obj.FindByName(conn, str);
  8601. return obj;
  8602. }
  8603. public override string ToString() { return Name.ToString(); }
  8604. }
  8605. [RosObject("ip hotspot walled-garden", CanAdd=true, CanSet=true, CanMove=true, CanGet=true, CanRemove=true, CanUnset=true)]
  8606. public class IpHotspotWalledGarden : RosItemObject<IpHotspotWalledGarden>
  8607. {
  8608. public enum ActionEnum
  8609. {
  8610. [RosValue("deny")]
  8611. Deny,
  8612. [RosValue("allow")]
  8613. Allow,
  8614. }
  8615. // Rule action
  8616. [RosValue("action")]
  8617. public ActionEnum? Action { get; set; }
  8618. // Short description of the item
  8619. [RosValue("comment")]
  8620. public String Comment { get; set; }
  8621. // Defines whether item is ignored or used
  8622. [RosValue("disabled")]
  8623. public Boolean? Disabled { get; set; }
  8624. // For example, "(^
  8625. [RosValue("dst-host", CanUnset=true)]
  8626. public String DstHost { get; set; }
  8627. // TCP destination port
  8628. [RosValue("dst-port")]
  8629. public String DstPort { get; set; }
  8630. // HTTP method of the request
  8631. [RosValue("method", CanUnset=true)]
  8632. public String Method { get; set; }
  8633. // Regex of requested path on dst-host
  8634. [RosValue("path", CanUnset=true)]
  8635. public String Path { get; set; }
  8636. // Name of the HotSpot server this rule appliet to
  8637. [RosValue("server", CanUnset=true)]
  8638. public String Server { get; set; }
  8639. // IP address of the user sending the request
  8640. [RosValue("src-address", CanUnset=true)]
  8641. public String SrcAddress { get; set; }
  8642. [RosValue("dst-address", CanUnset=true)]
  8643. public String DstAddress { get; set; }
  8644. [RosValue("dynamic", IsDynamic=true)]
  8645. public String Dynamic { get; set; }
  8646. [RosValue("hits", IsDynamic=true)]
  8647. public Int32? Hits { get; set; }
  8648. }
  8649. [RosObject("ip hotspot walled-garden ip", CanAdd=true, CanSet=true, CanMove=true, CanGet=true, CanRemove=true, CanUnset=true)]
  8650. public class IpHotspotWalledGardenIp : RosItemObject<IpHotspotWalledGardenIp>
  8651. {
  8652. public enum ActionEnum
  8653. {
  8654. [RosValue("accept")]
  8655. Accept,
  8656. [RosValue("drop")]
  8657. Drop,
  8658. [RosValue("reject")]
  8659. Reject,
  8660. }
  8661. // Action to undertake if a packet matches the rule
  8662. [RosValue("action")]
  8663. public ActionEnum? Action { get; set; }
  8664. // Short description of the item
  8665. [RosValue("comment")]
  8666. public String Comment { get; set; }
  8667. // Defines whether item is ignored or used
  8668. [RosValue("disabled")]
  8669. public Boolean? Disabled { get; set; }
  8670. // IP address of the destination web server
  8671. [RosValue("dst-address", CanUnset=true)]
  8672. public String DstAddress { get; set; }
  8673. // Domain name of the destination web server
  8674. [RosValue("dst-host")]
  8675. public String DstHost { get; set; }
  8676. // The TCP or UDP port a client has send the request to
  8677. [RosValue("dst-port", CanUnset=true)]
  8678. public String DstPort { get; set; }
  8679. // IP protocol name
  8680. [RosValue("protocol", CanUnset=true)]
  8681. public String Protocol { get; set; }
  8682. // Name of the HotSpot server this rule appliet to
  8683. [RosValue("server", CanUnset=true)]
  8684. public String Server { get; set; }
  8685. // IP address of the user sending the request
  8686. [RosValue("src-address", CanUnset=true)]
  8687. public String SrcAddress { get; set; }
  8688. [RosValue("invalid", IsDynamic=true)]
  8689. public String Invalid { get; set; }
  8690. }
  8691. [RosObject("ip ipsec installed-sa", CanSet=true, CanGet=true)]
  8692. public class IpIpsecInstalledSa : RosItemObject<IpIpsecInstalledSa>
  8693. {
  8694. // Expiration time counted from installation of SA
  8695. [RosValue("add-lifetime")]
  8696. public String AddLifetime { get; set; }
  8697. [RosValue("addtime")]
  8698. public DateTime? Addtime { get; set; }
  8699. public enum AuthAlgorithmEnum
  8700. {
  8701. [RosValue("md5")]
  8702. Md5,
  8703. [RosValue("none")]
  8704. None,
  8705. [RosValue("sha1")]
  8706. Sha1,
  8707. }
  8708. // Authentication algorithm
  8709. [RosValue("auth-algorithm")]
  8710. public AuthAlgorithmEnum? AuthAlgorithm { get; set; }
  8711. // Authentication key
  8712. [RosValue("auth-key")]
  8713. public String AuthKey { get; set; }
  8714. // Amount of data processed by this SA's crypto algorithms
  8715. [RosValue("current-bytes")]
  8716. public Int32? CurrentBytes { get; set; }
  8717. public struct DstAddressType
  8718. {
  8719. private object value;
  8720. public IPv6Address Ipv6
  8721. {
  8722. get { return value as IPv6Address; }
  8723. set { this.value = value; }
  8724. }
  8725. public static implicit operator DstAddressType(IPv6Address value)
  8726. {
  8727. return new DstAddressType() { value = value };
  8728. }public IPAddress Ip
  8729. {
  8730. get { return value as IPAddress; }
  8731. set { this.value = value; }
  8732. }
  8733. public static implicit operator DstAddressType(IPAddress value)
  8734. {
  8735. return new DstAddressType() { value = value };
  8736. }
  8737. public static DstAddressType Parse(string str, Connection conn)
  8738. {
  8739. try { return new DstAddressType() { value = TypeFormatter.ConvertFromString<IPv6Address>(str, conn) }; }
  8740. catch(Exception) { }
  8741. try { return new DstAddressType() { value = TypeFormatter.ConvertFromString<IPAddress>(str, conn) }; }
  8742. catch(Exception) { }
  8743. throw new NotSupportedException();
  8744. }
  8745. public override string ToString() { return value != null ? value.ToString() : null; }
  8746. }
  8747. // Destination of SA from policy configuration
  8748. [RosValue("dst-address")]
  8749. public DstAddressType? DstAddress { get; set; }
  8750. public enum EncAlgorithmEnum
  8751. {
  8752. [RosValue("3des")]
  8753. E3des,
  8754. [RosValue("aes")]
  8755. Aes,
  8756. [RosValue("blowfish")]
  8757. Blowfish,
  8758. [RosValue("camellia")]
  8759. Camellia,
  8760. [RosValue("des")]
  8761. Des,
  8762. [RosValue("null")]
  8763. Null,
  8764. }
  8765. // Encryption algorithm
  8766. [RosValue("enc-algorithm")]
  8767. public EncAlgorithmEnum? EncAlgorithm { get; set; }
  8768. // Encryption key
  8769. [RosValue("enc-key")]
  8770. public String EncKey { get; set; }
  8771. public struct LifebytesType
  8772. {
  8773. public Int32 Soft { get; set; }
  8774. public Int32 Hard { get; set; }
  8775. public static LifebytesType Parse(string str)
  8776. {
  8777. string[] strs = str.Split('/');
  8778. if (strs.Length == 2)
  8779. return new LifebytesType() { Soft = TypeFormatter.ConvertFromString<Int32>(strs[0], null), Hard = TypeFormatter.ConvertFromString<Int32>(strs[1], null) };
  8780. else
  8781. throw new InvalidOperationException();
  8782. }
  8783. public override string ToString()
  8784. {
  8785. return String.Concat(Soft, '/', Hard);
  8786. }
  8787. }
  8788. // Expiration threshold for amount of processed data
  8789. [RosValue("lifebytes")]
  8790. public LifebytesType? Lifebytes { get; set; }
  8791. // Size of replay window in bytes
  8792. [RosValue("replay")]
  8793. public Int32? Replay { get; set; }
  8794. // SPI value of SA in hexadecimal
  8795. [RosValue("spi")]
  8796. public Int32? Spi { get; set; }
  8797. public struct SrcAddressType
  8798. {
  8799. private object value;
  8800. public IPv6Address Ipv6
  8801. {
  8802. get { return value as IPv6Address; }
  8803. set { this.value = value; }
  8804. }
  8805. public static implicit operator SrcAddressType(IPv6Address value)
  8806. {
  8807. return new SrcAddressType() { value = value };
  8808. }public IPAddress Ip
  8809. {
  8810. get { return value as IPAddress; }
  8811. set { this.value = value; }
  8812. }
  8813. public static implicit operator SrcAddressType(IPAddress value)
  8814. {
  8815. return new SrcAddressType() { value = value };
  8816. }
  8817. public static SrcAddressType Parse(string str, Connection conn)
  8818. {
  8819. try { return new SrcAddressType() { value = TypeFormatter.ConvertFromString<IPv6Address>(str, conn) }; }
  8820. catch(Exception) { }
  8821. try { return new SrcAddressType() { value = TypeFormatter.ConvertFromString<IPAddress>(str, conn) }; }
  8822. catch(Exception) { }
  8823. throw new NotSupportedException();
  8824. }
  8825. public override string ToString() { return value != null ? value.ToString() : null; }
  8826. }
  8827. // Source of SA fro policy configuration
  8828. [RosValue("src-address")]
  8829. public SrcAddressType? SrcAddress { get; set; }
  8830. public enum StateEnum
  8831. {
  8832. [RosValue("dead")]
  8833. Dead,
  8834. [RosValue("dying")]
  8835. Dying,
  8836. [RosValue("larval")]
  8837. Larval,
  8838. [RosValue("mature")]
  8839. Mature,
  8840. }
  8841. // State of the SA
  8842. [RosValue("state")]
  8843. public StateEnum? State { get; set; }
  8844. // Expiration time counter from the first use of SA
  8845. [RosValue("use-lifetime")]
  8846. public String UseLifetime { get; set; }
  8847. [RosValue("usetime")]
  8848. public DateTime? Usetime { get; set; }
  8849. [RosValue("pfs", IsDynamic=true)]
  8850. public String Pfs { get; set; }
  8851. }
  8852. [RosObject("ip ipsec peer", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  8853. public class IpIpsecPeer : RosItemObject<IpIpsecPeer>
  8854. {
  8855. // Address of the remote router
  8856. [RosValue("address")]
  8857. public String Address { get; set; }
  8858. public enum AuthMethodEnum
  8859. {
  8860. [RosValue("pre-shared-key")]
  8861. PreSharedKey,
  8862. [RosValue("rsa-signature")]
  8863. RsaSignature,
  8864. }
  8865. [RosValue("auth-method")]
  8866. public AuthMethodEnum? AuthMethod { get; set; }
  8867. [RosValue("certificate")]
  8868. public String Certificate { get; set; }
  8869. // Short description of the item
  8870. [RosValue("comment")]
  8871. public String Comment { get; set; }
  8872. public enum DhGroupEnum
  8873. {
  8874. [RosValue("ec2n155")]
  8875. Ec2n155,
  8876. [RosValue("ec2n185")]
  8877. Ec2n185,
  8878. [RosValue("modp1024")]
  8879. Modp1024,
  8880. [RosValue("modp1536")]
  8881. Modp1536,
  8882. [RosValue("modp768")]
  8883. Modp768,
  8884. }
  8885. // Diffie-Hellman key exchange protocol group
  8886. [RosValue("dh-group")]
  8887. public DhGroupEnum? DhGroup { get; set; }
  8888. // Defines whether item is ignored or used
  8889. [RosValue("disabled")]
  8890. public Boolean? Disabled { get; set; }
  8891. public enum SpecialEnum
  8892. {
  8893. [RosValue("disable-dpd")]
  8894. DisableDpd,
  8895. }
  8896. public enum DpdIntervalEnum
  8897. {
  8898. [RosValue("Num")]
  8899. Num,
  8900. }
  8901. public struct DpdIntervalType
  8902. {
  8903. private object value;
  8904. public SpecialEnum? Special
  8905. {
  8906. get { return value as SpecialEnum?; }
  8907. set { this.value = value; }
  8908. }
  8909. public static implicit operator DpdIntervalType(SpecialEnum? value)
  8910. {
  8911. return new DpdIntervalType() { value = value };
  8912. }public DpdIntervalEnum? State
  8913. {
  8914. get { return value as DpdIntervalEnum?; }
  8915. set { this.value = value; }
  8916. }
  8917. public static implicit operator DpdIntervalType(DpdIntervalEnum? value)
  8918. {
  8919. return new DpdIntervalType() { value = value };
  8920. }
  8921. public static DpdIntervalType Parse(string str, Connection conn)
  8922. {
  8923. try { return new DpdIntervalType() { value = TypeFormatter.ConvertFromString<SpecialEnum>(str, conn) }; }
  8924. catch(Exception) { }
  8925. try { return new DpdIntervalType() { value = TypeFormatter.ConvertFromString<DpdIntervalEnum>(str, conn) }; }
  8926. catch(Exception) { }
  8927. throw new NotSupportedException();
  8928. }
  8929. public override string ToString() { return value != null ? value.ToString() : null; }
  8930. }
  8931. [RosValue("dpd-interval")]
  8932. public DpdIntervalType? DpdInterval { get; set; }
  8933. [RosValue("dpd-maximum-failures")]
  8934. public Int32? DpdMaximumFailures { get; set; }
  8935. public enum EncAlgorithmEnum
  8936. {
  8937. [RosValue("3des")]
  8938. E3des,
  8939. [RosValue("aes-128")]
  8940. Aes128,
  8941. [RosValue("aes-192")]
  8942. Aes192,
  8943. [RosValue("aes-256")]
  8944. Aes256,
  8945. [RosValue("blowfish")]
  8946. Blowfish,
  8947. }
  8948. // Encryption algorithm
  8949. [RosValue("enc-algorithm")]
  8950. public EncAlgorithmEnum? EncAlgorithm { get; set; }
  8951. public enum ExchangeModeEnum
  8952. {
  8953. [RosValue("aggressive")]
  8954. Aggressive,
  8955. [RosValue("base")]
  8956. Base,
  8957. [RosValue("main")]
  8958. Main,
  8959. }
  8960. // Exchange mode
  8961. [RosValue("exchange-mode")]
  8962. public ExchangeModeEnum? ExchangeMode { get; set; }
  8963. // Generate policy
  8964. [RosValue("generate-policy")]
  8965. public Boolean? GeneratePolicy { get; set; }
  8966. public enum HashAlgorithmEnum
  8967. {
  8968. [RosValue("md5")]
  8969. Md5,
  8970. [RosValue("sha1")]
  8971. Sha1,
  8972. }
  8973. // Hashing algorithm
  8974. [RosValue("hash-algorithm")]
  8975. public HashAlgorithmEnum? HashAlgorithm { get; set; }
  8976. // Expiration threshold for amount of processed data
  8977. [RosValue("lifebytes")]
  8978. public Int32? Lifebytes { get; set; }
  8979. // Expiration time counter from the first use of SA
  8980. [RosValue("lifetime")]
  8981. public TimeSpan? Lifetime { get; set; }
  8982. [RosValue("my-id-user-fqdn")]
  8983. public String MyIdUserFqdn { get; set; }
  8984. [RosValue("nat-traversal")]
  8985. public Boolean? NatTraversal { get; set; }
  8986. [RosValue("port")]
  8987. public Int32? Port { get; set; }
  8988. public enum ProposalCheckEnum
  8989. {
  8990. [RosValue("claim")]
  8991. Claim,
  8992. [RosValue("exact")]
  8993. Exact,
  8994. [RosValue("obey")]
  8995. Obey,
  8996. [RosValue("strict")]
  8997. Strict,
  8998. }
  8999. // Lifetime check logic
  9000. [RosValue("proposal-check")]
  9001. public ProposalCheckEnum? ProposalCheck { get; set; }
  9002. [RosValue("remote-certificate")]
  9003. public String RemoteCertificate { get; set; }
  9004. // Secret string
  9005. [RosValue("secret")]
  9006. public String Secret { get; set; }
  9007. // Send or not initial contact
  9008. [RosValue("send-initial-contact")]
  9009. public Boolean? SendInitialContact { get; set; }
  9010. }
  9011. [RosObject("ip ipsec policy", CanAdd=true, CanSet=true, CanMove=true, CanGet=true, CanRemove=true)]
  9012. public class IpIpsecPolicy : RosItemObject<IpIpsecPolicy>
  9013. {
  9014. public enum ActionEnum
  9015. {
  9016. [RosValue("discard")]
  9017. Discard,
  9018. [RosValue("encrypt")]
  9019. Encrypt,
  9020. [RosValue("none")]
  9021. None,
  9022. }
  9023. // Action type
  9024. [RosValue("action")]
  9025. public ActionEnum? Action { get; set; }
  9026. // Short description of the item
  9027. [RosValue("comment")]
  9028. public String Comment { get; set; }
  9029. // Defines whether item is ignored or used
  9030. [RosValue("disabled")]
  9031. public Boolean? Disabled { get; set; }
  9032. // Destination IP address
  9033. [RosValue("dst-address")]
  9034. public String DstAddress { get; set; }
  9035. public enum DstPortEnum
  9036. {
  9037. [RosValue("any")]
  9038. Any,
  9039. }
  9040. public struct DstPortType
  9041. {
  9042. private object value;
  9043. public Int32? Num
  9044. {
  9045. get { return value as Int32?; }
  9046. set { this.value = value; }
  9047. }
  9048. public static implicit operator DstPortType(Int32? value)
  9049. {
  9050. return new DstPortType() { value = value };
  9051. }public DstPortEnum? State
  9052. {
  9053. get { return value as DstPortEnum?; }
  9054. set { this.value = value; }
  9055. }
  9056. public static implicit operator DstPortType(DstPortEnum? value)
  9057. {
  9058. return new DstPortType() { value = value };
  9059. }
  9060. public static DstPortType Parse(string str, Connection conn)
  9061. {
  9062. try { return new DstPortType() { value = TypeFormatter.ConvertFromString<Int32>(str, conn) }; }
  9063. catch(Exception) { }
  9064. try { return new DstPortType() { value = TypeFormatter.ConvertFromString<DstPortEnum>(str, conn) }; }
  9065. catch(Exception) { }
  9066. throw new NotSupportedException();
  9067. }
  9068. public override string ToString() { return value != null ? value.ToString() : null; }
  9069. }
  9070. [RosValue("dst-port")]
  9071. public DstPortType? DstPort { get; set; }
  9072. // IP security protocols
  9073. [RosValue("ipsec-protocols")]
  9074. public String IpsecProtocols { get; set; }
  9075. public enum LevelEnum
  9076. {
  9077. [RosValue("require")]
  9078. Require,
  9079. [RosValue("unique")]
  9080. Unique,
  9081. [RosValue("use")]
  9082. Use,
  9083. }
  9084. // What to do if some of the SAs for this policy cannot be found
  9085. [RosValue("level")]
  9086. public LevelEnum? Level { get; set; }
  9087. [RosValue("priority")]
  9088. public String Priority { get; set; }
  9089. // Name of the proposal info
  9090. [RosValue("proposal")]
  9091. public RouterOS.InterfaceWirelessSecurityProfiles Proposal { get; set; }
  9092. public enum ProtocolEnum
  9093. {
  9094. [RosValue("all")]
  9095. All,
  9096. [RosValue("egp")]
  9097. Egp,
  9098. [RosValue("ggp")]
  9099. Ggp,
  9100. [RosValue("icmp")]
  9101. Icmp,
  9102. [RosValue("igmp")]
  9103. Igmp,
  9104. [RosValue("ip-encap")]
  9105. IpEncap,
  9106. [RosValue("ip-sec")]
  9107. IpSec,
  9108. [RosValue("tcp")]
  9109. Tcp,
  9110. [RosValue("udp")]
  9111. Udp,
  9112. }
  9113. // Name or number of the protocol
  9114. [RosValue("protocol")]
  9115. public ProtocolEnum? Protocol { get; set; }
  9116. public struct SaDstAddressType
  9117. {
  9118. private object value;
  9119. public IPv6Address Ipv6
  9120. {
  9121. get { return value as IPv6Address; }
  9122. set { this.value = value; }
  9123. }
  9124. public static implicit operator SaDstAddressType(IPv6Address value)
  9125. {
  9126. return new SaDstAddressType() { value = value };
  9127. }public IPAddress Ip
  9128. {
  9129. get { return value as IPAddress; }
  9130. set { this.value = value; }
  9131. }
  9132. public static implicit operator SaDstAddressType(IPAddress value)
  9133. {
  9134. return new SaDstAddressType() { value = value };
  9135. }
  9136. public static SaDstAddressType Parse(string str, Connection conn)
  9137. {
  9138. try { return new SaDstAddressType() { value = TypeFormatter.ConvertFromString<IPv6Address>(str, conn) }; }
  9139. catch(Exception) { }
  9140. try { return new SaDstAddressType() { value = TypeFormatter.ConvertFromString<IPAddress>(str, conn) }; }
  9141. catch(Exception) { }
  9142. throw new NotSupportedException();
  9143. }
  9144. public override string ToString() { return value != null ? value.ToString() : null; }
  9145. }
  9146. // SA destination
  9147. [RosValue("sa-dst-address")]
  9148. public SaDstAddressType? SaDstAddress { get; set; }
  9149. public struct SaSrcAddressType
  9150. {
  9151. private object value;
  9152. public IPv6Address Ipv6
  9153. {
  9154. get { return value as IPv6Address; }
  9155. set { this.value = value; }
  9156. }
  9157. public static implicit operator SaSrcAddressType(IPv6Address value)
  9158. {
  9159. return new SaSrcAddressType() { value = value };
  9160. }public IPAddress Ip
  9161. {
  9162. get { return value as IPAddress; }
  9163. set { this.value = value; }
  9164. }
  9165. public static implicit operator SaSrcAddressType(IPAddress value)
  9166. {
  9167. return new SaSrcAddressType() { value = value };
  9168. }
  9169. public static SaSrcAddressType Parse(string str, Connection conn)
  9170. {
  9171. try { return new SaSrcAddressType() { value = TypeFormatter.ConvertFromString<IPv6Address>(str, conn) }; }
  9172. catch(Exception) { }
  9173. try { return new SaSrcAddressType() { value = TypeFormatter.ConvertFromString<IPAddress>(str, conn) }; }
  9174. catch(Exception) { }
  9175. throw new NotSupportedException();
  9176. }
  9177. public override string ToString() { return value != null ? value.ToString() : null; }
  9178. }
  9179. // SA source
  9180. [RosValue("sa-src-address")]
  9181. public SaSrcAddressType? SaSrcAddress { get; set; }
  9182. // Source IP address
  9183. [RosValue("src-address")]
  9184. public String SrcAddress { get; set; }
  9185. public enum SrcPortEnum
  9186. {
  9187. [RosValue("any")]
  9188. Any,
  9189. }
  9190. public struct SrcPortType
  9191. {
  9192. private object value;
  9193. public Int32? Num
  9194. {
  9195. get { return value as Int32?; }
  9196. set { this.value = value; }
  9197. }
  9198. public static implicit operator SrcPortType(Int32? value)
  9199. {
  9200. return new SrcPortType() { value = value };
  9201. }public SrcPortEnum? State
  9202. {
  9203. get { return value as SrcPortEnum?; }
  9204. set { this.value = value; }
  9205. }
  9206. public static implicit operator SrcPortType(SrcPortEnum? value)
  9207. {
  9208. return new SrcPortType() { value = value };
  9209. }
  9210. public static SrcPortType Parse(string str, Connection conn)
  9211. {
  9212. try { return new SrcPortType() { value = TypeFormatter.ConvertFromString<Int32>(str, conn) }; }
  9213. catch(Exception) { }
  9214. try { return new SrcPortType() { value = TypeFormatter.ConvertFromString<SrcPortEnum>(str, conn) }; }
  9215. catch(Exception) { }
  9216. throw new NotSupportedException();
  9217. }
  9218. public override string ToString() { return value != null ? value.ToString() : null; }
  9219. }
  9220. [RosValue("src-port")]
  9221. public SrcPortType? SrcPort { get; set; }
  9222. // Defines whether tunnel mode is enabled or disabled
  9223. [RosValue("tunnel")]
  9224. public Boolean? Tunnel { get; set; }
  9225. [RosValue("dynamic", IsDynamic=true)]
  9226. public String Dynamic { get; set; }
  9227. [RosValue("in-accepted", IsDynamic=true)]
  9228. public Int32? InAccepted { get; set; }
  9229. [RosValue("in-dropped", IsDynamic=true)]
  9230. public Int32? InDropped { get; set; }
  9231. [RosValue("in-transformed", IsDynamic=true)]
  9232. public Int32? InTransformed { get; set; }
  9233. [RosValue("inactive", IsDynamic=true)]
  9234. public String Inactive { get; set; }
  9235. [RosValue("out-accepted", IsDynamic=true)]
  9236. public Int32? OutAccepted { get; set; }
  9237. [RosValue("out-dropped", IsDynamic=true)]
  9238. public Int32? OutDropped { get; set; }
  9239. [RosValue("out-transformed", IsDynamic=true)]
  9240. public Int32? OutTransformed { get; set; }
  9241. public enum Ph2StateType
  9242. {
  9243. [RosValue("adding-sa")]
  9244. AddingSa,
  9245. [RosValue("commiting")]
  9246. Commiting,
  9247. [RosValue("established")]
  9248. Established,
  9249. [RosValue("expired")]
  9250. Expired,
  9251. [RosValue("getspi-done")]
  9252. GetspiDone,
  9253. [RosValue("getspi-sent")]
  9254. GetspiSent,
  9255. [RosValue("msg1-sent")]
  9256. Msg1Sent,
  9257. [RosValue("no-phase2")]
  9258. NoPhase2,
  9259. [RosValue("ready-to-establish")]
  9260. ReadyToEstablish,
  9261. [RosValue("ready-to-send")]
  9262. ReadyToSend,
  9263. [RosValue("spawning")]
  9264. Spawning,
  9265. [RosValue("starting")]
  9266. Starting,
  9267. }
  9268. [RosValue("ph2-state", IsDynamic=true)]
  9269. public Ph2StateType? Ph2State { get; set; }
  9270. }
  9271. [RosObject("ip ipsec proposal", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  9272. public class IpIpsecProposal : RosItemObject<IpIpsecProposal>
  9273. {
  9274. // Allowed algorithms for authorization
  9275. [RosValue("auth-algorithms")]
  9276. public String AuthAlgorithms { get; set; }
  9277. // Short description of the item
  9278. [RosValue("comment")]
  9279. public String Comment { get; set; }
  9280. // Defines whether item is ignored or used
  9281. [RosValue("disabled")]
  9282. public Boolean? Disabled { get; set; }
  9283. // Allowed algorithms and key lengths to use for SAs
  9284. [RosValue("enc-algorithms")]
  9285. public String EncAlgorithms { get; set; }
  9286. // How long to use SA before throwing it out
  9287. [RosValue("lifetime")]
  9288. public TimeSpan? Lifetime { get; set; }
  9289. // Name of proposal for referencing it from policy
  9290. [RosValue("name")]
  9291. public String Name { get; set; }
  9292. public enum PfsGroupEnum
  9293. {
  9294. [RosValue("ec2n155")]
  9295. Ec2n155,
  9296. [RosValue("ec2n185")]
  9297. Ec2n185,
  9298. [RosValue("modp1024")]
  9299. Modp1024,
  9300. [RosValue("modp1536")]
  9301. Modp1536,
  9302. [RosValue("modp768")]
  9303. Modp768,
  9304. }
  9305. // Diffie-Helman group used for Perfect Forward Secrecy
  9306. [RosValue("pfs-group")]
  9307. public PfsGroupEnum? PfsGroup { get; set; }
  9308. public static IpIpsecProposal DefaultProposal
  9309. {
  9310. get { return new IpIpsecProposal() { Id = 0 }; }
  9311. }
  9312. public static IpIpsecProposal Parse(string str, Connection conn)
  9313. {
  9314. if(string.IsNullOrEmpty(str))
  9315. return null;
  9316. IpIpsecProposal obj = new IpIpsecProposal();
  9317. obj.FindByName(conn, str);
  9318. return obj;
  9319. }
  9320. public override string ToString() { return Name.ToString(); }
  9321. }
  9322. [RosObject("ip ipsec remote-peers", CanGet=true)]
  9323. public class IpIpsecRemotePeers : RosItemObject<IpIpsecRemotePeers>
  9324. {
  9325. [RosValue("established", IsDynamic=true)]
  9326. public TimeSpan? Established { get; set; }
  9327. [RosValue("local-address", IsDynamic=true)]
  9328. public IPv6Address LocalAddress { get; set; }
  9329. [RosValue("remote-address", IsDynamic=true)]
  9330. public IPv6Address RemoteAddress { get; set; }
  9331. public enum SideType
  9332. {
  9333. [RosValue("initiator")]
  9334. Initiator,
  9335. [RosValue("responder")]
  9336. Responder,
  9337. }
  9338. [RosValue("side", IsDynamic=true)]
  9339. public SideType? Side { get; set; }
  9340. public enum StateType
  9341. {
  9342. [RosValue("established")]
  9343. Established,
  9344. [RosValue("expired")]
  9345. Expired,
  9346. [RosValue("no-phase1")]
  9347. NoPhase1,
  9348. [RosValue("spawning")]
  9349. Spawning,
  9350. [RosValue("starting")]
  9351. Starting,
  9352. }
  9353. [RosValue("state", IsDynamic=true)]
  9354. public StateType? State { get; set; }
  9355. }
  9356. [RosObject("ip neighbor", CanGet=true)]
  9357. public class IpNeighbor : RosItemObject<IpNeighbor>
  9358. {
  9359. [RosValue("address", IsDynamic=true)]
  9360. public IPAddress Address { get; set; }
  9361. [RosValue("address6", IsDynamic=true)]
  9362. public String Address6 { get; set; }
  9363. [RosValue("age", IsDynamic=true)]
  9364. public TimeSpan? Age { get; set; }
  9365. [RosValue("board", IsDynamic=true)]
  9366. public String Board { get; set; }
  9367. [RosValue("identity", IsDynamic=true)]
  9368. public String Identity { get; set; }
  9369. [RosValue("interface", IsDynamic=true)]
  9370. public RouterOS.Interface Interface { get; set; }
  9371. [RosValue("ipv6", IsDynamic=true)]
  9372. public String Ipv6 { get; set; }
  9373. [RosValue("mac-address", IsDynamic=true)]
  9374. public MACAddress? MacAddress { get; set; }
  9375. [RosValue("platform", IsDynamic=true)]
  9376. public String Platform { get; set; }
  9377. [RosValue("software-id", IsDynamic=true)]
  9378. public String SoftwareId { get; set; }
  9379. public enum UnpackType
  9380. {
  9381. [RosValue("none")]
  9382. None,
  9383. [RosValue("simple")]
  9384. Simple,
  9385. [RosValue("uncompress-all")]
  9386. UncompressAll,
  9387. [RosValue("uncompress-headers")]
  9388. UncompressHeaders,
  9389. }
  9390. [RosValue("unpack", IsDynamic=true)]
  9391. public UnpackType? Unpack { get; set; }
  9392. [RosValue("uptime", IsDynamic=true)]
  9393. public TimeSpan? Uptime { get; set; }
  9394. [RosValue("version", IsDynamic=true)]
  9395. public String Version { get; set; }
  9396. }
  9397. [RosObject("ip neighbor discovery", CanSet=true, CanGet=true)]
  9398. public class IpNeighborDiscovery : RosItemObject<IpNeighborDiscovery>
  9399. {
  9400. // Short description of the item
  9401. [RosValue("comment")]
  9402. public String Comment { get; set; }
  9403. // Defines if discover is enabled or disabled
  9404. [RosValue("discover")]
  9405. public Boolean? Discover { get; set; }
  9406. [RosValue("name", IsDynamic=true)]
  9407. public RouterOS.Interface Name { get; set; }
  9408. public static IpNeighborDiscovery Parse(string str, Connection conn)
  9409. {
  9410. if(string.IsNullOrEmpty(str))
  9411. return null;
  9412. IpNeighborDiscovery obj = new IpNeighborDiscovery();
  9413. obj.FindByName(conn, str);
  9414. return obj;
  9415. }
  9416. public override string ToString() { return Name.ToString(); }
  9417. }
  9418. [RosObject("ip packing", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  9419. public class IpPacking : RosItemObject<IpPacking>
  9420. {
  9421. // The maximum size of the aggregated packet
  9422. [RosValue("aggregated-size")]
  9423. public Int32? AggregatedSize { get; set; }
  9424. // Defines whether item is ignored or used
  9425. [RosValue("disabled")]
  9426. public Boolean? Disabled { get; set; }
  9427. // Interface settings
  9428. [RosValue("interface")]
  9429. public RouterOS.Interface Interface { get; set; }
  9430. public enum PackingEnum
  9431. {
  9432. [RosValue("compress-all")]
  9433. CompressAll,
  9434. [RosValue("compress-headers")]
  9435. CompressHeaders,
  9436. [RosValue("none")]
  9437. None,
  9438. [RosValue("simple")]
  9439. Simple,
  9440. }
  9441. // Specifies the packing mode
  9442. [RosValue("packing")]
  9443. public PackingEnum? Packing { get; set; }
  9444. public enum UnpackingEnum
  9445. {
  9446. [RosValue("compress-all")]
  9447. CompressAll,
  9448. [RosValue("compress-headers")]
  9449. CompressHeaders,
  9450. [RosValue("none")]
  9451. None,
  9452. [RosValue("simple")]
  9453. Simple,
  9454. }
  9455. // Specifies the unpacking mode
  9456. [RosValue("unpacking")]
  9457. public UnpackingEnum? Unpacking { get; set; }
  9458. }
  9459. [RosObject("ip pool", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  9460. public class IpPool : RosItemObject<IpPool>
  9461. {
  9462. // Name of the IP pool
  9463. [RosValue("name")]
  9464. public String Name { get; set; }
  9465. // Next pool range
  9466. [RosValue("next-pool")]
  9467. public String NextPool { get; set; }
  9468. // IP pool's ranges
  9469. [RosValue("ranges")]
  9470. public IPAddress[] Ranges { get; set; }
  9471. public static IpPool Parse(string str, Connection conn)
  9472. {
  9473. if(string.IsNullOrEmpty(str))
  9474. return null;
  9475. IpPool obj = new IpPool();
  9476. obj.FindByName(conn, str);
  9477. return obj;
  9478. }
  9479. public override string ToString() { return Name.ToString(); }
  9480. }
  9481. [RosObject("ip pool used", CanSet=true, CanGet=true)]
  9482. public class IpPoolUsed : RosItemObject<IpPoolUsed>
  9483. {
  9484. [RosValue("address", IsDynamic=true)]
  9485. public IPAddress Address { get; set; }
  9486. [RosValue("info", IsDynamic=true)]
  9487. public String Info { get; set; }
  9488. [RosValue("owner", IsDynamic=true)]
  9489. public String Owner { get; set; }
  9490. [RosValue("pool", IsDynamic=true)]
  9491. public String Pool { get; set; }
  9492. }
  9493. [RosObject("ip proxy", CanSet=true, CanGet=true)]
  9494. public class IpProxy : RosValueObject
  9495. {
  9496. [RosValue("always-from-cache")]
  9497. public Boolean? AlwaysFromCache { get; set; }
  9498. [RosValue("cache-administrator")]
  9499. public String CacheAdministrator { get; set; }
  9500. [RosValue("cache-hit-dscp")]
  9501. public Int32? CacheHitDscp { get; set; }
  9502. [RosValue("cache-on-disk")]
  9503. public Boolean? CacheOnDisk { get; set; }
  9504. [RosValue("enabled")]
  9505. public Boolean? Enabled { get; set; }
  9506. [RosValue("max-cache-size")]
  9507. public String MaxCacheSize { get; set; }
  9508. [RosValue("max-client-connections")]
  9509. public Int32? MaxClientConnections { get; set; }
  9510. [RosValue("max-fresh-time")]
  9511. public TimeSpan? MaxFreshTime { get; set; }
  9512. [RosValue("max-server-connections")]
  9513. public Int32? MaxServerConnections { get; set; }
  9514. [RosValue("parent-proxy")]
  9515. public String ParentProxy { get; set; }
  9516. [RosValue("parent-proxy-port")]
  9517. public Int32? ParentProxyPort { get; set; }
  9518. [RosValue("port")]
  9519. public Int32[] Port { get; set; }
  9520. [RosValue("serialize-connections")]
  9521. public Boolean? SerializeConnections { get; set; }
  9522. [RosValue("src-address")]
  9523. public String SrcAddress { get; set; }
  9524. }
  9525. [RosObject("ip proxy access", CanAdd=true, CanSet=true, CanMove=true, CanGet=true, CanRemove=true, CanUnset=true)]
  9526. public class IpProxyAccess : RosItemObject<IpProxyAccess>
  9527. {
  9528. public enum ActionEnum
  9529. {
  9530. [RosValue("deny")]
  9531. Deny,
  9532. [RosValue("allow")]
  9533. Allow,
  9534. }
  9535. [RosValue("action")]
  9536. public ActionEnum? Action { get; set; }
  9537. // Short description of the item
  9538. [RosValue("comment")]
  9539. public String Comment { get; set; }
  9540. // Defines whether item is ignored or used
  9541. [RosValue("disabled")]
  9542. public Boolean? Disabled { get; set; }
  9543. [RosValue("dst-address", CanUnset=true)]
  9544. public String DstAddress { get; set; }
  9545. [RosValue("dst-host", CanUnset=true)]
  9546. public String DstHost { get; set; }
  9547. [RosValue("dst-port")]
  9548. public String DstPort { get; set; }
  9549. [RosValue("local-port", CanUnset=true)]
  9550. public String LocalPort { get; set; }
  9551. [RosValue("method", CanUnset=true)]
  9552. public String Method { get; set; }
  9553. [RosValue("path", CanUnset=true)]
  9554. public String Path { get; set; }
  9555. [RosValue("redirect-to", CanUnset=true)]
  9556. public String RedirectTo { get; set; }
  9557. [RosValue("src-address", CanUnset=true)]
  9558. public String SrcAddress { get; set; }
  9559. [RosValue("hits", IsDynamic=true)]
  9560. public Int32? Hits { get; set; }
  9561. }
  9562. [RosObject("ip proxy cache", CanAdd=true, CanSet=true, CanMove=true, CanGet=true, CanRemove=true, CanUnset=true)]
  9563. public class IpProxyCache : RosItemObject<IpProxyCache>
  9564. {
  9565. public enum ActionEnum
  9566. {
  9567. [RosValue("deny")]
  9568. Deny,
  9569. [RosValue("allow")]
  9570. Allow,
  9571. }
  9572. [RosValue("action")]
  9573. public ActionEnum? Action { get; set; }
  9574. // Short description of the item
  9575. [RosValue("comment")]
  9576. public String Comment { get; set; }
  9577. // Defines whether item is ignored or used
  9578. [RosValue("disabled")]
  9579. public Boolean? Disabled { get; set; }
  9580. [RosValue("dst-address", CanUnset=true)]
  9581. public String DstAddress { get; set; }
  9582. [RosValue("dst-host", CanUnset=true)]
  9583. public String DstHost { get; set; }
  9584. [RosValue("dst-port")]
  9585. public String DstPort { get; set; }
  9586. [RosValue("local-port", CanUnset=true)]
  9587. public String LocalPort { get; set; }
  9588. [RosValue("method", CanUnset=true)]
  9589. public String Method { get; set; }
  9590. [RosValue("path", CanUnset=true)]
  9591. public String Path { get; set; }
  9592. [RosValue("src-address", CanUnset=true)]
  9593. public String SrcAddress { get; set; }
  9594. [RosValue("hits", IsDynamic=true)]
  9595. public Int32? Hits { get; set; }
  9596. }
  9597. [RosObject("ip proxy cache-contents", CanGet=true)]
  9598. public class IpProxyCacheContents : RosItemObject<IpProxyCacheContents>
  9599. {
  9600. [RosValue("file-size", IsDynamic=true)]
  9601. public String FileSize { get; set; }
  9602. [RosValue("last-accessed", IsDynamic=true)]
  9603. public DateTime? LastAccessed { get; set; }
  9604. [RosValue("last-accessed-time", IsDynamic=true)]
  9605. public DateTime? LastAccessedTime { get; set; }
  9606. [RosValue("last-modified", IsDynamic=true)]
  9607. public DateTime? LastModified { get; set; }
  9608. [RosValue("last-modified-time", IsDynamic=true)]
  9609. public DateTime? LastModifiedTime { get; set; }
  9610. [RosValue("uri", IsDynamic=true)]
  9611. public String Uri { get; set; }
  9612. }
  9613. [RosObject("ip proxy connections", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  9614. public class IpProxyConnections : RosItemObject<IpProxyConnections>
  9615. {
  9616. // Short description of the item
  9617. [RosValue("comment")]
  9618. public String Comment { get; set; }
  9619. [RosValue("client", IsDynamic=true)]
  9620. public String Client { get; set; }
  9621. [RosValue("dst-address", IsDynamic=true)]
  9622. public IPAddress DstAddress { get; set; }
  9623. [RosValue("protocol", IsDynamic=true)]
  9624. public String Protocol { get; set; }
  9625. [RosValue("rx-bytes", IsDynamic=true)]
  9626. public Int32? RxBytes { get; set; }
  9627. [RosValue("server", IsDynamic=true)]
  9628. public String Server { get; set; }
  9629. [RosValue("src-address", IsDynamic=true)]
  9630. public IPAddress SrcAddress { get; set; }
  9631. public enum StateType
  9632. {
  9633. [RosValue("connecting")]
  9634. Connecting,
  9635. [RosValue("idle")]
  9636. Idle,
  9637. [RosValue("resolving")]
  9638. Resolving,
  9639. [RosValue("rx-body")]
  9640. RxBody,
  9641. [RosValue("rx-header")]
  9642. RxHeader,
  9643. [RosValue("tx-body")]
  9644. TxBody,
  9645. [RosValue("tx-header")]
  9646. TxHeader,
  9647. [RosValue("waiting")]
  9648. Waiting,
  9649. }
  9650. [RosValue("state", IsDynamic=true)]
  9651. public StateType? State { get; set; }
  9652. [RosValue("tx-bytes", IsDynamic=true)]
  9653. public Int32? TxBytes { get; set; }
  9654. }
  9655. [RosObject("ip proxy direct", CanAdd=true, CanSet=true, CanMove=true, CanGet=true, CanRemove=true, CanUnset=true)]
  9656. public class IpProxyDirect : RosItemObject<IpProxyDirect>
  9657. {
  9658. public enum ActionEnum
  9659. {
  9660. [RosValue("deny")]
  9661. Deny,
  9662. [RosValue("allow")]
  9663. Allow,
  9664. }
  9665. [RosValue("action")]
  9666. public ActionEnum? Action { get; set; }
  9667. // Short description of the item
  9668. [RosValue("comment")]
  9669. public String Comment { get; set; }
  9670. // Defines whether item is ignored or used
  9671. [RosValue("disabled")]
  9672. public Boolean? Disabled { get; set; }
  9673. [RosValue("dst-address", CanUnset=true)]
  9674. public String DstAddress { get; set; }
  9675. [RosValue("dst-host", CanUnset=true)]
  9676. public String DstHost { get; set; }
  9677. [RosValue("dst-port")]
  9678. public String DstPort { get; set; }
  9679. [RosValue("local-port", CanUnset=true)]
  9680. public String LocalPort { get; set; }
  9681. [RosValue("method", CanUnset=true)]
  9682. public String Method { get; set; }
  9683. [RosValue("path", CanUnset=true)]
  9684. public String Path { get; set; }
  9685. [RosValue("src-address", CanUnset=true)]
  9686. public String SrcAddress { get; set; }
  9687. [RosValue("hits", IsDynamic=true)]
  9688. public Int32? Hits { get; set; }
  9689. }
  9690. [RosObject("ip route", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true, CanUnset=true)]
  9691. public class IpRoute : RosItemObject<IpRoute>
  9692. {
  9693. [RosValue("bgp-as-path", CanUnset=true)]
  9694. public String BgpAsPath { get; set; }
  9695. [RosValue("bgp-atomic-aggregate", CanUnset=true)]
  9696. public Boolean? BgpAtomicAggregate { get; set; }
  9697. public enum SpecialEnum
  9698. {
  9699. [RosValue("local-as")]
  9700. LocalAs,
  9701. [RosValue("no-advertise")]
  9702. NoAdvertise,
  9703. [RosValue("no-export")]
  9704. NoExport,
  9705. }
  9706. public struct NumbersType
  9707. {
  9708. public Int32 As { get; set; }
  9709. public Int32 Num { get; set; }
  9710. public static NumbersType Parse(string str)
  9711. {
  9712. string[] strs = str.Split(':');
  9713. if (strs.Length == 2)
  9714. return new NumbersType() { As = TypeFormatter.ConvertFromString<Int32>(strs[0], null), Num = TypeFormatter.ConvertFromString<Int32>(strs[1], null) };
  9715. else
  9716. throw new InvalidOperationException();
  9717. }
  9718. public override string ToString()
  9719. {
  9720. return String.Concat(As, ':', Num);
  9721. }
  9722. }
  9723. public struct CommunityType
  9724. {
  9725. private object value;
  9726. public SpecialEnum? Special
  9727. {
  9728. get { return value as SpecialEnum?; }
  9729. set { this.value = value; }
  9730. }
  9731. public static implicit operator CommunityType(SpecialEnum? value)
  9732. {
  9733. return new CommunityType() { value = value };
  9734. }public NumbersType? Numbers
  9735. {
  9736. get { return value as NumbersType?; }
  9737. set { this.value = value; }
  9738. }
  9739. public static implicit operator CommunityType(NumbersType? value)
  9740. {
  9741. return new CommunityType() { value = value };
  9742. }
  9743. public static CommunityType Parse(string str, Connection conn)
  9744. {
  9745. try { return new CommunityType() { value = TypeFormatter.ConvertFromString<SpecialEnum>(str, conn) }; }
  9746. catch(Exception) { }
  9747. try { return new CommunityType() { value = TypeFormatter.ConvertFromString<NumbersType>(str, conn) }; }
  9748. catch(Exception) { }
  9749. throw new NotSupportedException();
  9750. }
  9751. public override string ToString() { return value != null ? value.ToString() : null; }
  9752. }
  9753. [RosValue("bgp-communities", CanUnset=true)]
  9754. public CommunityType[] BgpCommunities { get; set; }
  9755. [RosValue("bgp-local-pref", CanUnset=true)]
  9756. public Int32? BgpLocalPref { get; set; }
  9757. [RosValue("bgp-med", CanUnset=true)]
  9758. public Int32? BgpMed { get; set; }
  9759. public enum BgpOriginEnum
  9760. {
  9761. [RosValue("egp")]
  9762. Egp,
  9763. [RosValue("igp")]
  9764. Igp,
  9765. [RosValue("incomplete")]
  9766. Incomplete,
  9767. }
  9768. [RosValue("bgp-origin", CanUnset=true)]
  9769. public BgpOriginEnum? BgpOrigin { get; set; }
  9770. public struct BgpPrependType
  9771. {
  9772. private object value;
  9773. public Int32? Num
  9774. {
  9775. get { return value as Int32?; }
  9776. set { this.value = value; }
  9777. }
  9778. public static implicit operator BgpPrependType(Int32? value)
  9779. {
  9780. return new BgpPrependType() { value = value };
  9781. }public RouterOS.InterfaceWirelessSecurityProfiles InterfaceWirelessSecurityProfiles
  9782. {
  9783. get { return value as RouterOS.InterfaceWirelessSecurityProfiles; }
  9784. set { this.value = value; }
  9785. }
  9786. public static implicit operator BgpPrependType(RouterOS.InterfaceWirelessSecurityProfiles value)
  9787. {
  9788. return new BgpPrependType() { value = value };
  9789. }
  9790. public static BgpPrependType Parse(string str, Connection conn)
  9791. {
  9792. try { return new BgpPrependType() { value = TypeFormatter.ConvertFromString<Int32>(str, conn) }; }
  9793. catch(Exception) { }
  9794. try { return new BgpPrependType() { value = TypeFormatter.ConvertFromString<RouterOS.InterfaceWirelessSecurityProfiles>(str, conn) }; }
  9795. catch(Exception) { }
  9796. throw new NotSupportedException();
  9797. }
  9798. public override string ToString() { return value != null ? value.ToString() : null; }
  9799. }
  9800. [RosValue("bgp-prepend", CanUnset=true)]
  9801. public BgpPrependType? BgpPrepend { get; set; }
  9802. public enum CheckGatewayEnum
  9803. {
  9804. [RosValue("arp")]
  9805. Arp,
  9806. [RosValue("ping")]
  9807. Ping,
  9808. }
  9809. // Whether all nexthops of this route are checking reachability of gateway by sending arp requests every 10 seconds
  9810. [RosValue("check-gateway", CanUnset=true)]
  9811. public CheckGatewayEnum? CheckGateway { get; set; }
  9812. // Short description of the item
  9813. [RosValue("comment")]
  9814. public String Comment { get; set; }
  9815. // Defines whether item is ignored or used
  9816. [RosValue("disabled")]
  9817. public Boolean? Disabled { get; set; }
  9818. // Administrative distance of the route
  9819. [RosValue("distance", CanUnset=true)]
  9820. public Int32? Distance { get; set; }
  9821. // Destination address
  9822. [RosValue("dst-address")]
  9823. public IPPrefix? DstAddress { get; set; }
  9824. [RosValue("gateway")]
  9825. public String Gateway { get; set; }
  9826. [RosValue("pref-src", CanUnset=true)]
  9827. public IPAddress PrefSrc { get; set; }
  9828. [RosValue("route-tag", CanUnset=true)]
  9829. public Int32? RouteTag { get; set; }
  9830. // It's used for policy-routing
  9831. [RosValue("routing-mark", CanUnset=true)]
  9832. public String RoutingMark { get; set; }
  9833. [RosValue("scope")]
  9834. public Int32? Scope { get; set; }
  9835. [RosValue("target-scope")]
  9836. public Int32? TargetScope { get; set; }
  9837. public enum TypeEnum
  9838. {
  9839. [RosValue("blackhole")]
  9840. Blackhole,
  9841. [RosValue("prohibit")]
  9842. Prohibit,
  9843. [RosValue("unicast")]
  9844. Unicast,
  9845. [RosValue("unreachable")]
  9846. Unreachable,
  9847. }
  9848. [RosValue("type")]
  9849. public TypeEnum? Type { get; set; }
  9850. [RosValue("vrf-interface")]
  9851. public RouterOS.Interface VrfInterface { get; set; }
  9852. [RosValue("bgp-ext-communities", CanUnset=true)]
  9853. public String BgpExtCommunities { get; set; }
  9854. [RosValue("bgp-weight", CanUnset=true)]
  9855. public String BgpWeight { get; set; }
  9856. [RosValue("active", IsDynamic=true)]
  9857. public String Active { get; set; }
  9858. [RosValue("bgp", IsDynamic=true)]
  9859. public String Bgp { get; set; }
  9860. [RosValue("blackhole", IsDynamic=true)]
  9861. public String Blackhole { get; set; }
  9862. [RosValue("connect", IsDynamic=true)]
  9863. public String Connect { get; set; }
  9864. [RosValue("dynamic", IsDynamic=true)]
  9865. public String Dynamic { get; set; }
  9866. [RosValue("gateway-status", IsDynamic=true)]
  9867. public RouterOS.Interface GatewayStatus { get; set; }
  9868. [RosValue("mme", IsDynamic=true)]
  9869. public String Mme { get; set; }
  9870. [RosValue("ospf", IsDynamic=true)]
  9871. public String Ospf { get; set; }
  9872. [RosValue("ospf-metric", IsDynamic=true)]
  9873. public Int32? OspfMetric { get; set; }
  9874. public enum OspfTypeType
  9875. {
  9876. [RosValue("external-type-1")]
  9877. ExternalType1,
  9878. [RosValue("external-type-2")]
  9879. ExternalType2,
  9880. [RosValue("inter-area")]
  9881. InterArea,
  9882. [RosValue("intra-area")]
  9883. IntraArea,
  9884. [RosValue("nssa-external-type-1")]
  9885. NssaExternalType1,
  9886. [RosValue("nssa-external-type-2")]
  9887. NssaExternalType2,
  9888. }
  9889. [RosValue("ospf-type", IsDynamic=true)]
  9890. public OspfTypeType? OspfType { get; set; }
  9891. [RosValue("prohibit", IsDynamic=true)]
  9892. public String Prohibit { get; set; }
  9893. [RosValue("received-from", IsDynamic=true)]
  9894. public String ReceivedFrom { get; set; }
  9895. [RosValue("rip", IsDynamic=true)]
  9896. public String Rip { get; set; }
  9897. [RosValue("static", IsDynamic=true)]
  9898. public String Static { get; set; }
  9899. [RosValue("unreachable", IsDynamic=true)]
  9900. public String Unreachable { get; set; }
  9901. }
  9902. [RosObject("ip route nexthop", CanGet=true)]
  9903. public class IpRouteNexthop : RosItemObject<IpRouteNexthop>
  9904. {
  9905. [RosValue("address", IsDynamic=true)]
  9906. public IPAddress Address { get; set; }
  9907. public enum CheckGatewayType
  9908. {
  9909. [RosValue("arp")]
  9910. Arp,
  9911. [RosValue("icmp")]
  9912. Icmp,
  9913. [RosValue("none")]
  9914. None,
  9915. }
  9916. [RosValue("check-gateway", IsDynamic=true)]
  9917. public CheckGatewayType? CheckGateway { get; set; }
  9918. [RosValue("forwarding-nexthop", IsDynamic=true)]
  9919. public IPAddress ForwardingNexthop { get; set; }
  9920. [RosValue("gw-check-ok", IsDynamic=true)]
  9921. public String GwCheckOk { get; set; }
  9922. public enum GwStateType
  9923. {
  9924. [RosValue("reachable")]
  9925. Reachable,
  9926. [RosValue("recursive")]
  9927. Recursive,
  9928. [RosValue("unreachable")]
  9929. Unreachable,
  9930. }
  9931. [RosValue("gw-state", IsDynamic=true)]
  9932. public GwStateType? GwState { get; set; }
  9933. [RosValue("interface", IsDynamic=true)]
  9934. public RouterOS.Interface Interface { get; set; }
  9935. [RosValue("scope", IsDynamic=true)]
  9936. public Int32? Scope { get; set; }
  9937. [RosValue("table", IsDynamic=true)]
  9938. public String Table { get; set; }
  9939. }
  9940. [RosObject("ip route rule", CanAdd=true, CanSet=true, CanMove=true, CanGet=true, CanRemove=true, CanUnset=true)]
  9941. public class IpRouteRule : RosItemObject<IpRouteRule>
  9942. {
  9943. public enum ActionEnum
  9944. {
  9945. [RosValue("drop")]
  9946. Drop,
  9947. [RosValue("lookup")]
  9948. Lookup,
  9949. [RosValue("lookup-only-in-table")]
  9950. LookupOnlyInTable,
  9951. [RosValue("unreachable")]
  9952. Unreachable,
  9953. }
  9954. [RosValue("action")]
  9955. public ActionEnum? Action { get; set; }
  9956. // Short description of the item
  9957. [RosValue("comment")]
  9958. public String Comment { get; set; }
  9959. // Defines whether item is ignored or used
  9960. [RosValue("disabled")]
  9961. public Boolean? Disabled { get; set; }
  9962. [RosValue("dst-address", CanUnset=true)]
  9963. public IPPrefix? DstAddress { get; set; }
  9964. // Interface through which the gateway can be reached
  9965. [RosValue("interface", CanUnset=true)]
  9966. public RouterOS.Interface Interface { get; set; }
  9967. [RosValue("routing-mark", CanUnset=true)]
  9968. public String RoutingMark { get; set; }
  9969. [RosValue("src-address", CanUnset=true)]
  9970. public IPPrefix? SrcAddress { get; set; }
  9971. [RosValue("table")]
  9972. public String Table { get; set; }
  9973. [RosValue("inactive", IsDynamic=true)]
  9974. public String Inactive { get; set; }
  9975. }
  9976. [RosObject("ip route vrf", CanAdd=true, CanSet=true, CanMove=true, CanGet=true, CanRemove=true, CanUnset=true)]
  9977. public class IpRouteVrf : RosItemObject<IpRouteVrf>
  9978. {
  9979. [RosValue("bgp-nexthop", CanUnset=true)]
  9980. public RouterOS.Interface BgpNexthop { get; set; }
  9981. // Short description of the item
  9982. [RosValue("comment")]
  9983. public String Comment { get; set; }
  9984. // Defines whether item is ignored or used
  9985. [RosValue("disabled")]
  9986. public Boolean? Disabled { get; set; }
  9987. [RosValue("export-route-targets", CanUnset=true)]
  9988. public String ExportRouteTargets { get; set; }
  9989. [RosValue("import-route-targets", CanUnset=true)]
  9990. public String ImportRouteTargets { get; set; }
  9991. [RosValue("interfaces")]
  9992. public RouterOS.Interface[] Interfaces { get; set; }
  9993. [RosValue("route-distinguisher", CanUnset=true)]
  9994. public String RouteDistinguisher { get; set; }
  9995. [RosValue("routing-mark", CanUnset=true)]
  9996. public String RoutingMark { get; set; }
  9997. [RosValue("inactive", IsDynamic=true)]
  9998. public String Inactive { get; set; }
  9999. }
  10000. [RosObject("ip service", CanSet=true, CanGet=true)]
  10001. public class IpService : RosItemObject<IpService>
  10002. {
  10003. public struct AddressType
  10004. {
  10005. private object value;
  10006. public IPPrefix? Address
  10007. {
  10008. get { return value as IPPrefix?; }
  10009. set { this.value = value; }
  10010. }
  10011. public static implicit operator AddressType(IPPrefix? value)
  10012. {
  10013. return new AddressType() { value = value };
  10014. }public IPPrefix? Address2
  10015. {
  10016. get { return value as IPPrefix?; }
  10017. set { this.value = value; }
  10018. }
  10019. public static implicit operator AddressType(IPPrefix? value)
  10020. {
  10021. return new AddressType() { value = value };
  10022. }
  10023. public static AddressType Parse(string str, Connection conn)
  10024. {
  10025. try { return new AddressType() { value = TypeFormatter.ConvertFromString<IPPrefix>(str, conn) }; }
  10026. catch(Exception) { }
  10027. try { return new AddressType() { value = TypeFormatter.ConvertFromString<IPPrefix>(str, conn) }; }
  10028. catch(Exception) { }
  10029. throw new NotSupportedException();
  10030. }
  10031. public override string ToString() { return value != null ? value.ToString() : null; }
  10032. }
  10033. // IP address from which the service is accessible
  10034. [RosValue("address")]
  10035. public AddressType[] Address { get; set; }
  10036. [RosValue("certificate")]
  10037. public String Certificate { get; set; }
  10038. // Defines whether item is ignored or used
  10039. [RosValue("disabled")]
  10040. public Boolean? Disabled { get; set; }
  10041. // Port for specific IP service
  10042. [RosValue("port")]
  10043. public Int32? Port { get; set; }
  10044. [RosValue("invalid", IsDynamic=true)]
  10045. public String Invalid { get; set; }
  10046. [RosValue("name", IsDynamic=true)]
  10047. public String Name { get; set; }
  10048. public static IpService TelnetService
  10049. {
  10050. get { return new IpService() { Id = 0 }; }
  10051. }
  10052. public static IpService FtpService
  10053. {
  10054. get { return new IpService() { Id = 1 }; }
  10055. }
  10056. public static IpService WwwService
  10057. {
  10058. get { return new IpService() { Id = 2 }; }
  10059. }
  10060. public static IpService SshService
  10061. {
  10062. get { return new IpService() { Id = 4 }; }
  10063. }
  10064. public static IpService WwwSslService
  10065. {
  10066. get { return new IpService() { Id = 6 }; }
  10067. }
  10068. public static IpService ApiService
  10069. {
  10070. get { return new IpService() { Id = 7 }; }
  10071. }
  10072. public static IpService WinboxService
  10073. {
  10074. get { return new IpService() { Id = 8 }; }
  10075. }
  10076. public static IpService Parse(string str, Connection conn)
  10077. {
  10078. if(string.IsNullOrEmpty(str))
  10079. return null;
  10080. IpService obj = new IpService();
  10081. obj.FindByName(conn, str);
  10082. return obj;
  10083. }
  10084. public override string ToString() { return Name.ToString(); }
  10085. }
  10086. [RosObject("ip socks", CanSet=true, CanGet=true)]
  10087. public class IpSocks : RosValueObject
  10088. {
  10089. // Connection is discarded if no data is passed for some time
  10090. [RosValue("connection-idle-timeout")]
  10091. public TimeSpan? ConnectionIdleTimeout { get; set; }
  10092. // Defines whether SOCKS are enabled or not
  10093. [RosValue("enabled")]
  10094. public Boolean? Enabled { get; set; }
  10095. // Max number of simultaneous connections
  10096. [RosValue("max-connections")]
  10097. public Int32? MaxConnections { get; set; }
  10098. // Client connections are accepted on this port
  10099. [RosValue("port")]
  10100. public Int32? Port { get; set; }
  10101. }
  10102. [RosObject("ip socks access", CanAdd=true, CanSet=true, CanMove=true, CanGet=true, CanRemove=true, CanUnset=true)]
  10103. public class IpSocksAccess : RosItemObject<IpSocksAccess>
  10104. {
  10105. public enum ActionEnum
  10106. {
  10107. [RosValue("allow")]
  10108. Allow,
  10109. [RosValue("deny")]
  10110. Deny,
  10111. }
  10112. // Rule action
  10113. [RosValue("action")]
  10114. public ActionEnum? Action { get; set; }
  10115. // Short description of the item
  10116. [RosValue("comment")]
  10117. public String Comment { get; set; }
  10118. // Defines whether item is ignored or used
  10119. [RosValue("disabled")]
  10120. public Boolean? Disabled { get; set; }
  10121. // Server's IP address
  10122. [RosValue("dst-address", CanUnset=true)]
  10123. public String DstAddress { get; set; }
  10124. // Destination port
  10125. [RosValue("dst-port", CanUnset=true)]
  10126. public String DstPort { get; set; }
  10127. // Client's IP address
  10128. [RosValue("src-address", CanUnset=true)]
  10129. public String SrcAddress { get; set; }
  10130. // Source port
  10131. [RosValue("src-port", CanUnset=true)]
  10132. public String SrcPort { get; set; }
  10133. }
  10134. [RosObject("ip socks connections", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  10135. public class IpSocksConnections : RosItemObject<IpSocksConnections>
  10136. {
  10137. // Server's IP address
  10138. [RosValue("dst-address")]
  10139. public String DstAddress { get; set; }
  10140. // Bytes received
  10141. [RosValue("rx")]
  10142. public Int32? Rx { get; set; }
  10143. // Client's IP address
  10144. [RosValue("src-address")]
  10145. public String SrcAddress { get; set; }
  10146. // Bytes transmitted
  10147. [RosValue("tx")]
  10148. public Int32? Tx { get; set; }
  10149. public enum TypeEnum
  10150. {
  10151. [RosValue("in")]
  10152. In,
  10153. [RosValue("out")]
  10154. Out,
  10155. [RosValue("unknown")]
  10156. Unknown,
  10157. }
  10158. // Connection type
  10159. [RosValue("type")]
  10160. public TypeEnum? Type { get; set; }
  10161. }
  10162. [RosObject("ip ssh", CanSet=true, CanGet=true)]
  10163. public class IpSsh : RosValueObject
  10164. {
  10165. [RosValue("forwarding-enabled")]
  10166. public Boolean? ForwardingEnabled { get; set; }
  10167. }
  10168. [RosObject("ip tftp", CanAdd=true, CanSet=true, CanMove=true, CanGet=true, CanRemove=true)]
  10169. public class IpTftp : RosItemObject<IpTftp>
  10170. {
  10171. [RosValue("allow")]
  10172. public Boolean? Allow { get; set; }
  10173. // Short description of the item
  10174. [RosValue("comment")]
  10175. public String Comment { get; set; }
  10176. // Defines whether item is ignored or used
  10177. [RosValue("disabled")]
  10178. public Boolean? Disabled { get; set; }
  10179. public struct IpAddressesType
  10180. {
  10181. private object value;
  10182. public IPv6Prefix? Ip6
  10183. {
  10184. get { return value as IPv6Prefix?; }
  10185. set { this.value = value; }
  10186. }
  10187. public static implicit operator IpAddressesType(IPv6Prefix? value)
  10188. {
  10189. return new IpAddressesType() { value = value };
  10190. }public IPAddress Ip
  10191. {
  10192. get { return value as IPAddress; }
  10193. set { this.value = value; }
  10194. }
  10195. public static implicit operator IpAddressesType(IPAddress value)
  10196. {
  10197. return new IpAddressesType() { value = value };
  10198. }
  10199. public static IpAddressesType Parse(string str, Connection conn)
  10200. {
  10201. try { return new IpAddressesType() { value = TypeFormatter.ConvertFromString<IPv6Prefix>(str, conn) }; }
  10202. catch(Exception) { }
  10203. try { return new IpAddressesType() { value = TypeFormatter.ConvertFromString<IPAddress>(str, conn) }; }
  10204. catch(Exception) { }
  10205. throw new NotSupportedException();
  10206. }
  10207. public override string ToString() { return value != null ? value.ToString() : null; }
  10208. }
  10209. [RosValue("ip-addresses")]
  10210. public IpAddressesType[] IpAddresses { get; set; }
  10211. [RosValue("read-only")]
  10212. public Boolean? ReadOnly { get; set; }
  10213. [RosValue("real-filename")]
  10214. public String RealFilename { get; set; }
  10215. [RosValue("req-filename")]
  10216. public String ReqFilename { get; set; }
  10217. [RosValue("hits", IsDynamic=true)]
  10218. public Int32? Hits { get; set; }
  10219. }
  10220. [RosObject("ip traffic-flow", CanSet=true, CanGet=true)]
  10221. public class IpTrafficFlow : RosValueObject
  10222. {
  10223. public enum ActiveFlowTimeoutEnum
  10224. {
  10225. [RosValue("ActiveFlowTimeout")]
  10226. ActiveFlowTimeout,
  10227. }
  10228. [RosValue("active-flow-timeout")]
  10229. public ActiveFlowTimeoutEnum? ActiveFlowTimeout { get; set; }
  10230. public enum CacheEntriesEnum
  10231. {
  10232. [RosValue("128k")]
  10233. E128k,
  10234. [RosValue("16k")]
  10235. E16k,
  10236. [RosValue("1k")]
  10237. E1k,
  10238. [RosValue("256k")]
  10239. E256k,
  10240. [RosValue("2k")]
  10241. E2k,
  10242. }
  10243. [RosValue("cache-entries")]
  10244. public CacheEntriesEnum? CacheEntries { get; set; }
  10245. [RosValue("enabled")]
  10246. public Boolean? Enabled { get; set; }
  10247. public enum InactiveFlowTimeoutEnum
  10248. {
  10249. [RosValue("InactiveFlowTimeout")]
  10250. InactiveFlowTimeout,
  10251. }
  10252. [RosValue("inactive-flow-timeout")]
  10253. public InactiveFlowTimeoutEnum? InactiveFlowTimeout { get; set; }
  10254. public struct InterfaceType
  10255. {
  10256. private object value;
  10257. public RouterOS.Interface Interface
  10258. {
  10259. get { return value as RouterOS.Interface; }
  10260. set { this.value = value; }
  10261. }
  10262. public static implicit operator InterfaceType(RouterOS.Interface value)
  10263. {
  10264. return new InterfaceType() { value = value };
  10265. }public RouterOS.Interface Interface2
  10266. {
  10267. get { return value as RouterOS.Interface; }
  10268. set { this.value = value; }
  10269. }
  10270. public static implicit operator InterfaceType(RouterOS.Interface value)
  10271. {
  10272. return new InterfaceType() { value = value };
  10273. }
  10274. public static InterfaceType Parse(string str, Connection conn)
  10275. {
  10276. try { return new InterfaceType() { value = TypeFormatter.ConvertFromString<RouterOS.Interface>(str, conn) }; }
  10277. catch(Exception) { }
  10278. try { return new InterfaceType() { value = TypeFormatter.ConvertFromString<RouterOS.Interface>(str, conn) }; }
  10279. catch(Exception) { }
  10280. throw new NotSupportedException();
  10281. }
  10282. public override string ToString() { return value != null ? value.ToString() : null; }
  10283. }
  10284. [RosValue("interfaces")]
  10285. public InterfaceType[] Interfaces { get; set; }
  10286. }
  10287. [RosObject("ip traffic-flow target", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  10288. public class IpTrafficFlowTarget : RosItemObject<IpTrafficFlowTarget>
  10289. {
  10290. [RosValue("address")]
  10291. public String Address { get; set; }
  10292. // Defines whether item is ignored or used
  10293. [RosValue("disabled")]
  10294. public Boolean? Disabled { get; set; }
  10295. [RosValue("v9-template-refresh")]
  10296. public Int32? V9TemplateRefresh { get; set; }
  10297. public enum V9TemplateTimeoutEnum
  10298. {
  10299. [RosValue("V9TemplateTimeout")]
  10300. V9TemplateTimeout,
  10301. }
  10302. [RosValue("v9-template-timeout")]
  10303. public V9TemplateTimeoutEnum? V9TemplateTimeout { get; set; }
  10304. public enum VersionEnum
  10305. {
  10306. [RosValue("1")]
  10307. E1,
  10308. [RosValue("5")]
  10309. E5,
  10310. [RosValue("9")]
  10311. E9,
  10312. }
  10313. [RosValue("version")]
  10314. public VersionEnum? Version { get; set; }
  10315. }
  10316. [RosObject("ip upnp", CanSet=true, CanGet=true)]
  10317. public class IpUpnp : RosValueObject
  10318. {
  10319. // whether or not should the users be allowed to disable router's external interface
  10320. [RosValue("allow-disable-external-interface")]
  10321. public Boolean? AllowDisableExternalInterface { get; set; }
  10322. // Enable or not UPnP
  10323. [RosValue("enabled")]
  10324. public Boolean? Enabled { get; set; }
  10325. // This is to enable a workaround for some broken implementations, which are handling the absence of UPnP rules inincorrectly
  10326. [RosValue("show-dummy-rule")]
  10327. public Boolean? ShowDummyRule { get; set; }
  10328. }
  10329. [RosObject("ip upnp interfaces", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  10330. public class IpUpnpInterfaces : RosItemObject<IpUpnpInterfaces>
  10331. {
  10332. // Defines whether item is ignored or used
  10333. [RosValue("disabled")]
  10334. public Boolean? Disabled { get; set; }
  10335. // Interface name
  10336. [RosValue("interface")]
  10337. public RouterOS.Interface Interface { get; set; }
  10338. public enum TypeEnum
  10339. {
  10340. [RosValue("external")]
  10341. External,
  10342. [RosValue("internal")]
  10343. Internal,
  10344. }
  10345. // Interface type
  10346. [RosValue("type")]
  10347. public TypeEnum? Type { get; set; }
  10348. }
  10349. [RosObject("ipv6 address", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  10350. public class Ipv6Address : RosItemObject<Ipv6Address>
  10351. {
  10352. [RosValue("address")]
  10353. public String Address { get; set; }
  10354. [RosValue("advertise")]
  10355. public Boolean? Advertise { get; set; }
  10356. // Short description of the item
  10357. [RosValue("comment")]
  10358. public String Comment { get; set; }
  10359. // Defines whether item is ignored or used
  10360. [RosValue("disabled")]
  10361. public Boolean? Disabled { get; set; }
  10362. [RosValue("eui-64")]
  10363. public Boolean? Eui64 { get; set; }
  10364. [RosValue("interface")]
  10365. public RouterOS.Interface Interface { get; set; }
  10366. [RosValue("actual-interface", IsDynamic=true)]
  10367. public RouterOS.Interface ActualInterface { get; set; }
  10368. [RosValue("dynamic", IsDynamic=true)]
  10369. public String Dynamic { get; set; }
  10370. [RosValue("global", IsDynamic=true)]
  10371. public String Global { get; set; }
  10372. [RosValue("invalid", IsDynamic=true)]
  10373. public String Invalid { get; set; }
  10374. [RosValue("link-local", IsDynamic=true)]
  10375. public String LinkLocal { get; set; }
  10376. }
  10377. [RosObject("ipv6 firewall address-list", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  10378. public class Ipv6FirewallAddressList : RosItemObject<Ipv6FirewallAddressList>
  10379. {
  10380. [RosValue("address")]
  10381. public IPv6Prefix? Address { get; set; }
  10382. // Short description of the item
  10383. [RosValue("comment")]
  10384. public String Comment { get; set; }
  10385. // Defines whether item is ignored or used
  10386. [RosValue("disabled")]
  10387. public Boolean? Disabled { get; set; }
  10388. [RosValue("list")]
  10389. public String List { get; set; }
  10390. [RosValue("dynamic", IsDynamic=true)]
  10391. public String Dynamic { get; set; }
  10392. }
  10393. [RosObject("ipv6 firewall connection", CanGet=true, CanRemove=true)]
  10394. public class Ipv6FirewallConnection : RosItemObject<Ipv6FirewallConnection>
  10395. {
  10396. [RosValue("assured", IsDynamic=true)]
  10397. public String Assured { get; set; }
  10398. [RosValue("connection-mark", IsDynamic=true)]
  10399. public String ConnectionMark { get; set; }
  10400. [RosValue("connection-type", IsDynamic=true)]
  10401. public String ConnectionType { get; set; }
  10402. [RosValue("dst-address", IsDynamic=true)]
  10403. public String DstAddress { get; set; }
  10404. [RosValue("dst-port", IsDynamic=true)]
  10405. public Int32? DstPort { get; set; }
  10406. [RosValue("gre-key", IsDynamic=true)]
  10407. public Int32? GreKey { get; set; }
  10408. [RosValue("gre-protocol", IsDynamic=true)]
  10409. public Int32? GreProtocol { get; set; }
  10410. [RosValue("gre-version", IsDynamic=true)]
  10411. public Int32? GreVersion { get; set; }
  10412. [RosValue("icmp-code", IsDynamic=true)]
  10413. public Int32? IcmpCode { get; set; }
  10414. [RosValue("icmp-id", IsDynamic=true)]
  10415. public Int32? IcmpId { get; set; }
  10416. [RosValue("icmp-type", IsDynamic=true)]
  10417. public Int32? IcmpType { get; set; }
  10418. public enum P2pType
  10419. {
  10420. [RosValue("bit-torrent")]
  10421. BitTorrent,
  10422. [RosValue("blubster")]
  10423. Blubster,
  10424. [RosValue("direct-connect")]
  10425. DirectConnect,
  10426. [RosValue("edonkey")]
  10427. Edonkey,
  10428. [RosValue("fasttrack")]
  10429. Fasttrack,
  10430. [RosValue("gnutella")]
  10431. Gnutella,
  10432. [RosValue("none")]
  10433. None,
  10434. [RosValue("soulseek")]
  10435. Soulseek,
  10436. [RosValue("winmx")]
  10437. Winmx,
  10438. }
  10439. [RosValue("p2p", IsDynamic=true)]
  10440. public P2pType? P2p { get; set; }
  10441. public enum ProtocolType
  10442. {
  10443. [RosValue("ddp")]
  10444. Ddp,
  10445. [RosValue("egp")]
  10446. Egp,
  10447. [RosValue("encap")]
  10448. Encap,
  10449. [RosValue("ggp")]
  10450. Ggp,
  10451. [RosValue("gre")]
  10452. Gre,
  10453. [RosValue("hmp")]
  10454. Hmp,
  10455. [RosValue("icmp")]
  10456. Icmp,
  10457. [RosValue("icmpv6")]
  10458. Icmpv6,
  10459. [RosValue("idpr-cmtp")]
  10460. IdprCmtp,
  10461. [RosValue("igmp")]
  10462. Igmp,
  10463. [RosValue("ipencap")]
  10464. Ipencap,
  10465. [RosValue("ipip")]
  10466. Ipip,
  10467. [RosValue("ipsec-ah")]
  10468. IpsecAh,
  10469. [RosValue("ipsec-esp")]
  10470. IpsecEsp,
  10471. [RosValue("iso-tp4")]
  10472. IsoTp4,
  10473. [RosValue("ospf")]
  10474. Ospf,
  10475. [RosValue("pim")]
  10476. Pim,
  10477. [RosValue("pup")]
  10478. Pup,
  10479. [RosValue("rdp")]
  10480. Rdp,
  10481. [RosValue("rspf")]
  10482. Rspf,
  10483. [RosValue("st")]
  10484. St,
  10485. [RosValue("tcp")]
  10486. Tcp,
  10487. [RosValue("udp")]
  10488. Udp,
  10489. [RosValue("vmtp")]
  10490. Vmtp,
  10491. [RosValue("vrrp")]
  10492. Vrrp,
  10493. [RosValue("xns-idp")]
  10494. XnsIdp,
  10495. [RosValue("xtp")]
  10496. Xtp,
  10497. }
  10498. [RosValue("protocol", IsDynamic=true)]
  10499. public ProtocolType? Protocol { get; set; }
  10500. [RosValue("reply-dst-address", IsDynamic=true)]
  10501. public String ReplyDstAddress { get; set; }
  10502. [RosValue("reply-dst-port", IsDynamic=true)]
  10503. public Int32? ReplyDstPort { get; set; }
  10504. [RosValue("reply-src-address", IsDynamic=true)]
  10505. public String ReplySrcAddress { get; set; }
  10506. [RosValue("reply-src-port", IsDynamic=true)]
  10507. public Int32? ReplySrcPort { get; set; }
  10508. public enum SeenType
  10509. {
  10510. [RosValue("assured")]
  10511. Assured,
  10512. [RosValue("connection-mark")]
  10513. ConnectionMark,
  10514. [RosValue("connection-type")]
  10515. ConnectionType,
  10516. [RosValue("dst-address")]
  10517. DstAddress,
  10518. [RosValue("dst-port")]
  10519. DstPort,
  10520. [RosValue("gre-key")]
  10521. GreKey,
  10522. [RosValue("gre-protocol")]
  10523. GreProtocol,
  10524. [RosValue("gre-version")]
  10525. GreVersion,
  10526. [RosValue("icmp-code")]
  10527. IcmpCode,
  10528. [RosValue("icmp-id")]
  10529. IcmpId,
  10530. [RosValue("icmp-type")]
  10531. IcmpType,
  10532. [RosValue("p2p")]
  10533. P2p,
  10534. [RosValue("protocol")]
  10535. Protocol,
  10536. [RosValue("reply-dst-address")]
  10537. ReplyDstAddress,
  10538. [RosValue("reply-dst-port")]
  10539. ReplyDstPort,
  10540. [RosValue("reply-src-address")]
  10541. ReplySrcAddress,
  10542. [RosValue("reply-src-port")]
  10543. ReplySrcPort,
  10544. [RosValue("seen")]
  10545. Seen,
  10546. [RosValue("reply")]
  10547. Reply,
  10548. [RosValue("src-address")]
  10549. SrcAddress,
  10550. [RosValue("src-port")]
  10551. SrcPort,
  10552. [RosValue("tcp-state")]
  10553. TcpState,
  10554. [RosValue("timeout")]
  10555. Timeout,
  10556. }
  10557. [RosValue("seen", IsDynamic=true)]
  10558. public SeenType? Seen { get; set; }
  10559. public enum ReplyType
  10560. {
  10561. [RosValue("assured")]
  10562. Assured,
  10563. [RosValue("connection-mark")]
  10564. ConnectionMark,
  10565. [RosValue("connection-type")]
  10566. ConnectionType,
  10567. [RosValue("dst-address")]
  10568. DstAddress,
  10569. [RosValue("dst-port")]
  10570. DstPort,
  10571. [RosValue("gre-key")]
  10572. GreKey,
  10573. [RosValue("gre-protocol")]
  10574. GreProtocol,
  10575. [RosValue("gre-version")]
  10576. GreVersion,
  10577. [RosValue("icmp-code")]
  10578. IcmpCode,
  10579. [RosValue("icmp-id")]
  10580. IcmpId,
  10581. [RosValue("icmp-type")]
  10582. IcmpType,
  10583. [RosValue("p2p")]
  10584. P2p,
  10585. [RosValue("protocol")]
  10586. Protocol,
  10587. [RosValue("reply-dst-address")]
  10588. ReplyDstAddress,
  10589. [RosValue("reply-dst-port")]
  10590. ReplyDstPort,
  10591. [RosValue("reply-src-address")]
  10592. ReplySrcAddress,
  10593. [RosValue("reply-src-port")]
  10594. ReplySrcPort,
  10595. [RosValue("seen")]
  10596. Seen,
  10597. [RosValue("reply")]
  10598. Reply,
  10599. [RosValue("src-address")]
  10600. SrcAddress,
  10601. [RosValue("src-port")]
  10602. SrcPort,
  10603. [RosValue("tcp-state")]
  10604. TcpState,
  10605. [RosValue("timeout")]
  10606. Timeout,
  10607. }
  10608. [RosValue("reply", IsDynamic=true)]
  10609. public ReplyType? Reply { get; set; }
  10610. [RosValue("src-address", IsDynamic=true)]
  10611. public String SrcAddress { get; set; }
  10612. [RosValue("src-port", IsDynamic=true)]
  10613. public Int32? SrcPort { get; set; }
  10614. public enum TcpStateType
  10615. {
  10616. [RosValue("close")]
  10617. Close,
  10618. [RosValue("close-wait")]
  10619. CloseWait,
  10620. [RosValue("established")]
  10621. Established,
  10622. [RosValue("fin-wait")]
  10623. FinWait,
  10624. [RosValue("last-ack")]
  10625. LastAck,
  10626. [RosValue("listen")]
  10627. Listen,
  10628. [RosValue("none")]
  10629. None,
  10630. [RosValue("syn-recv")]
  10631. SynRecv,
  10632. [RosValue("syn-sent")]
  10633. SynSent,
  10634. [RosValue("time-wait")]
  10635. TimeWait,
  10636. }
  10637. [RosValue("tcp-state", IsDynamic=true)]
  10638. public TcpStateType? TcpState { get; set; }
  10639. [RosValue("timeout", IsDynamic=true)]
  10640. public TimeSpan? Timeout { get; set; }
  10641. }
  10642. [RosObject("ipv6 firewall filter", CanAdd=true, CanSet=true, CanMove=true, CanGet=true, CanRemove=true, CanUnset=true)]
  10643. public class Ipv6FirewallFilter : RosItemObject<Ipv6FirewallFilter>
  10644. {
  10645. public enum ActionEnum
  10646. {
  10647. [RosValue("accept")]
  10648. Accept,
  10649. [RosValue("add-dst-to-address-list")]
  10650. AddDstToAddressList,
  10651. [RosValue("add-src-to-address-list")]
  10652. AddSrcToAddressList,
  10653. [RosValue("drop")]
  10654. Drop,
  10655. [RosValue("jump")]
  10656. Jump,
  10657. }
  10658. [RosValue("action")]
  10659. public ActionEnum? Action { get; set; }
  10660. [RosValue("address-list")]
  10661. public String AddressList { get; set; }
  10662. [RosValue("address-list-timeout")]
  10663. public TimeSpan? AddressListTimeout { get; set; }
  10664. public enum ChainEnum
  10665. {
  10666. [RosValue("forward")]
  10667. Forward,
  10668. [RosValue("input")]
  10669. Input,
  10670. [RosValue("output")]
  10671. Output,
  10672. }
  10673. [RosValue("chain")]
  10674. public ChainEnum? Chain { get; set; }
  10675. // Short description of the item
  10676. [RosValue("comment")]
  10677. public String Comment { get; set; }
  10678. public struct ConnectionBytesType
  10679. {
  10680. public Int32 From { get; set; }
  10681. public Int32 To { get; set; }
  10682. public static ConnectionBytesType Parse(string str)
  10683. {
  10684. string[] strs = str.Split('-');
  10685. if (strs.Length == 2)
  10686. return new ConnectionBytesType() { From = TypeFormatter.ConvertFromString<Int32>(strs[0], null), To = TypeFormatter.ConvertFromString<Int32>(strs[1], null) };
  10687. else if (strs.Length == 1)
  10688. return new ConnectionBytesType() { From = TypeFormatter.ConvertFromString<Int32>(strs[0], null) };
  10689. else
  10690. throw new InvalidOperationException();
  10691. }
  10692. public override string ToString()
  10693. {
  10694. if(To != null)
  10695. return String.Concat(From, '-', To);
  10696. else
  10697. return From.ToString();
  10698. }
  10699. }
  10700. [RosValue("connection-bytes", CanUnset=true)]
  10701. public ConnectionBytesType? ConnectionBytes { get; set; }
  10702. [RosValue("connection-limit", CanUnset=true)]
  10703. public String ConnectionLimit { get; set; }
  10704. [RosValue("connection-mark", CanUnset=true)]
  10705. public String ConnectionMark { get; set; }
  10706. [RosValue("connection-rate", CanUnset=true)]
  10707. public String ConnectionRate { get; set; }
  10708. public enum ConnectionStateEnum
  10709. {
  10710. [RosValue("established")]
  10711. Established,
  10712. [RosValue("invalid")]
  10713. Invalid,
  10714. [RosValue("new")]
  10715. New,
  10716. [RosValue("related")]
  10717. Related,
  10718. }
  10719. [RosValue("connection-state", CanUnset=true)]
  10720. public ConnectionStateEnum? ConnectionState { get; set; }
  10721. [RosValue("connection-type", CanUnset=true)]
  10722. public String ConnectionType { get; set; }
  10723. [RosValue("content", CanUnset=true)]
  10724. public String Content { get; set; }
  10725. // Defines whether item is ignored or used
  10726. [RosValue("disabled")]
  10727. public Boolean? Disabled { get; set; }
  10728. [RosValue("dscp", CanUnset=true)]
  10729. public String Dscp { get; set; }
  10730. [RosValue("dst-address", CanUnset=true)]
  10731. public String DstAddress { get; set; }
  10732. [RosValue("dst-address-list", CanUnset=true)]
  10733. public String DstAddressList { get; set; }
  10734. [RosValue("dst-limit", CanUnset=true)]
  10735. public String DstLimit { get; set; }
  10736. [RosValue("dst-port", CanUnset=true)]
  10737. public String DstPort { get; set; }
  10738. [RosValue("headers", CanUnset=true)]
  10739. public String Headers { get; set; }
  10740. [RosValue("hop-limit", CanUnset=true)]
  10741. public String HopLimit { get; set; }
  10742. [RosValue("icmp-options", CanUnset=true)]
  10743. public String IcmpOptions { get; set; }
  10744. [RosValue("in-bridge-port", CanUnset=true)]
  10745. public String InBridgePort { get; set; }
  10746. [RosValue("in-interface", CanUnset=true)]
  10747. public String InInterface { get; set; }
  10748. [RosValue("ingress-priority", CanUnset=true)]
  10749. public String IngressPriority { get; set; }
  10750. public enum JumpTargetEnum
  10751. {
  10752. [RosValue("forward")]
  10753. Forward,
  10754. [RosValue("input")]
  10755. Input,
  10756. [RosValue("output")]
  10757. Output,
  10758. }
  10759. [RosValue("jump-target")]
  10760. public JumpTargetEnum? JumpTarget { get; set; }
  10761. [RosValue("limit", CanUnset=true)]
  10762. public String Limit { get; set; }
  10763. [RosValue("log-prefix")]
  10764. public String LogPrefix { get; set; }
  10765. [RosValue("nth", CanUnset=true)]
  10766. public String Nth { get; set; }
  10767. [RosValue("out-bridge-port", CanUnset=true)]
  10768. public String OutBridgePort { get; set; }
  10769. [RosValue("out-interface", CanUnset=true)]
  10770. public String OutInterface { get; set; }
  10771. [RosValue("packet-mark", CanUnset=true)]
  10772. public String PacketMark { get; set; }
  10773. [RosValue("packet-size", CanUnset=true)]
  10774. public String PacketSize { get; set; }
  10775. [RosValue("per-connection-classifier", CanUnset=true)]
  10776. public String PerConnectionClassifier { get; set; }
  10777. [RosValue("port", CanUnset=true)]
  10778. public String Port { get; set; }
  10779. [RosValue("protocol", CanUnset=true)]
  10780. public String Protocol { get; set; }
  10781. [RosValue("random", CanUnset=true)]
  10782. public Int32? Random { get; set; }
  10783. public enum RejectWithEnum
  10784. {
  10785. [RosValue("icmp-address-unreachable")]
  10786. IcmpAddressUnreachable,
  10787. [RosValue("icmp-admin-prohibited")]
  10788. IcmpAdminProhibited,
  10789. [RosValue("icmp-no-route")]
  10790. IcmpNoRoute,
  10791. [RosValue("icmp-not-neighbour")]
  10792. IcmpNotNeighbour,
  10793. [RosValue("icmp-port-unreachable")]
  10794. IcmpPortUnreachable,
  10795. }
  10796. [RosValue("reject-with")]
  10797. public RejectWithEnum? RejectWith { get; set; }
  10798. [RosValue("src-address", CanUnset=true)]
  10799. public String SrcAddress { get; set; }
  10800. [RosValue("src-address-list", CanUnset=true)]
  10801. public String SrcAddressList { get; set; }
  10802. [RosValue("src-mac-address", CanUnset=true)]
  10803. public String SrcMacAddress { get; set; }
  10804. [RosValue("src-port", CanUnset=true)]
  10805. public String SrcPort { get; set; }
  10806. [RosValue("tcp-flags", CanUnset=true)]
  10807. public String TcpFlags { get; set; }
  10808. [RosValue("tcp-mss", CanUnset=true)]
  10809. public String TcpMss { get; set; }
  10810. [RosValue("time", CanUnset=true)]
  10811. public String Time { get; set; }
  10812. [RosValue("dynamic", IsDynamic=true)]
  10813. public String Dynamic { get; set; }
  10814. [RosValue("packets", IsDynamic=true)]
  10815. public Int64? Packets { get; set; }
  10816. [RosValue("bytes", IsDynamic=true)]
  10817. public Int64? Bytes { get; set; }
  10818. [RosValue("invalid", IsDynamic=true)]
  10819. public String Invalid { get; set; }
  10820. }
  10821. [RosObject("ipv6 firewall mangle", CanAdd=true, CanSet=true, CanMove=true, CanGet=true, CanRemove=true, CanUnset=true)]
  10822. public class Ipv6FirewallMangle : RosItemObject<Ipv6FirewallMangle>
  10823. {
  10824. public enum ActionEnum
  10825. {
  10826. [RosValue("accept")]
  10827. Accept,
  10828. [RosValue("add-dst-to-address-list")]
  10829. AddDstToAddressList,
  10830. [RosValue("add-src-to-address-list")]
  10831. AddSrcToAddressList,
  10832. [RosValue("change-dscp")]
  10833. ChangeDscp,
  10834. [RosValue("change-hop-limit")]
  10835. ChangeHopLimit,
  10836. }
  10837. [RosValue("action")]
  10838. public ActionEnum? Action { get; set; }
  10839. [RosValue("address-list")]
  10840. public String AddressList { get; set; }
  10841. [RosValue("address-list-timeout")]
  10842. public TimeSpan? AddressListTimeout { get; set; }
  10843. public enum ChainEnum
  10844. {
  10845. [RosValue("forward")]
  10846. Forward,
  10847. [RosValue("input")]
  10848. Input,
  10849. [RosValue("output")]
  10850. Output,
  10851. [RosValue("postrouting")]
  10852. Postrouting,
  10853. [RosValue("prerouting")]
  10854. Prerouting,
  10855. }
  10856. [RosValue("chain")]
  10857. public ChainEnum? Chain { get; set; }
  10858. // Short description of the item
  10859. [RosValue("comment")]
  10860. public String Comment { get; set; }
  10861. public struct ConnectionBytesType
  10862. {
  10863. public Int32 From { get; set; }
  10864. public Int32 To { get; set; }
  10865. public static ConnectionBytesType Parse(string str)
  10866. {
  10867. string[] strs = str.Split('-');
  10868. if (strs.Length == 2)
  10869. return new ConnectionBytesType() { From = TypeFormatter.ConvertFromString<Int32>(strs[0], null), To = TypeFormatter.ConvertFromString<Int32>(strs[1], null) };
  10870. else if (strs.Length == 1)
  10871. return new ConnectionBytesType() { From = TypeFormatter.ConvertFromString<Int32>(strs[0], null) };
  10872. else
  10873. throw new InvalidOperationException();
  10874. }
  10875. public override string ToString()
  10876. {
  10877. if(To != null)
  10878. return String.Concat(From, '-', To);
  10879. else
  10880. return From.ToString();
  10881. }
  10882. }
  10883. [RosValue("connection-bytes", CanUnset=true)]
  10884. public ConnectionBytesType? ConnectionBytes { get; set; }
  10885. [RosValue("connection-limit", CanUnset=true)]
  10886. public String ConnectionLimit { get; set; }
  10887. [RosValue("connection-mark", CanUnset=true)]
  10888. public String ConnectionMark { get; set; }
  10889. [RosValue("connection-rate", CanUnset=true)]
  10890. public String ConnectionRate { get; set; }
  10891. public enum ConnectionStateEnum
  10892. {
  10893. [RosValue("established")]
  10894. Established,
  10895. [RosValue("invalid")]
  10896. Invalid,
  10897. [RosValue("new")]
  10898. New,
  10899. [RosValue("related")]
  10900. Related,
  10901. }
  10902. [RosValue("connection-state", CanUnset=true)]
  10903. public ConnectionStateEnum? ConnectionState { get; set; }
  10904. [RosValue("connection-type", CanUnset=true)]
  10905. public String ConnectionType { get; set; }
  10906. [RosValue("content", CanUnset=true)]
  10907. public String Content { get; set; }
  10908. // Defines whether item is ignored or used
  10909. [RosValue("disabled")]
  10910. public Boolean? Disabled { get; set; }
  10911. [RosValue("dscp", CanUnset=true)]
  10912. public String Dscp { get; set; }
  10913. [RosValue("dst-address", CanUnset=true)]
  10914. public String DstAddress { get; set; }
  10915. [RosValue("dst-address-list", CanUnset=true)]
  10916. public String DstAddressList { get; set; }
  10917. [RosValue("dst-limit", CanUnset=true)]
  10918. public String DstLimit { get; set; }
  10919. [RosValue("dst-port", CanUnset=true)]
  10920. public String DstPort { get; set; }
  10921. [RosValue("headers", CanUnset=true)]
  10922. public String Headers { get; set; }
  10923. [RosValue("hop-limit", CanUnset=true)]
  10924. public String HopLimit { get; set; }
  10925. [RosValue("icmp-options", CanUnset=true)]
  10926. public String IcmpOptions { get; set; }
  10927. [RosValue("in-bridge-port", CanUnset=true)]
  10928. public String InBridgePort { get; set; }
  10929. [RosValue("in-interface", CanUnset=true)]
  10930. public String InInterface { get; set; }
  10931. [RosValue("ingress-priority", CanUnset=true)]
  10932. public String IngressPriority { get; set; }
  10933. public enum JumpTargetEnum
  10934. {
  10935. [RosValue("forward")]
  10936. Forward,
  10937. [RosValue("input")]
  10938. Input,
  10939. [RosValue("output")]
  10940. Output,
  10941. [RosValue("postrouting")]
  10942. Postrouting,
  10943. [RosValue("prerouting")]
  10944. Prerouting,
  10945. }
  10946. [RosValue("jump-target")]
  10947. public JumpTargetEnum? JumpTarget { get; set; }
  10948. [RosValue("limit", CanUnset=true)]
  10949. public String Limit { get; set; }
  10950. [RosValue("log-prefix")]
  10951. public String LogPrefix { get; set; }
  10952. [RosValue("new-connection-mark")]
  10953. public String NewConnectionMark { get; set; }
  10954. [RosValue("new-dscp")]
  10955. public Int32? NewDscp { get; set; }
  10956. [RosValue("new-hop-limit")]
  10957. public String NewHopLimit { get; set; }
  10958. public enum MssActionEnum
  10959. {
  10960. [RosValue("clamp-to-pmtu")]
  10961. ClampToPmtu,
  10962. }
  10963. public struct NewMssType
  10964. {
  10965. private object value;
  10966. public MssActionEnum? MssAction
  10967. {
  10968. get { return value as MssActionEnum?; }
  10969. set { this.value = value; }
  10970. }
  10971. public static implicit operator NewMssType(MssActionEnum? value)
  10972. {
  10973. return new NewMssType() { value = value };
  10974. }public Int32? MssValue
  10975. {
  10976. get { return value as Int32?; }
  10977. set { this.value = value; }
  10978. }
  10979. public static implicit operator NewMssType(Int32? value)
  10980. {
  10981. return new NewMssType() { value = value };
  10982. }
  10983. public static NewMssType Parse(string str, Connection conn)
  10984. {
  10985. try { return new NewMssType() { value = TypeFormatter.ConvertFromString<MssActionEnum>(str, conn) }; }
  10986. catch(Exception) { }
  10987. try { return new NewMssType() { value = TypeFormatter.ConvertFromString<Int32>(str, conn) }; }
  10988. catch(Exception) { }
  10989. throw new NotSupportedException();
  10990. }
  10991. public override string ToString() { return value != null ? value.ToString() : null; }
  10992. }
  10993. [RosValue("new-mss")]
  10994. public NewMssType? NewMss { get; set; }
  10995. [RosValue("new-packet-mark")]
  10996. public String NewPacketMark { get; set; }
  10997. [RosValue("new-routing-mark")]
  10998. public String NewRoutingMark { get; set; }
  10999. [RosValue("nth", CanUnset=true)]
  11000. public String Nth { get; set; }
  11001. [RosValue("out-bridge-port", CanUnset=true)]
  11002. public String OutBridgePort { get; set; }
  11003. [RosValue("out-interface", CanUnset=true)]
  11004. public String OutInterface { get; set; }
  11005. [RosValue("packet-mark", CanUnset=true)]
  11006. public String PacketMark { get; set; }
  11007. [RosValue("packet-size", CanUnset=true)]
  11008. public String PacketSize { get; set; }
  11009. [RosValue("passthrough")]
  11010. public Boolean? Passthrough { get; set; }
  11011. [RosValue("per-connection-classifier", CanUnset=true)]
  11012. public String PerConnectionClassifier { get; set; }
  11013. [RosValue("port", CanUnset=true)]
  11014. public String Port { get; set; }
  11015. [RosValue("protocol", CanUnset=true)]
  11016. public String Protocol { get; set; }
  11017. [RosValue("random", CanUnset=true)]
  11018. public Int32? Random { get; set; }
  11019. [RosValue("src-address", CanUnset=true)]
  11020. public String SrcAddress { get; set; }
  11021. [RosValue("src-address-list", CanUnset=true)]
  11022. public String SrcAddressList { get; set; }
  11023. [RosValue("src-mac-address", CanUnset=true)]
  11024. public String SrcMacAddress { get; set; }
  11025. [RosValue("src-port", CanUnset=true)]
  11026. public String SrcPort { get; set; }
  11027. [RosValue("tcp-flags", CanUnset=true)]
  11028. public String TcpFlags { get; set; }
  11029. [RosValue("tcp-mss", CanUnset=true)]
  11030. public String TcpMss { get; set; }
  11031. [RosValue("time", CanUnset=true)]
  11032. public String Time { get; set; }
  11033. [RosValue("dynamic", IsDynamic=true)]
  11034. public String Dynamic { get; set; }
  11035. [RosValue("packets", IsDynamic=true)]
  11036. public Int64? Packets { get; set; }
  11037. [RosValue("bytes", IsDynamic=true)]
  11038. public Int64? Bytes { get; set; }
  11039. [RosValue("invalid", IsDynamic=true)]
  11040. public String Invalid { get; set; }
  11041. }
  11042. [RosObject("ipv6 nd", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  11043. public class Ipv6Nd : RosItemObject<Ipv6Nd>
  11044. {
  11045. [RosValue("advertise-dns")]
  11046. public Boolean? AdvertiseDns { get; set; }
  11047. [RosValue("advertise-mac-address")]
  11048. public Boolean? AdvertiseMacAddress { get; set; }
  11049. // Short description of the item
  11050. [RosValue("comment")]
  11051. public String Comment { get; set; }
  11052. // Defines whether item is ignored or used
  11053. [RosValue("disabled")]
  11054. public Boolean? Disabled { get; set; }
  11055. public enum SpecialEnum
  11056. {
  11057. [RosValue("unspecified")]
  11058. Unspecified,
  11059. }
  11060. public struct HopLimitType
  11061. {
  11062. private object value;
  11063. public SpecialEnum? Special
  11064. {
  11065. get { return value as SpecialEnum?; }
  11066. set { this.value = value; }
  11067. }
  11068. public static implicit operator HopLimitType(SpecialEnum? value)
  11069. {
  11070. return new HopLimitType() { value = value };
  11071. }public Int32? Value
  11072. {
  11073. get { return value as Int32?; }
  11074. set { this.value = value; }
  11075. }
  11076. public static implicit operator HopLimitType(Int32? value)
  11077. {
  11078. return new HopLimitType() { value = value };
  11079. }
  11080. public static HopLimitType Parse(string str, Connection conn)
  11081. {
  11082. try { return new HopLimitType() { value = TypeFormatter.ConvertFromString<SpecialEnum>(str, conn) }; }
  11083. catch(Exception) { }
  11084. try { return new HopLimitType() { value = TypeFormatter.ConvertFromString<Int32>(str, conn) }; }
  11085. catch(Exception) { }
  11086. throw new NotSupportedException();
  11087. }
  11088. public override string ToString() { return value != null ? value.ToString() : null; }
  11089. }
  11090. [RosValue("hop-limit")]
  11091. public HopLimitType? HopLimit { get; set; }
  11092. public struct InterfaceType
  11093. {
  11094. private object value;
  11095. public RouterOS.Interface Interface
  11096. {
  11097. get { return value as RouterOS.Interface; }
  11098. set { this.value = value; }
  11099. }
  11100. public static implicit operator InterfaceType(RouterOS.Interface value)
  11101. {
  11102. return new InterfaceType() { value = value };
  11103. }public RouterOS.Interface Interface2
  11104. {
  11105. get { return value as RouterOS.Interface; }
  11106. set { this.value = value; }
  11107. }
  11108. public static implicit operator InterfaceType(RouterOS.Interface value)
  11109. {
  11110. return new InterfaceType() { value = value };
  11111. }
  11112. public static InterfaceType Parse(string str, Connection conn)
  11113. {
  11114. try { return new InterfaceType() { value = TypeFormatter.ConvertFromString<RouterOS.Interface>(str, conn) }; }
  11115. catch(Exception) { }
  11116. try { return new InterfaceType() { value = TypeFormatter.ConvertFromString<RouterOS.Interface>(str, conn) }; }
  11117. catch(Exception) { }
  11118. throw new NotSupportedException();
  11119. }
  11120. public override string ToString() { return value != null ? value.ToString() : null; }
  11121. }
  11122. [RosValue("interface")]
  11123. public InterfaceType? Interface { get; set; }
  11124. [RosValue("managed-address-configuration")]
  11125. public Boolean? ManagedAddressConfiguration { get; set; }
  11126. public struct MtuType
  11127. {
  11128. private object value;
  11129. public SpecialEnum? Special
  11130. {
  11131. get { return value as SpecialEnum?; }
  11132. set { this.value = value; }
  11133. }
  11134. public static implicit operator MtuType(SpecialEnum? value)
  11135. {
  11136. return new MtuType() { value = value };
  11137. }public Int32? Value
  11138. {
  11139. get { return value as Int32?; }
  11140. set { this.value = value; }
  11141. }
  11142. public static implicit operator MtuType(Int32? value)
  11143. {
  11144. return new MtuType() { value = value };
  11145. }
  11146. public static MtuType Parse(string str, Connection conn)
  11147. {
  11148. try { return new MtuType() { value = TypeFormatter.ConvertFromString<SpecialEnum>(str, conn) }; }
  11149. catch(Exception) { }
  11150. try { return new MtuType() { value = TypeFormatter.ConvertFromString<Int32>(str, conn) }; }
  11151. catch(Exception) { }
  11152. throw new NotSupportedException();
  11153. }
  11154. public override string ToString() { return value != null ? value.ToString() : null; }
  11155. }
  11156. [RosValue("mtu")]
  11157. public MtuType? Mtu { get; set; }
  11158. [RosValue("other-configuration")]
  11159. public Boolean? OtherConfiguration { get; set; }
  11160. [RosValue("ra-delay")]
  11161. public TimeSpan? RaDelay { get; set; }
  11162. [RosValue("ra-interval")]
  11163. public String RaInterval { get; set; }
  11164. public enum RaLifetimeEnum
  11165. {
  11166. [RosValue("Value")]
  11167. Value,
  11168. }
  11169. public struct RaLifetimeType
  11170. {
  11171. private object value;
  11172. public SpecialEnum? Special
  11173. {
  11174. get { return value as SpecialEnum?; }
  11175. set { this.value = value; }
  11176. }
  11177. public static implicit operator RaLifetimeType(SpecialEnum? value)
  11178. {
  11179. return new RaLifetimeType() { value = value };
  11180. }public RaLifetimeEnum? State
  11181. {
  11182. get { return value as RaLifetimeEnum?; }
  11183. set { this.value = value; }
  11184. }
  11185. public static implicit operator RaLifetimeType(RaLifetimeEnum? value)
  11186. {
  11187. return new RaLifetimeType() { value = value };
  11188. }
  11189. public static RaLifetimeType Parse(string str, Connection conn)
  11190. {
  11191. try { return new RaLifetimeType() { value = TypeFormatter.ConvertFromString<SpecialEnum>(str, conn) }; }
  11192. catch(Exception) { }
  11193. try { return new RaLifetimeType() { value = TypeFormatter.ConvertFromString<RaLifetimeEnum>(str, conn) }; }
  11194. catch(Exception) { }
  11195. throw new NotSupportedException();
  11196. }
  11197. public override string ToString() { return value != null ? value.ToString() : null; }
  11198. }
  11199. [RosValue("ra-lifetime")]
  11200. public RaLifetimeType? RaLifetime { get; set; }
  11201. public enum ReachableTimeEnum
  11202. {
  11203. [RosValue("Value")]
  11204. Value,
  11205. }
  11206. public struct ReachableTimeType
  11207. {
  11208. private object value;
  11209. public SpecialEnum? Special
  11210. {
  11211. get { return value as SpecialEnum?; }
  11212. set { this.value = value; }
  11213. }
  11214. public static implicit operator ReachableTimeType(SpecialEnum? value)
  11215. {
  11216. return new ReachableTimeType() { value = value };
  11217. }public ReachableTimeEnum? State
  11218. {
  11219. get { return value as ReachableTimeEnum?; }
  11220. set { this.value = value; }
  11221. }
  11222. public static implicit operator ReachableTimeType(ReachableTimeEnum? value)
  11223. {
  11224. return new ReachableTimeType() { value = value };
  11225. }
  11226. public static ReachableTimeType Parse(string str, Connection conn)
  11227. {
  11228. try { return new ReachableTimeType() { value = TypeFormatter.ConvertFromString<SpecialEnum>(str, conn) }; }
  11229. catch(Exception) { }
  11230. try { return new ReachableTimeType() { value = TypeFormatter.ConvertFromString<ReachableTimeEnum>(str, conn) }; }
  11231. catch(Exception) { }
  11232. throw new NotSupportedException();
  11233. }
  11234. public override string ToString() { return value != null ? value.ToString() : null; }
  11235. }
  11236. [RosValue("reachable-time")]
  11237. public ReachableTimeType? ReachableTime { get; set; }
  11238. public struct RetransmitIntervalType
  11239. {
  11240. private object value;
  11241. public SpecialEnum? Special
  11242. {
  11243. get { return value as SpecialEnum?; }
  11244. set { this.value = value; }
  11245. }
  11246. public static implicit operator RetransmitIntervalType(SpecialEnum? value)
  11247. {
  11248. return new RetransmitIntervalType() { value = value };
  11249. }public TimeSpan? Value
  11250. {
  11251. get { return value as TimeSpan?; }
  11252. set { this.value = value; }
  11253. }
  11254. public static implicit operator RetransmitIntervalType(TimeSpan? value)
  11255. {
  11256. return new RetransmitIntervalType() { value = value };
  11257. }
  11258. public static RetransmitIntervalType Parse(string str, Connection conn)
  11259. {
  11260. try { return new RetransmitIntervalType() { value = TypeFormatter.ConvertFromString<SpecialEnum>(str, conn) }; }
  11261. catch(Exception) { }
  11262. try { return new RetransmitIntervalType() { value = TypeFormatter.ConvertFromString<TimeSpan>(str, conn) }; }
  11263. catch(Exception) { }
  11264. throw new NotSupportedException();
  11265. }
  11266. public override string ToString() { return value != null ? value.ToString() : null; }
  11267. }
  11268. [RosValue("retransmit-interval")]
  11269. public RetransmitIntervalType? RetransmitInterval { get; set; }
  11270. [RosValue("invalid", IsDynamic=true)]
  11271. public String Invalid { get; set; }
  11272. }
  11273. [RosObject("ipv6 nd prefix", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  11274. public class Ipv6NdPrefix : RosItemObject<Ipv6NdPrefix>
  11275. {
  11276. [RosValue("autonomous")]
  11277. public Boolean? Autonomous { get; set; }
  11278. // Short description of the item
  11279. [RosValue("comment")]
  11280. public String Comment { get; set; }
  11281. // Defines whether item is ignored or used
  11282. [RosValue("disabled")]
  11283. public Boolean? Disabled { get; set; }
  11284. [RosValue("interface")]
  11285. public RouterOS.Interface Interface { get; set; }
  11286. [RosValue("on-link")]
  11287. public Boolean? OnLink { get; set; }
  11288. public enum SpecialEnum
  11289. {
  11290. [RosValue("infinity")]
  11291. Infinity,
  11292. }
  11293. public struct PreferredLifetimeType
  11294. {
  11295. private object value;
  11296. public SpecialEnum? Special
  11297. {
  11298. get { return value as SpecialEnum?; }
  11299. set { this.value = value; }
  11300. }
  11301. public static implicit operator PreferredLifetimeType(SpecialEnum? value)
  11302. {
  11303. return new PreferredLifetimeType() { value = value };
  11304. }public TimeSpan? Value
  11305. {
  11306. get { return value as TimeSpan?; }
  11307. set { this.value = value; }
  11308. }
  11309. public static implicit operator PreferredLifetimeType(TimeSpan? value)
  11310. {
  11311. return new PreferredLifetimeType() { value = value };
  11312. }
  11313. public static PreferredLifetimeType Parse(string str, Connection conn)
  11314. {
  11315. try { return new PreferredLifetimeType() { value = TypeFormatter.ConvertFromString<SpecialEnum>(str, conn) }; }
  11316. catch(Exception) { }
  11317. try { return new PreferredLifetimeType() { value = TypeFormatter.ConvertFromString<TimeSpan>(str, conn) }; }
  11318. catch(Exception) { }
  11319. throw new NotSupportedException();
  11320. }
  11321. public override string ToString() { return value != null ? value.ToString() : null; }
  11322. }
  11323. [RosValue("preferred-lifetime")]
  11324. public PreferredLifetimeType? PreferredLifetime { get; set; }
  11325. [RosValue("prefix")]
  11326. public IPv6Prefix? Prefix { get; set; }
  11327. public struct ValidLifetimeType
  11328. {
  11329. private object value;
  11330. public SpecialEnum? Special
  11331. {
  11332. get { return value as SpecialEnum?; }
  11333. set { this.value = value; }
  11334. }
  11335. public static implicit operator ValidLifetimeType(SpecialEnum? value)
  11336. {
  11337. return new ValidLifetimeType() { value = value };
  11338. }public TimeSpan? Value
  11339. {
  11340. get { return value as TimeSpan?; }
  11341. set { this.value = value; }
  11342. }
  11343. public static implicit operator ValidLifetimeType(TimeSpan? value)
  11344. {
  11345. return new ValidLifetimeType() { value = value };
  11346. }
  11347. public static ValidLifetimeType Parse(string str, Connection conn)
  11348. {
  11349. try { return new ValidLifetimeType() { value = TypeFormatter.ConvertFromString<SpecialEnum>(str, conn) }; }
  11350. catch(Exception) { }
  11351. try { return new ValidLifetimeType() { value = TypeFormatter.ConvertFromString<TimeSpan>(str, conn) }; }
  11352. catch(Exception) { }
  11353. throw new NotSupportedException();
  11354. }
  11355. public override string ToString() { return value != null ? value.ToString() : null; }
  11356. }
  11357. [RosValue("valid-lifetime")]
  11358. public ValidLifetimeType? ValidLifetime { get; set; }
  11359. [RosValue("dynamic", IsDynamic=true)]
  11360. public String Dynamic { get; set; }
  11361. [RosValue("invalid", IsDynamic=true)]
  11362. public String Invalid { get; set; }
  11363. }
  11364. [RosObject("ipv6 nd prefix default", CanSet=true, CanGet=true)]
  11365. public class Ipv6NdPrefixDefault : RosValueObject
  11366. {
  11367. [RosValue("autonomous")]
  11368. public Boolean? Autonomous { get; set; }
  11369. public enum SpecialEnum
  11370. {
  11371. [RosValue("infinity")]
  11372. Infinity,
  11373. }
  11374. public struct PreferredLifetimeType
  11375. {
  11376. private object value;
  11377. public SpecialEnum? Special
  11378. {
  11379. get { return value as SpecialEnum?; }
  11380. set { this.value = value; }
  11381. }
  11382. public static implicit operator PreferredLifetimeType(SpecialEnum? value)
  11383. {
  11384. return new PreferredLifetimeType() { value = value };
  11385. }public TimeSpan? Value
  11386. {
  11387. get { return value as TimeSpan?; }
  11388. set { this.value = value; }
  11389. }
  11390. public static implicit operator PreferredLifetimeType(TimeSpan? value)
  11391. {
  11392. return new PreferredLifetimeType() { value = value };
  11393. }
  11394. public static PreferredLifetimeType Parse(string str, Connection conn)
  11395. {
  11396. try { return new PreferredLifetimeType() { value = TypeFormatter.ConvertFromString<SpecialEnum>(str, conn) }; }
  11397. catch(Exception) { }
  11398. try { return new PreferredLifetimeType() { value = TypeFormatter.ConvertFromString<TimeSpan>(str, conn) }; }
  11399. catch(Exception) { }
  11400. throw new NotSupportedException();
  11401. }
  11402. public override string ToString() { return value != null ? value.ToString() : null; }
  11403. }
  11404. [RosValue("preferred-lifetime")]
  11405. public PreferredLifetimeType? PreferredLifetime { get; set; }
  11406. public struct ValidLifetimeType
  11407. {
  11408. private object value;
  11409. public SpecialEnum? Special
  11410. {
  11411. get { return value as SpecialEnum?; }
  11412. set { this.value = value; }
  11413. }
  11414. public static implicit operator ValidLifetimeType(SpecialEnum? value)
  11415. {
  11416. return new ValidLifetimeType() { value = value };
  11417. }public TimeSpan? Value
  11418. {
  11419. get { return value as TimeSpan?; }
  11420. set { this.value = value; }
  11421. }
  11422. public static implicit operator ValidLifetimeType(TimeSpan? value)
  11423. {
  11424. return new ValidLifetimeType() { value = value };
  11425. }
  11426. public static ValidLifetimeType Parse(string str, Connection conn)
  11427. {
  11428. try { return new ValidLifetimeType() { value = TypeFormatter.ConvertFromString<SpecialEnum>(str, conn) }; }
  11429. catch(Exception) { }
  11430. try { return new ValidLifetimeType() { value = TypeFormatter.ConvertFromString<TimeSpan>(str, conn) }; }
  11431. catch(Exception) { }
  11432. throw new NotSupportedException();
  11433. }
  11434. public override string ToString() { return value != null ? value.ToString() : null; }
  11435. }
  11436. [RosValue("valid-lifetime")]
  11437. public ValidLifetimeType? ValidLifetime { get; set; }
  11438. }
  11439. [RosObject("ipv6 neighbor", CanSet=true, CanGet=true)]
  11440. public class Ipv6Neighbor : RosItemObject<Ipv6Neighbor>
  11441. {
  11442. // Short description of the item
  11443. [RosValue("comment")]
  11444. public String Comment { get; set; }
  11445. [RosValue("address", IsDynamic=true)]
  11446. public String Address { get; set; }
  11447. [RosValue("interface", IsDynamic=true)]
  11448. public RouterOS.Interface Interface { get; set; }
  11449. [RosValue("mac-address", IsDynamic=true)]
  11450. public MACAddress? MacAddress { get; set; }
  11451. [RosValue("router", IsDynamic=true)]
  11452. public String Router { get; set; }
  11453. [RosValue("status", IsDynamic=true)]
  11454. public String Status { get; set; }
  11455. }
  11456. [RosObject("ipv6 route", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true, CanUnset=true)]
  11457. public class Ipv6Route : RosItemObject<Ipv6Route>
  11458. {
  11459. [RosValue("bgp-as-path", CanUnset=true)]
  11460. public String BgpAsPath { get; set; }
  11461. [RosValue("bgp-atomic-aggregate", CanUnset=true)]
  11462. public Boolean? BgpAtomicAggregate { get; set; }
  11463. public enum SpecialEnum
  11464. {
  11465. [RosValue("internet")]
  11466. Internet,
  11467. [RosValue("local-as")]
  11468. LocalAs,
  11469. [RosValue("no-advertise")]
  11470. NoAdvertise,
  11471. [RosValue("no-export")]
  11472. NoExport,
  11473. }
  11474. public struct NumbersType
  11475. {
  11476. public Int32 As { get; set; }
  11477. public Int32 Num { get; set; }
  11478. public static NumbersType Parse(string str)
  11479. {
  11480. string[] strs = str.Split(':');
  11481. if (strs.Length == 2)
  11482. return new NumbersType() { As = TypeFormatter.ConvertFromString<Int32>(strs[0], null), Num = TypeFormatter.ConvertFromString<Int32>(strs[1], null) };
  11483. else
  11484. throw new InvalidOperationException();
  11485. }
  11486. public override string ToString()
  11487. {
  11488. return String.Concat(As, ':', Num);
  11489. }
  11490. }
  11491. public struct CommunityType
  11492. {
  11493. private object value;
  11494. public SpecialEnum? Special
  11495. {
  11496. get { return value as SpecialEnum?; }
  11497. set { this.value = value; }
  11498. }
  11499. public static implicit operator CommunityType(SpecialEnum? value)
  11500. {
  11501. return new CommunityType() { value = value };
  11502. }public NumbersType? Numbers
  11503. {
  11504. get { return value as NumbersType?; }
  11505. set { this.value = value; }
  11506. }
  11507. public static implicit operator CommunityType(NumbersType? value)
  11508. {
  11509. return new CommunityType() { value = value };
  11510. }
  11511. public static CommunityType Parse(string str, Connection conn)
  11512. {
  11513. try { return new CommunityType() { value = TypeFormatter.ConvertFromString<SpecialEnum>(str, conn) }; }
  11514. catch(Exception) { }
  11515. try { return new CommunityType() { value = TypeFormatter.ConvertFromString<NumbersType>(str, conn) }; }
  11516. catch(Exception) { }
  11517. throw new NotSupportedException();
  11518. }
  11519. public override string ToString() { return value != null ? value.ToString() : null; }
  11520. }
  11521. [RosValue("bgp-communities", CanUnset=true)]
  11522. public CommunityType[] BgpCommunities { get; set; }
  11523. [RosValue("bgp-local-pref", CanUnset=true)]
  11524. public Int32? BgpLocalPref { get; set; }
  11525. [RosValue("bgp-med", CanUnset=true)]
  11526. public Int32? BgpMed { get; set; }
  11527. public enum BgpOriginEnum
  11528. {
  11529. [RosValue("egp")]
  11530. Egp,
  11531. [RosValue("igp")]
  11532. Igp,
  11533. [RosValue("incomplete")]
  11534. Incomplete,
  11535. }
  11536. [RosValue("bgp-origin", CanUnset=true)]
  11537. public BgpOriginEnum? BgpOrigin { get; set; }
  11538. public struct BgpPrependType
  11539. {
  11540. private object value;
  11541. public Int32? Num
  11542. {
  11543. get { return value as Int32?; }
  11544. set { this.value = value; }
  11545. }
  11546. public static implicit operator BgpPrependType(Int32? value)
  11547. {
  11548. return new BgpPrependType() { value = value };
  11549. }public RouterOS.InterfaceWirelessSecurityProfiles InterfaceWirelessSecurityProfiles
  11550. {
  11551. get { return value as RouterOS.InterfaceWirelessSecurityProfiles; }
  11552. set { this.value = value; }
  11553. }
  11554. public static implicit operator BgpPrependType(RouterOS.InterfaceWirelessSecurityProfiles value)
  11555. {
  11556. return new BgpPrependType() { value = value };
  11557. }
  11558. public static BgpPrependType Parse(string str, Connection conn)
  11559. {
  11560. try { return new BgpPrependType() { value = TypeFormatter.ConvertFromString<Int32>(str, conn) }; }
  11561. catch(Exception) { }
  11562. try { return new BgpPrependType() { value = TypeFormatter.ConvertFromString<RouterOS.InterfaceWirelessSecurityProfiles>(str, conn) }; }
  11563. catch(Exception) { }
  11564. throw new NotSupportedException();
  11565. }
  11566. public override string ToString() { return value != null ? value.ToString() : null; }
  11567. }
  11568. [RosValue("bgp-prepend", CanUnset=true)]
  11569. public BgpPrependType? BgpPrepend { get; set; }
  11570. public enum CheckGatewayEnum
  11571. {
  11572. [RosValue("ping")]
  11573. Ping,
  11574. }
  11575. [RosValue("check-gateway", CanUnset=true)]
  11576. public CheckGatewayEnum? CheckGateway { get; set; }
  11577. // Short description of the item
  11578. [RosValue("comment")]
  11579. public String Comment { get; set; }
  11580. // Defines whether item is ignored or used
  11581. [RosValue("disabled")]
  11582. public Boolean? Disabled { get; set; }
  11583. [RosValue("distance", CanUnset=true)]
  11584. public Int32? Distance { get; set; }
  11585. [RosValue("dst-address")]
  11586. public IPv6Prefix? DstAddress { get; set; }
  11587. [RosValue("gateway")]
  11588. public String Gateway { get; set; }
  11589. [RosValue("route-tag", CanUnset=true)]
  11590. public Int32? RouteTag { get; set; }
  11591. [RosValue("scope")]
  11592. public Int32? Scope { get; set; }
  11593. [RosValue("target-scope")]
  11594. public Int32? TargetScope { get; set; }
  11595. public enum TypeEnum
  11596. {
  11597. [RosValue("unicast")]
  11598. Unicast,
  11599. [RosValue("unreachable")]
  11600. Unreachable,
  11601. }
  11602. [RosValue("type")]
  11603. public TypeEnum? Type { get; set; }
  11604. [RosValue("bgp-weight", CanUnset=true)]
  11605. public String BgpWeight { get; set; }
  11606. [RosValue("active", IsDynamic=true)]
  11607. public String Active { get; set; }
  11608. [RosValue("bgp", IsDynamic=true)]
  11609. public String Bgp { get; set; }
  11610. [RosValue("connect", IsDynamic=true)]
  11611. public String Connect { get; set; }
  11612. [RosValue("dynamic", IsDynamic=true)]
  11613. public String Dynamic { get; set; }
  11614. [RosValue("gateway-status", IsDynamic=true)]
  11615. public String GatewayStatus { get; set; }
  11616. [RosValue("ospf", IsDynamic=true)]
  11617. public String Ospf { get; set; }
  11618. [RosValue("ospf-metric", IsDynamic=true)]
  11619. public Int32? OspfMetric { get; set; }
  11620. public enum OspfTypeType
  11621. {
  11622. [RosValue("external-type-1")]
  11623. ExternalType1,
  11624. [RosValue("external-type-2")]
  11625. ExternalType2,
  11626. [RosValue("inter-area")]
  11627. InterArea,
  11628. [RosValue("intra-area")]
  11629. IntraArea,
  11630. }
  11631. [RosValue("ospf-type", IsDynamic=true)]
  11632. public OspfTypeType? OspfType { get; set; }
  11633. [RosValue("received-from", IsDynamic=true)]
  11634. public String ReceivedFrom { get; set; }
  11635. [RosValue("rip", IsDynamic=true)]
  11636. public String Rip { get; set; }
  11637. [RosValue("static", IsDynamic=true)]
  11638. public String Static { get; set; }
  11639. [RosValue("unreachable", IsDynamic=true)]
  11640. public String Unreachable { get; set; }
  11641. }
  11642. [RosObject("log", CanGet=true)]
  11643. public class Log : RosItemObject<Log>
  11644. {
  11645. [RosValue("buffer", IsDynamic=true)]
  11646. public RouterOS.SystemLoggingAction Buffer { get; set; }
  11647. [RosValue("message", IsDynamic=true)]
  11648. public String Message { get; set; }
  11649. [RosValue("time", IsDynamic=true)]
  11650. public DateTime? Time { get; set; }
  11651. public enum TopicEnum
  11652. {
  11653. [RosValue("account")]
  11654. Account,
  11655. [RosValue("async")]
  11656. Async,
  11657. [RosValue("backup")]
  11658. Backup,
  11659. [RosValue("bfd")]
  11660. Bfd,
  11661. [RosValue("bgp")]
  11662. Bgp,
  11663. }
  11664. [RosValue("topics", IsDynamic=true)]
  11665. public TopicEnum? Topics { get; set; }
  11666. }
  11667. [RosObject("mpls", CanSet=true, CanGet=true)]
  11668. public class Mpls : RosValueObject
  11669. {
  11670. [RosValue("dynamic-label-range")]
  11671. public String DynamicLabelRange { get; set; }
  11672. public enum PropagateTtlEnum
  11673. {
  11674. [RosValue("no")]
  11675. No,
  11676. [RosValue("yes")]
  11677. Yes,
  11678. }
  11679. [RosValue("propagate-ttl")]
  11680. public PropagateTtlEnum? PropagateTtl { get; set; }
  11681. }
  11682. [RosObject("mpls forwarding-table", CanGet=true)]
  11683. public class MplsForwardingTable : RosItemObject<MplsForwardingTable>
  11684. {
  11685. [RosValue("bytes", IsDynamic=true)]
  11686. public Int32? Bytes { get; set; }
  11687. [RosValue("destination", IsDynamic=true)]
  11688. public IPPrefix? Destination { get; set; }
  11689. [RosValue("in-label", IsDynamic=true)]
  11690. public Int32? InLabel { get; set; }
  11691. [RosValue("interface", IsDynamic=true)]
  11692. public RouterOS.Interface Interface { get; set; }
  11693. [RosValue("ldp", IsDynamic=true)]
  11694. public String Ldp { get; set; }
  11695. [RosValue("nexthop", IsDynamic=true)]
  11696. public IPAddress Nexthop { get; set; }
  11697. [RosValue("out-labels", IsDynamic=true)]
  11698. public Int32? OutLabels { get; set; }
  11699. [RosValue("packets", IsDynamic=true)]
  11700. public Int32? Packets { get; set; }
  11701. [RosValue("traffic-eng", IsDynamic=true)]
  11702. public String TrafficEng { get; set; }
  11703. [RosValue("vpls", IsDynamic=true)]
  11704. public String Vpls { get; set; }
  11705. }
  11706. [RosObject("mpls interface", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  11707. public class MplsInterface : RosItemObject<MplsInterface>
  11708. {
  11709. // Short description of the item
  11710. [RosValue("comment")]
  11711. public String Comment { get; set; }
  11712. // Defines whether item is ignored or used
  11713. [RosValue("disabled")]
  11714. public Boolean? Disabled { get; set; }
  11715. public enum InterfaceEnum
  11716. {
  11717. [RosValue("all")]
  11718. All,
  11719. }
  11720. public struct InterfaceType
  11721. {
  11722. private object value;
  11723. public RouterOS.Interface Interface
  11724. {
  11725. get { return value as RouterOS.Interface; }
  11726. set { this.value = value; }
  11727. }
  11728. public static implicit operator InterfaceType(RouterOS.Interface value)
  11729. {
  11730. return new InterfaceType() { value = value };
  11731. }public InterfaceEnum? State
  11732. {
  11733. get { return value as InterfaceEnum?; }
  11734. set { this.value = value; }
  11735. }
  11736. public static implicit operator InterfaceType(InterfaceEnum? value)
  11737. {
  11738. return new InterfaceType() { value = value };
  11739. }
  11740. public static InterfaceType Parse(string str, Connection conn)
  11741. {
  11742. try { return new InterfaceType() { value = TypeFormatter.ConvertFromString<RouterOS.Interface>(str, conn) }; }
  11743. catch(Exception) { }
  11744. try { return new InterfaceType() { value = TypeFormatter.ConvertFromString<InterfaceEnum>(str, conn) }; }
  11745. catch(Exception) { }
  11746. throw new NotSupportedException();
  11747. }
  11748. public override string ToString() { return value != null ? value.ToString() : null; }
  11749. }
  11750. [RosValue("interface")]
  11751. public InterfaceType? Interface { get; set; }
  11752. [RosValue("mpls-mtu")]
  11753. public Int32? MplsMtu { get; set; }
  11754. }
  11755. [RosObject("mpls ldp", CanSet=true, CanGet=true)]
  11756. public class MplsLdp : RosValueObject
  11757. {
  11758. [RosValue("distribute-for-default-route")]
  11759. public Boolean? DistributeForDefaultRoute { get; set; }
  11760. [RosValue("enabled")]
  11761. public Boolean? Enabled { get; set; }
  11762. [RosValue("hop-limit")]
  11763. public Int32? HopLimit { get; set; }
  11764. [RosValue("loop-detect")]
  11765. public Boolean? LoopDetect { get; set; }
  11766. [RosValue("lsr-id")]
  11767. public IPAddress LsrId { get; set; }
  11768. [RosValue("path-vector-limit")]
  11769. public Int32? PathVectorLimit { get; set; }
  11770. [RosValue("transport-address")]
  11771. public IPAddress TransportAddress { get; set; }
  11772. [RosValue("use-explicit-null")]
  11773. public Boolean? UseExplicitNull { get; set; }
  11774. }
  11775. [RosObject("mpls ldp accept-filter", CanAdd=true, CanSet=true, CanMove=true, CanGet=true, CanRemove=true)]
  11776. public class MplsLdpAcceptFilter : RosItemObject<MplsLdpAcceptFilter>
  11777. {
  11778. [RosValue("accept")]
  11779. public Boolean? Accept { get; set; }
  11780. // Short description of the item
  11781. [RosValue("comment")]
  11782. public String Comment { get; set; }
  11783. // Defines whether item is ignored or used
  11784. [RosValue("disabled")]
  11785. public Boolean? Disabled { get; set; }
  11786. [RosValue("neighbor")]
  11787. public IPAddress Neighbor { get; set; }
  11788. [RosValue("prefix")]
  11789. public IPPrefix? Prefix { get; set; }
  11790. }
  11791. [RosObject("mpls ldp advertise-filter", CanAdd=true, CanSet=true, CanMove=true, CanGet=true, CanRemove=true)]
  11792. public class MplsLdpAdvertiseFilter : RosItemObject<MplsLdpAdvertiseFilter>
  11793. {
  11794. [RosValue("advertise")]
  11795. public Boolean? Advertise { get; set; }
  11796. // Short description of the item
  11797. [RosValue("comment")]
  11798. public String Comment { get; set; }
  11799. // Defines whether item is ignored or used
  11800. [RosValue("disabled")]
  11801. public Boolean? Disabled { get; set; }
  11802. [RosValue("neighbor")]
  11803. public IPAddress Neighbor { get; set; }
  11804. [RosValue("prefix")]
  11805. public IPPrefix? Prefix { get; set; }
  11806. }
  11807. [RosObject("mpls ldp interface", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  11808. public class MplsLdpInterface : RosItemObject<MplsLdpInterface>
  11809. {
  11810. [RosValue("accept-dynamic-neighbors")]
  11811. public Boolean? AcceptDynamicNeighbors { get; set; }
  11812. // Short description of the item
  11813. [RosValue("comment")]
  11814. public String Comment { get; set; }
  11815. // Defines whether item is ignored or used
  11816. [RosValue("disabled")]
  11817. public Boolean? Disabled { get; set; }
  11818. [RosValue("hello-interval")]
  11819. public TimeSpan? HelloInterval { get; set; }
  11820. [RosValue("hold-time")]
  11821. public TimeSpan? HoldTime { get; set; }
  11822. [RosValue("interface")]
  11823. public RouterOS.Interface Interface { get; set; }
  11824. [RosValue("transport-address")]
  11825. public IPAddress TransportAddress { get; set; }
  11826. [RosValue("invalid", IsDynamic=true)]
  11827. public String Invalid { get; set; }
  11828. }
  11829. [RosObject("mpls ldp neighbor", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  11830. public class MplsLdpNeighbor : RosItemObject<MplsLdpNeighbor>
  11831. {
  11832. // Short description of the item
  11833. [RosValue("comment")]
  11834. public String Comment { get; set; }
  11835. // Defines whether item is ignored or used
  11836. [RosValue("disabled")]
  11837. public Boolean? Disabled { get; set; }
  11838. [RosValue("send-targeted")]
  11839. public Boolean? SendTargeted { get; set; }
  11840. [RosValue("transport")]
  11841. public IPAddress Transport { get; set; }
  11842. [RosValue("addresses", IsDynamic=true)]
  11843. public IPAddress Addresses { get; set; }
  11844. [RosValue("dynamic", IsDynamic=true)]
  11845. public String Dynamic { get; set; }
  11846. [RosValue("local-transport", IsDynamic=true)]
  11847. public IPAddress LocalTransport { get; set; }
  11848. [RosValue("operational", IsDynamic=true)]
  11849. public String Operational { get; set; }
  11850. [RosValue("peer", IsDynamic=true)]
  11851. public IPAddress Peer { get; set; }
  11852. [RosValue("sending-targeted-hello", IsDynamic=true)]
  11853. public String SendingTargetedHello { get; set; }
  11854. [RosValue("vpls", IsDynamic=true)]
  11855. public String Vpls { get; set; }
  11856. }
  11857. [RosObject("mpls local-bindings", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  11858. public class MplsLocalBindings : RosItemObject<MplsLocalBindings>
  11859. {
  11860. // Short description of the item
  11861. [RosValue("comment")]
  11862. public String Comment { get; set; }
  11863. // Defines whether item is ignored or used
  11864. [RosValue("disabled")]
  11865. public Boolean? Disabled { get; set; }
  11866. [RosValue("dst-address")]
  11867. public IPPrefix? DstAddress { get; set; }
  11868. public enum LabelEnumEnum
  11869. {
  11870. [RosValue("alert")]
  11871. Alert,
  11872. [RosValue("expl-null")]
  11873. ExplNull,
  11874. [RosValue("expl-null6")]
  11875. ExplNull6,
  11876. [RosValue("impl-null")]
  11877. ImplNull,
  11878. [RosValue("none")]
  11879. None,
  11880. }
  11881. public struct LabelType
  11882. {
  11883. private object value;
  11884. public LabelEnumEnum? LabelEnum
  11885. {
  11886. get { return value as LabelEnumEnum?; }
  11887. set { this.value = value; }
  11888. }
  11889. public static implicit operator LabelType(LabelEnumEnum? value)
  11890. {
  11891. return new LabelType() { value = value };
  11892. }public Int32? LabelNum
  11893. {
  11894. get { return value as Int32?; }
  11895. set { this.value = value; }
  11896. }
  11897. public static implicit operator LabelType(Int32? value)
  11898. {
  11899. return new LabelType() { value = value };
  11900. }
  11901. public static LabelType Parse(string str, Connection conn)
  11902. {
  11903. try { return new LabelType() { value = TypeFormatter.ConvertFromString<LabelEnumEnum>(str, conn) }; }
  11904. catch(Exception) { }
  11905. try { return new LabelType() { value = TypeFormatter.ConvertFromString<Int32>(str, conn) }; }
  11906. catch(Exception) { }
  11907. throw new NotSupportedException();
  11908. }
  11909. public override string ToString() { return value != null ? value.ToString() : null; }
  11910. }
  11911. [RosValue("label")]
  11912. public LabelType? Label { get; set; }
  11913. [RosValue("adv-path", IsDynamic=true)]
  11914. public String AdvPath { get; set; }
  11915. [RosValue("advertised", IsDynamic=true)]
  11916. public String Advertised { get; set; }
  11917. [RosValue("dynamic", IsDynamic=true)]
  11918. public String Dynamic { get; set; }
  11919. [RosValue("egress", IsDynamic=true)]
  11920. public String Egress { get; set; }
  11921. [RosValue("gateway-route", IsDynamic=true)]
  11922. public String GatewayRoute { get; set; }
  11923. [RosValue("local-route", IsDynamic=true)]
  11924. public String LocalRoute { get; set; }
  11925. [RosValue("peers", IsDynamic=true)]
  11926. public IPAddress Peers { get; set; }
  11927. }
  11928. [RosObject("mpls remote-bindings", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  11929. public class MplsRemoteBindings : RosItemObject<MplsRemoteBindings>
  11930. {
  11931. // Short description of the item
  11932. [RosValue("comment")]
  11933. public String Comment { get; set; }
  11934. // Defines whether item is ignored or used
  11935. [RosValue("disabled")]
  11936. public Boolean? Disabled { get; set; }
  11937. [RosValue("dst-address")]
  11938. public IPPrefix? DstAddress { get; set; }
  11939. public enum LabelEnumEnum
  11940. {
  11941. [RosValue("alert")]
  11942. Alert,
  11943. [RosValue("expl-null")]
  11944. ExplNull,
  11945. [RosValue("expl-null6")]
  11946. ExplNull6,
  11947. [RosValue("impl-null")]
  11948. ImplNull,
  11949. [RosValue("none")]
  11950. None,
  11951. }
  11952. public struct LabelType
  11953. {
  11954. private object value;
  11955. public LabelEnumEnum? LabelEnum
  11956. {
  11957. get { return value as LabelEnumEnum?; }
  11958. set { this.value = value; }
  11959. }
  11960. public static implicit operator LabelType(LabelEnumEnum? value)
  11961. {
  11962. return new LabelType() { value = value };
  11963. }public Int32? LabelNum
  11964. {
  11965. get { return value as Int32?; }
  11966. set { this.value = value; }
  11967. }
  11968. public static implicit operator LabelType(Int32? value)
  11969. {
  11970. return new LabelType() { value = value };
  11971. }
  11972. public static LabelType Parse(string str, Connection conn)
  11973. {
  11974. try { return new LabelType() { value = TypeFormatter.ConvertFromString<LabelEnumEnum>(str, conn) }; }
  11975. catch(Exception) { }
  11976. try { return new LabelType() { value = TypeFormatter.ConvertFromString<Int32>(str, conn) }; }
  11977. catch(Exception) { }
  11978. throw new NotSupportedException();
  11979. }
  11980. public override string ToString() { return value != null ? value.ToString() : null; }
  11981. }
  11982. [RosValue("label")]
  11983. public LabelType? Label { get; set; }
  11984. [RosValue("nexthop")]
  11985. public IPAddress Nexthop { get; set; }
  11986. [RosValue("active", IsDynamic=true)]
  11987. public String Active { get; set; }
  11988. [RosValue("dynamic", IsDynamic=true)]
  11989. public String Dynamic { get; set; }
  11990. [RosValue("path", IsDynamic=true)]
  11991. public String Path { get; set; }
  11992. [RosValue("peer", IsDynamic=true)]
  11993. public IPAddress Peer { get; set; }
  11994. }
  11995. [RosObject("mpls traffic-eng interface", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  11996. public class MplsTrafficEngInterface : RosItemObject<MplsTrafficEngInterface>
  11997. {
  11998. [RosValue("bandwidth")]
  11999. public Bits Bandwidth { get; set; }
  12000. [RosValue("blockade-k-factor")]
  12001. public Int32? BlockadeKFactor { get; set; }
  12002. // Short description of the item
  12003. [RosValue("comment")]
  12004. public String Comment { get; set; }
  12005. // Defines whether item is ignored or used
  12006. [RosValue("disabled")]
  12007. public Boolean? Disabled { get; set; }
  12008. [RosValue("down-flood-thresholds")]
  12009. public Int32[] DownFloodThresholds { get; set; }
  12010. [RosValue("igp-flood-period")]
  12011. public TimeSpan? IgpFloodPeriod { get; set; }
  12012. [RosValue("interface")]
  12013. public RouterOS.Interface Interface { get; set; }
  12014. [RosValue("k-factor")]
  12015. public Int32? KFactor { get; set; }
  12016. [RosValue("refresh-time")]
  12017. public TimeSpan? RefreshTime { get; set; }
  12018. [RosValue("resource-class")]
  12019. public Int32? ResourceClass { get; set; }
  12020. [RosValue("te-metric")]
  12021. public Int32? TeMetric { get; set; }
  12022. [RosValue("up-flood-thresholds")]
  12023. public Int32[] UpFloodThresholds { get; set; }
  12024. [RosValue("use-udp")]
  12025. public Boolean? UseUdp { get; set; }
  12026. [RosValue("invalid", IsDynamic=true)]
  12027. public String Invalid { get; set; }
  12028. [RosValue("remaining-bw", IsDynamic=true)]
  12029. public Bits RemainingBw { get; set; }
  12030. }
  12031. [RosObject("mpls traffic-eng path-state", CanGet=true)]
  12032. public class MplsTrafficEngPathState : RosItemObject<MplsTrafficEngPathState>
  12033. {
  12034. [RosValue("bandwidth", IsDynamic=true)]
  12035. public Bits Bandwidth { get; set; }
  12036. [RosValue("dst", IsDynamic=true)]
  12037. public IPAddress Dst { get; set; }
  12038. [RosValue("egress", IsDynamic=true)]
  12039. public String Egress { get; set; }
  12040. [RosValue("forwarding", IsDynamic=true)]
  12041. public String Forwarding { get; set; }
  12042. [RosValue("in-interface", IsDynamic=true)]
  12043. public RouterOS.Interface InInterface { get; set; }
  12044. [RosValue("in-previous-hop", IsDynamic=true)]
  12045. public IPAddress InPreviousHop { get; set; }
  12046. [RosValue("label", IsDynamic=true)]
  12047. public Int32? Label { get; set; }
  12048. [RosValue("locally-originated", IsDynamic=true)]
  12049. public String LocallyOriginated { get; set; }
  12050. [RosValue("out-interface", IsDynamic=true)]
  12051. public RouterOS.Interface OutInterface { get; set; }
  12052. [RosValue("out-label", IsDynamic=true)]
  12053. public Int32? OutLabel { get; set; }
  12054. [RosValue("out-next-hop", IsDynamic=true)]
  12055. public IPAddress OutNextHop { get; set; }
  12056. [RosValue("path-in-explicit-route", IsDynamic=true)]
  12057. public String PathInExplicitRoute { get; set; }
  12058. [RosValue("path-in-record-route", IsDynamic=true)]
  12059. public String PathInRecordRoute { get; set; }
  12060. [RosValue("path-out-explicit-route", IsDynamic=true)]
  12061. public String PathOutExplicitRoute { get; set; }
  12062. [RosValue("path-out-record-route", IsDynamic=true)]
  12063. public String PathOutRecordRoute { get; set; }
  12064. [RosValue("resv-bandwidth", IsDynamic=true)]
  12065. public Bits ResvBandwidth { get; set; }
  12066. [RosValue("resv-out-record-route", IsDynamic=true)]
  12067. public String ResvOutRecordRoute { get; set; }
  12068. [RosValue("sending-path", IsDynamic=true)]
  12069. public String SendingPath { get; set; }
  12070. [RosValue("sending-resv", IsDynamic=true)]
  12071. public String SendingResv { get; set; }
  12072. [RosValue("src", IsDynamic=true)]
  12073. public IPAddress Src { get; set; }
  12074. }
  12075. [RosObject("mpls traffic-eng resv-state", CanGet=true)]
  12076. public class MplsTrafficEngResvState : RosItemObject<MplsTrafficEngResvState>
  12077. {
  12078. [RosValue("active", IsDynamic=true)]
  12079. public String Active { get; set; }
  12080. [RosValue("bandwidth", IsDynamic=true)]
  12081. public Bits Bandwidth { get; set; }
  12082. [RosValue("dst", IsDynamic=true)]
  12083. public IPAddress Dst { get; set; }
  12084. [RosValue("egress", IsDynamic=true)]
  12085. public String Egress { get; set; }
  12086. [RosValue("interface", IsDynamic=true)]
  12087. public RouterOS.Interface Interface { get; set; }
  12088. [RosValue("label", IsDynamic=true)]
  12089. public Int32? Label { get; set; }
  12090. [RosValue("next-hop", IsDynamic=true)]
  12091. public IPAddress NextHop { get; set; }
  12092. [RosValue("non-output", IsDynamic=true)]
  12093. public String NonOutput { get; set; }
  12094. [RosValue("recorded-route", IsDynamic=true)]
  12095. public String RecordedRoute { get; set; }
  12096. [RosValue("shared", IsDynamic=true)]
  12097. public String Shared { get; set; }
  12098. [RosValue("src", IsDynamic=true)]
  12099. public IPAddress Src { get; set; }
  12100. }
  12101. [RosObject("mpls traffic-eng tunnel-path", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true, CanUnset=true)]
  12102. public class MplsTrafficEngTunnelPath : RosItemObject<MplsTrafficEngTunnelPath>
  12103. {
  12104. [RosValue("affinity-exclude", CanUnset=true)]
  12105. public Int32? AffinityExclude { get; set; }
  12106. [RosValue("affinity-include-all", CanUnset=true)]
  12107. public Int32? AffinityIncludeAll { get; set; }
  12108. [RosValue("affinity-include-any", CanUnset=true)]
  12109. public Int32? AffinityIncludeAny { get; set; }
  12110. // Short description of the item
  12111. [RosValue("comment")]
  12112. public String Comment { get; set; }
  12113. // Defines whether item is ignored or used
  12114. [RosValue("disabled")]
  12115. public Boolean? Disabled { get; set; }
  12116. [RosValue("holding-priority", CanUnset=true)]
  12117. public Int32? HoldingPriority { get; set; }
  12118. public enum StrictEnum
  12119. {
  12120. [RosValue("strict")]
  12121. Strict,
  12122. [RosValue("loose")]
  12123. Loose,
  12124. }
  12125. public struct HopType
  12126. {
  12127. public IPAddress Address { get; set; }
  12128. public StrictEnum Strict { get; set; }
  12129. public static HopType Parse(string str)
  12130. {
  12131. string[] strs = str.Split(':');
  12132. if (strs.Length == 2)
  12133. return new HopType() { Address = TypeFormatter.ConvertFromString<IPAddress>(strs[0], null), Strict = TypeFormatter.ConvertFromString<StrictEnum>(strs[1], null) };
  12134. else
  12135. throw new InvalidOperationException();
  12136. }
  12137. public override string ToString()
  12138. {
  12139. return String.Concat(Address, ':', Strict);
  12140. }
  12141. }
  12142. [RosValue("hops")]
  12143. public HopType[] Hops { get; set; }
  12144. [RosValue("name")]
  12145. public String Name { get; set; }
  12146. [RosValue("record-route", CanUnset=true)]
  12147. public Boolean? RecordRoute { get; set; }
  12148. [RosValue("reoptimize-interval", CanUnset=true)]
  12149. public TimeSpan? ReoptimizeInterval { get; set; }
  12150. [RosValue("setup-priority", CanUnset=true)]
  12151. public Int32? SetupPriority { get; set; }
  12152. [RosValue("use-cspf")]
  12153. public Boolean? UseCspf { get; set; }
  12154. public static MplsTrafficEngTunnelPath Parse(string str, Connection conn)
  12155. {
  12156. if(string.IsNullOrEmpty(str))
  12157. return null;
  12158. MplsTrafficEngTunnelPath obj = new MplsTrafficEngTunnelPath();
  12159. obj.FindByName(conn, str);
  12160. return obj;
  12161. }
  12162. public override string ToString() { return Name.ToString(); }
  12163. }
  12164. [RosObject("port", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  12165. public class Port : RosItemObject<Port>
  12166. {
  12167. public enum BaudRateEnum
  12168. {
  12169. [RosValue("1000000")]
  12170. E1000000,
  12171. [RosValue("110")]
  12172. E110,
  12173. [RosValue("115200")]
  12174. E115200,
  12175. [RosValue("1152000")]
  12176. E1152000,
  12177. [RosValue("1200")]
  12178. E1200,
  12179. }
  12180. // Baud rate (bits/s)
  12181. [RosValue("baud-rate")]
  12182. public BaudRateEnum? BaudRate { get; set; }
  12183. public enum DataBitsEnum
  12184. {
  12185. [RosValue("7")]
  12186. E7,
  12187. [RosValue("8")]
  12188. E8,
  12189. }
  12190. // Number of bits for data
  12191. [RosValue("data-bits")]
  12192. public DataBitsEnum? DataBits { get; set; }
  12193. public enum DtrEnum
  12194. {
  12195. [RosValue("on")]
  12196. On,
  12197. [RosValue("off")]
  12198. Off,
  12199. }
  12200. [RosValue("dtr")]
  12201. public DtrEnum? Dtr { get; set; }
  12202. public enum FlowControlEnum
  12203. {
  12204. [RosValue("hardware")]
  12205. Hardware,
  12206. [RosValue("none")]
  12207. None,
  12208. [RosValue("xon-xoff")]
  12209. XonXoff,
  12210. }
  12211. // Type of flow control
  12212. [RosValue("flow-control")]
  12213. public FlowControlEnum? FlowControl { get; set; }
  12214. // New port name
  12215. [RosValue("name")]
  12216. public String Name { get; set; }
  12217. public enum ParityEnum
  12218. {
  12219. [RosValue("even")]
  12220. Even,
  12221. [RosValue("none")]
  12222. None,
  12223. [RosValue("odd")]
  12224. Odd,
  12225. }
  12226. // Parity
  12227. [RosValue("parity")]
  12228. public ParityEnum? Parity { get; set; }
  12229. public enum RtsEnum
  12230. {
  12231. [RosValue("on")]
  12232. On,
  12233. [RosValue("off")]
  12234. Off,
  12235. }
  12236. [RosValue("rts")]
  12237. public RtsEnum? Rts { get; set; }
  12238. public enum StopBitsEnum
  12239. {
  12240. [RosValue("1")]
  12241. E1,
  12242. [RosValue("2")]
  12243. E2,
  12244. }
  12245. // Number of bits for control
  12246. [RosValue("stop-bits")]
  12247. public StopBitsEnum? StopBits { get; set; }
  12248. [RosValue("channels", IsDynamic=true)]
  12249. public Int32? Channels { get; set; }
  12250. [RosValue("inactive", IsDynamic=true)]
  12251. public String Inactive { get; set; }
  12252. public enum LineStateType
  12253. {
  12254. [RosValue("cts")]
  12255. Cts,
  12256. [RosValue("dcd")]
  12257. Dcd,
  12258. [RosValue("dsr")]
  12259. Dsr,
  12260. [RosValue("dtr")]
  12261. Dtr,
  12262. [RosValue("ri")]
  12263. Ri,
  12264. [RosValue("rts")]
  12265. Rts,
  12266. }
  12267. [RosValue("line-state", IsDynamic=true)]
  12268. public LineStateType? LineState { get; set; }
  12269. [RosValue("used-by", IsDynamic=true)]
  12270. public String UsedBy { get; set; }
  12271. public static Port Serial0Port
  12272. {
  12273. get { return new Port() { Id = 1 }; }
  12274. }
  12275. public static Port Serial1Port
  12276. {
  12277. get { return new Port() { Id = 2 }; }
  12278. }
  12279. public static Port Parse(string str, Connection conn)
  12280. {
  12281. if(string.IsNullOrEmpty(str))
  12282. return null;
  12283. Port obj = new Port();
  12284. obj.FindByName(conn, str);
  12285. return obj;
  12286. }
  12287. public override string ToString() { return Name.ToString(); }
  12288. }
  12289. [RosObject("port firmware", CanSet=true, CanGet=true)]
  12290. public class PortFirmware : RosValueObject
  12291. {
  12292. [RosValue("directory")]
  12293. public String Directory { get; set; }
  12294. }
  12295. [RosObject("port remote-access", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true, CanUnset=true)]
  12296. public class PortRemoteAccess : RosItemObject<PortRemoteAccess>
  12297. {
  12298. [RosValue("allowed-addresses")]
  12299. public IPAddress AllowedAddresses { get; set; }
  12300. [RosValue("channel")]
  12301. public Int32? Channel { get; set; }
  12302. // Defines whether item is ignored or used
  12303. [RosValue("disabled")]
  12304. public Boolean? Disabled { get; set; }
  12305. [RosValue("local-address", CanUnset=true)]
  12306. public IPAddress LocalAddress { get; set; }
  12307. [RosValue("log-file")]
  12308. public String LogFile { get; set; }
  12309. [RosValue("port")]
  12310. public RouterOS.Port Port { get; set; }
  12311. public enum ProtocolEnum
  12312. {
  12313. [RosValue("raw")]
  12314. Raw,
  12315. [RosValue("rfc2217")]
  12316. Rfc2217,
  12317. }
  12318. [RosValue("protocol")]
  12319. public ProtocolEnum? Protocol { get; set; }
  12320. [RosValue("tcp-port")]
  12321. public Int32? TcpPort { get; set; }
  12322. [RosValue("active", IsDynamic=true)]
  12323. public String Active { get; set; }
  12324. [RosValue("busy", IsDynamic=true)]
  12325. public String Busy { get; set; }
  12326. [RosValue("inactive", IsDynamic=true)]
  12327. public String Inactive { get; set; }
  12328. [RosValue("logging-active", IsDynamic=true)]
  12329. public String LoggingActive { get; set; }
  12330. [RosValue("remote-address", IsDynamic=true)]
  12331. public IPAddress RemoteAddress { get; set; }
  12332. }
  12333. [RosObject("ppp aaa", CanSet=true, CanGet=true)]
  12334. public class PppAaa : RosValueObject
  12335. {
  12336. // Enable/Disable accounting
  12337. [RosValue("accounting")]
  12338. public Boolean? Accounting { get; set; }
  12339. // Defines time interval between communications with the router
  12340. [RosValue("interim-update")]
  12341. public TimeSpan? InterimUpdate { get; set; }
  12342. // Use or not radius
  12343. [RosValue("use-radius")]
  12344. public Boolean? UseRadius { get; set; }
  12345. }
  12346. [RosObject("ppp active", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  12347. public class PppActive : RosItemObject<PppActive>
  12348. {
  12349. // User address
  12350. [RosValue("address")]
  12351. public IPAddress Address { get; set; }
  12352. // User's IP address for PPTP or MAC address for PPoE
  12353. [RosValue("caller-id")]
  12354. public String CallerId { get; set; }
  12355. // Encoding method
  12356. [RosValue("encoding")]
  12357. public String Encoding { get; set; }
  12358. // maximum amount of bytes user can transmit
  12359. [RosValue("limit-bytes-in")]
  12360. public Int64? LimitBytesIn { get; set; }
  12361. // maximum amount of bytes user can receive
  12362. [RosValue("limit-bytes-out")]
  12363. public Int64? LimitBytesOut { get; set; }
  12364. // User name
  12365. [RosValue("name")]
  12366. public String Name { get; set; }
  12367. public enum ServiceEnum
  12368. {
  12369. [RosValue("any")]
  12370. Any,
  12371. [RosValue("async")]
  12372. Async,
  12373. [RosValue("isdn")]
  12374. Isdn,
  12375. [RosValue("l2tp")]
  12376. L2tp,
  12377. [RosValue("ovpn")]
  12378. Ovpn,
  12379. }
  12380. // Service name
  12381. [RosValue("service")]
  12382. public ServiceEnum? Service { get; set; }
  12383. // Specific session identifier
  12384. [RosValue("session-id")]
  12385. public Int32? SessionId { get; set; }
  12386. // Time when user is up
  12387. [RosValue("uptime")]
  12388. public TimeSpan? Uptime { get; set; }
  12389. [RosValue("bytes", IsDynamic=true)]
  12390. public Int32? Bytes { get; set; }
  12391. [RosValue("packets", IsDynamic=true)]
  12392. public Int32? Packets { get; set; }
  12393. [RosValue("radius", IsDynamic=true)]
  12394. public String Radius { get; set; }
  12395. public static PppActive Parse(string str, Connection conn)
  12396. {
  12397. if(string.IsNullOrEmpty(str))
  12398. return null;
  12399. PppActive obj = new PppActive();
  12400. obj.FindByName(conn, str);
  12401. return obj;
  12402. }
  12403. public override string ToString() { return Name.ToString(); }
  12404. }
  12405. [RosObject("ppp profile", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true, CanUnset=true)]
  12406. public class PppProfile : RosItemObject<PppProfile>
  12407. {
  12408. [RosValue("address-list", CanUnset=true)]
  12409. public String AddressList { get; set; }
  12410. [RosValue("bridge", CanUnset=true)]
  12411. public RouterOS.Interface Bridge { get; set; }
  12412. public enum ChangeTcpMssEnum
  12413. {
  12414. [RosValue("default")]
  12415. Default,
  12416. [RosValue("no")]
  12417. No,
  12418. [RosValue("yes")]
  12419. Yes,
  12420. }
  12421. // Change or not TCP protocol's Maximum Segment Size
  12422. [RosValue("change-tcp-mss")]
  12423. public ChangeTcpMssEnum? ChangeTcpMss { get; set; }
  12424. // Short description of the item
  12425. [RosValue("comment")]
  12426. public String Comment { get; set; }
  12427. // DNS server address
  12428. [RosValue("dns-server", CanUnset=true)]
  12429. public IPAddress[] DnsServer { get; set; }
  12430. // The time limit when the link will be terminated if there is no activity
  12431. [RosValue("idle-timeout", CanUnset=true)]
  12432. public TimeSpan? IdleTimeout { get; set; }
  12433. // Firewall chain name for incoming packets
  12434. [RosValue("incoming-filter", CanUnset=true)]
  12435. public String IncomingFilter { get; set; }
  12436. // Assigns an individual address to the PPP-server
  12437. [RosValue("local-address", CanUnset=true)]
  12438. public String LocalAddress { get; set; }
  12439. // Profile name
  12440. [RosValue("name")]
  12441. public String Name { get; set; }
  12442. public enum OnlyOneEnum
  12443. {
  12444. [RosValue("default")]
  12445. Default,
  12446. [RosValue("no")]
  12447. No,
  12448. [RosValue("yes")]
  12449. Yes,
  12450. }
  12451. // Allow only one connection at a time
  12452. [RosValue("only-one")]
  12453. public OnlyOneEnum? OnlyOne { get; set; }
  12454. // Firewall chain name for outgoing packets
  12455. [RosValue("outgoing-filter", CanUnset=true)]
  12456. public String OutgoingFilter { get; set; }
  12457. // Data rate limitations for the client
  12458. [RosValue("rate-limit", CanUnset=true)]
  12459. public String RateLimit { get; set; }
  12460. // Assigns an individual address to the PPP
  12461. [RosValue("remote-address", CanUnset=true)]
  12462. public String RemoteAddress { get; set; }
  12463. // The maximum time the connection can stay up
  12464. [RosValue("session-timeout", CanUnset=true)]
  12465. public TimeSpan? SessionTimeout { get; set; }
  12466. public enum UseCompressionEnum
  12467. {
  12468. [RosValue("default")]
  12469. Default,
  12470. [RosValue("no")]
  12471. No,
  12472. [RosValue("yes")]
  12473. Yes,
  12474. }
  12475. // Defines whether compress traffic or not
  12476. [RosValue("use-compression")]
  12477. public UseCompressionEnum? UseCompression { get; set; }
  12478. public enum UseEncryptionEnum
  12479. {
  12480. [RosValue("default")]
  12481. Default,
  12482. [RosValue("no")]
  12483. No,
  12484. [RosValue("required")]
  12485. Required,
  12486. [RosValue("yes")]
  12487. Yes,
  12488. }
  12489. // Defines whether encrypt traffic or not
  12490. [RosValue("use-encryption")]
  12491. public UseEncryptionEnum? UseEncryption { get; set; }
  12492. public enum UseIpv6Enum
  12493. {
  12494. [RosValue("default")]
  12495. Default,
  12496. [RosValue("no")]
  12497. No,
  12498. [RosValue("required")]
  12499. Required,
  12500. [RosValue("yes")]
  12501. Yes,
  12502. }
  12503. [RosValue("use-ipv6")]
  12504. public UseIpv6Enum? UseIpv6 { get; set; }
  12505. public enum UseMplsEnum
  12506. {
  12507. [RosValue("default")]
  12508. Default,
  12509. [RosValue("no")]
  12510. No,
  12511. [RosValue("required")]
  12512. Required,
  12513. [RosValue("yes")]
  12514. Yes,
  12515. }
  12516. [RosValue("use-mpls")]
  12517. public UseMplsEnum? UseMpls { get; set; }
  12518. public enum UseVjCompressionEnum
  12519. {
  12520. [RosValue("default")]
  12521. Default,
  12522. [RosValue("no")]
  12523. No,
  12524. [RosValue("yes")]
  12525. Yes,
  12526. }
  12527. // Use Van Jacobson header compression
  12528. [RosValue("use-vj-compression")]
  12529. public UseVjCompressionEnum? UseVjCompression { get; set; }
  12530. // Windows Internet Naming Service server
  12531. [RosValue("wins-server", CanUnset=true)]
  12532. public IPAddress[] WinsServer { get; set; }
  12533. [RosValue("default", IsDynamic=true)]
  12534. public String Default { get; set; }
  12535. public static PppProfile DefaultProfile
  12536. {
  12537. get { return new PppProfile() { Id = 0 }; }
  12538. }
  12539. public static PppProfile DefaultEncryptionProfile
  12540. {
  12541. get { return new PppProfile() { Id = -2 }; }
  12542. }
  12543. public static PppProfile Parse(string str, Connection conn)
  12544. {
  12545. if(string.IsNullOrEmpty(str))
  12546. return null;
  12547. PppProfile obj = new PppProfile();
  12548. obj.FindByName(conn, str);
  12549. return obj;
  12550. }
  12551. public override string ToString() { return Name.ToString(); }
  12552. }
  12553. [RosObject("ppp secret", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true, CanUnset=true)]
  12554. public class PppSecret : RosItemObject<PppSecret>
  12555. {
  12556. // Sets IP address for PPTP, L2TP or MAC address for PPPoE
  12557. [RosValue("caller-id")]
  12558. public String CallerId { get; set; }
  12559. // Short description of the item
  12560. [RosValue("comment")]
  12561. public String Comment { get; set; }
  12562. // Defines whether item is ignored or used
  12563. [RosValue("disabled")]
  12564. public Boolean? Disabled { get; set; }
  12565. // maximum amount of bytes user can transmit
  12566. [RosValue("limit-bytes-in")]
  12567. public Int64? LimitBytesIn { get; set; }
  12568. // maximum amount of bytes user can receive
  12569. [RosValue("limit-bytes-out")]
  12570. public Int64? LimitBytesOut { get; set; }
  12571. // Assigns an individual address to the PPP-server
  12572. [RosValue("local-address", CanUnset=true)]
  12573. public IPAddress LocalAddress { get; set; }
  12574. // Name of the user
  12575. [RosValue("name")]
  12576. public String Name { get; set; }
  12577. // User password
  12578. [RosValue("password")]
  12579. public String Password { get; set; }
  12580. // Profile name for the user
  12581. [RosValue("profile")]
  12582. public RouterOS.PppProfile Profile { get; set; }
  12583. // Assigns an individual address to the PPP-client
  12584. [RosValue("remote-address", CanUnset=true)]
  12585. public IPAddress RemoteAddress { get; set; }
  12586. [RosValue("remote-ipv6-prefix", CanUnset=true)]
  12587. public IPv6Prefix? RemoteIpv6Prefix { get; set; }
  12588. // Routes that appear on the server when the client is connected
  12589. [RosValue("routes")]
  12590. public String Routes { get; set; }
  12591. public enum ServiceEnum
  12592. {
  12593. [RosValue("any")]
  12594. Any,
  12595. [RosValue("async")]
  12596. Async,
  12597. [RosValue("isdn")]
  12598. Isdn,
  12599. [RosValue("l2tp")]
  12600. L2tp,
  12601. [RosValue("ovpn")]
  12602. Ovpn,
  12603. }
  12604. // Specifies service that will use this user
  12605. [RosValue("service")]
  12606. public ServiceEnum? Service { get; set; }
  12607. public static PppSecret Parse(string str, Connection conn)
  12608. {
  12609. if(string.IsNullOrEmpty(str))
  12610. return null;
  12611. PppSecret obj = new PppSecret();
  12612. obj.FindByName(conn, str);
  12613. return obj;
  12614. }
  12615. public override string ToString() { return Name.ToString(); }
  12616. }
  12617. [RosObject("queue interface", CanSet=true, CanGet=true)]
  12618. public class QueueInterface : RosItemObject<QueueInterface>
  12619. {
  12620. // Queue type which will be used for the interface
  12621. [RosValue("queue")]
  12622. public RouterOS.QueueType Queue { get; set; }
  12623. [RosValue("dynamic", IsDynamic=true)]
  12624. public String Dynamic { get; set; }
  12625. [RosValue("interface", IsDynamic=true)]
  12626. public RouterOS.Interface Interface { get; set; }
  12627. }
  12628. [RosObject("queue simple", CanAdd=true, CanSet=true, CanMove=true, CanGet=true, CanRemove=true, CanUnset=true)]
  12629. public class QueueSimple : RosItemObject<QueueSimple>
  12630. {
  12631. public struct BurstLimitType
  12632. {
  12633. public Int32 Out { get; set; }
  12634. public Int32 In { get; set; }
  12635. public static BurstLimitType Parse(string str)
  12636. {
  12637. string[] strs = str.Split('/');
  12638. if (strs.Length == 2)
  12639. return new BurstLimitType() { Out = TypeFormatter.ConvertFromString<Int32>(strs[0], null), In = TypeFormatter.ConvertFromString<Int32>(strs[1], null) };
  12640. else
  12641. throw new InvalidOperationException();
  12642. }
  12643. public override string ToString()
  12644. {
  12645. return String.Concat(Out, '/', In);
  12646. }
  12647. }
  12648. // Maximal allowed burst of data rate in form of in/out
  12649. [RosValue("burst-limit")]
  12650. public BurstLimitType? BurstLimit { get; set; }
  12651. public struct BurstThresholdType
  12652. {
  12653. public Int32 Out { get; set; }
  12654. public Int32 In { get; set; }
  12655. public static BurstThresholdType Parse(string str)
  12656. {
  12657. string[] strs = str.Split('/');
  12658. if (strs.Length == 2)
  12659. return new BurstThresholdType() { Out = TypeFormatter.ConvertFromString<Int32>(strs[0], null), In = TypeFormatter.ConvertFromString<Int32>(strs[1], null) };
  12660. else
  12661. throw new InvalidOperationException();
  12662. }
  12663. public override string ToString()
  12664. {
  12665. return String.Concat(Out, '/', In);
  12666. }
  12667. }
  12668. // Average burst threshold in form of in/out
  12669. [RosValue("burst-threshold")]
  12670. public BurstThresholdType? BurstThreshold { get; set; }
  12671. // Burst time in form in/out
  12672. [RosValue("burst-time")]
  12673. public String BurstTime { get; set; }
  12674. // Short description of the item
  12675. [RosValue("comment")]
  12676. public String Comment { get; set; }
  12677. public enum DirectionEnum
  12678. {
  12679. [RosValue("both")]
  12680. Both,
  12681. [RosValue("download")]
  12682. Download,
  12683. [RosValue("upload")]
  12684. Upload,
  12685. }
  12686. [RosValue("direction")]
  12687. public DirectionEnum? Direction { get; set; }
  12688. // Defines whether item is ignored or used
  12689. [RosValue("disabled")]
  12690. public Boolean? Disabled { get; set; }
  12691. public struct DstAddressType
  12692. {
  12693. private object value;
  12694. public IPPrefix? IpAddress
  12695. {
  12696. get { return value as IPPrefix?; }
  12697. set { this.value = value; }
  12698. }
  12699. public static implicit operator DstAddressType(IPPrefix? value)
  12700. {
  12701. return new DstAddressType() { value = value };
  12702. }public IPv6Prefix? Ipv6Address
  12703. {
  12704. get { return value as IPv6Prefix?; }
  12705. set { this.value = value; }
  12706. }
  12707. public static implicit operator DstAddressType(IPv6Prefix? value)
  12708. {
  12709. return new DstAddressType() { value = value };
  12710. }
  12711. public static DstAddressType Parse(string str, Connection conn)
  12712. {
  12713. try { return new DstAddressType() { value = TypeFormatter.ConvertFromString<IPPrefix>(str, conn) }; }
  12714. catch(Exception) { }
  12715. try { return new DstAddressType() { value = TypeFormatter.ConvertFromString<IPv6Prefix>(str, conn) }; }
  12716. catch(Exception) { }
  12717. throw new NotSupportedException();
  12718. }
  12719. public override string ToString() { return value != null ? value.ToString() : null; }
  12720. }
  12721. // Destination IP address
  12722. [RosValue("dst-address")]
  12723. public DstAddressType? DstAddress { get; set; }
  12724. // Destination netmask
  12725. [RosValue("dst-netmask")]
  12726. public IPAddress DstNetmask { get; set; }
  12727. public enum AllEnum
  12728. {
  12729. [RosValue("all")]
  12730. All,
  12731. }
  12732. public struct InterfaceType
  12733. {
  12734. private object value;
  12735. public AllEnum? All
  12736. {
  12737. get { return value as AllEnum?; }
  12738. set { this.value = value; }
  12739. }
  12740. public static implicit operator InterfaceType(AllEnum? value)
  12741. {
  12742. return new InterfaceType() { value = value };
  12743. }public RouterOS.Interface Interface
  12744. {
  12745. get { return value as RouterOS.Interface; }
  12746. set { this.value = value; }
  12747. }
  12748. public static implicit operator InterfaceType(RouterOS.Interface value)
  12749. {
  12750. return new InterfaceType() { value = value };
  12751. }
  12752. public static InterfaceType Parse(string str, Connection conn)
  12753. {
  12754. try { return new InterfaceType() { value = TypeFormatter.ConvertFromString<AllEnum>(str, conn) }; }
  12755. catch(Exception) { }
  12756. try { return new InterfaceType() { value = TypeFormatter.ConvertFromString<RouterOS.Interface>(str, conn) }; }
  12757. catch(Exception) { }
  12758. throw new NotSupportedException();
  12759. }
  12760. public override string ToString() { return value != null ? value.ToString() : null; }
  12761. }
  12762. // Interface to which this queue applies
  12763. [RosValue("interface")]
  12764. public InterfaceType? Interface { get; set; }
  12765. public struct LimitAtType
  12766. {
  12767. public Int32 Out { get; set; }
  12768. public Int32 In { get; set; }
  12769. public static LimitAtType Parse(string str)
  12770. {
  12771. string[] strs = str.Split('/');
  12772. if (strs.Length == 2)
  12773. return new LimitAtType() { Out = TypeFormatter.ConvertFromString<Int32>(strs[0], null), In = TypeFormatter.ConvertFromString<Int32>(strs[1], null) };
  12774. else
  12775. throw new InvalidOperationException();
  12776. }
  12777. public override string ToString()
  12778. {
  12779. return String.Concat(Out, '/', In);
  12780. }
  12781. }
  12782. // Guaranteed data rate to this queue
  12783. [RosValue("limit-at")]
  12784. public LimitAtType? LimitAt { get; set; }
  12785. public struct MaxLimitType
  12786. {
  12787. public Int32 Out { get; set; }
  12788. public Int32 In { get; set; }
  12789. public static MaxLimitType Parse(string str)
  12790. {
  12791. string[] strs = str.Split('/');
  12792. if (strs.Length == 2)
  12793. return new MaxLimitType() { Out = TypeFormatter.ConvertFromString<Int32>(strs[0], null), In = TypeFormatter.ConvertFromString<Int32>(strs[1], null) };
  12794. else
  12795. throw new InvalidOperationException();
  12796. }
  12797. public override string ToString()
  12798. {
  12799. return String.Concat(Out, '/', In);
  12800. }
  12801. }
  12802. // Data rate which can be reached if there is enough bandwidth available
  12803. [RosValue("max-limit")]
  12804. public MaxLimitType? MaxLimit { get; set; }
  12805. // Queue name
  12806. [RosValue("name")]
  12807. public String Name { get; set; }
  12808. public enum P2pEnum
  12809. {
  12810. [RosValue("all-p2p")]
  12811. AllP2p,
  12812. [RosValue("bit-torrent")]
  12813. BitTorrent,
  12814. [RosValue("blubster")]
  12815. Blubster,
  12816. [RosValue("direct-connect")]
  12817. DirectConnect,
  12818. [RosValue("edonkey")]
  12819. Edonkey,
  12820. }
  12821. // Which type of P2P traffic to match
  12822. [RosValue("p2p", CanUnset=true)]
  12823. public P2pEnum? P2p { get; set; }
  12824. [RosValue("packet-marks")]
  12825. public String[] PacketMarks { get; set; }
  12826. // Name of the parent queue in the hierarchy
  12827. [RosValue("parent")]
  12828. public String Parent { get; set; }
  12829. // Flow priority
  12830. [RosValue("priority")]
  12831. public Int32? Priority { get; set; }
  12832. public struct QueueType
  12833. {
  12834. public RouterOS.QueueType Out { get; set; }
  12835. public RouterOS.QueueType In { get; set; }
  12836. public static QueueType Parse(string str)
  12837. {
  12838. string[] strs = str.Split('/');
  12839. if (strs.Length == 2)
  12840. return new QueueType() { Out = TypeFormatter.ConvertFromString<RouterOS.QueueType>(strs[0], null), In = TypeFormatter.ConvertFromString<RouterOS.QueueType>(strs[1], null) };
  12841. else
  12842. throw new InvalidOperationException();
  12843. }
  12844. public override string ToString()
  12845. {
  12846. return String.Concat(Out, '/', In);
  12847. }
  12848. }
  12849. // Queue type
  12850. [RosValue("queue")]
  12851. public QueueType? Queue { get; set; }
  12852. public struct TargetAddressType
  12853. {
  12854. private object value;
  12855. public IPPrefix? IpAddress
  12856. {
  12857. get { return value as IPPrefix?; }
  12858. set { this.value = value; }
  12859. }
  12860. public static implicit operator TargetAddressType(IPPrefix? value)
  12861. {
  12862. return new TargetAddressType() { value = value };
  12863. }public IPv6Prefix? Ipv6Address
  12864. {
  12865. get { return value as IPv6Prefix?; }
  12866. set { this.value = value; }
  12867. }
  12868. public static implicit operator TargetAddressType(IPv6Prefix? value)
  12869. {
  12870. return new TargetAddressType() { value = value };
  12871. }
  12872. public static TargetAddressType Parse(string str, Connection conn)
  12873. {
  12874. try { return new TargetAddressType() { value = TypeFormatter.ConvertFromString<IPPrefix>(str, conn) }; }
  12875. catch(Exception) { }
  12876. try { return new TargetAddressType() { value = TypeFormatter.ConvertFromString<IPv6Prefix>(str, conn) }; }
  12877. catch(Exception) { }
  12878. throw new NotSupportedException();
  12879. }
  12880. public override string ToString() { return value != null ? value.ToString() : null; }
  12881. }
  12882. // Limitation source IP addresses
  12883. [RosValue("target-addresses")]
  12884. public TargetAddressType[] TargetAddresses { get; set; }
  12885. // At which time and day of week to allow this queue
  12886. [RosValue("time", CanUnset=true)]
  12887. public String Time { get; set; }
  12888. // Maximal allowed total (bidirectional) burst of data rate (bits/s)
  12889. [RosValue("total-burst-limit")]
  12890. public Int32? TotalBurstLimit { get; set; }
  12891. // Total (bidirectional) average burst threshold (bits/s)
  12892. [RosValue("total-burst-threshold")]
  12893. public Int32? TotalBurstThreshold { get; set; }
  12894. // Total burst (bidirectional) time
  12895. [RosValue("total-burst-time")]
  12896. public TimeSpan? TotalBurstTime { get; set; }
  12897. // Allocated total (bidirectional) stream data rate (bits/s)
  12898. [RosValue("total-limit-at")]
  12899. public Int32? TotalLimitAt { get; set; }
  12900. // Maximal total (bidirectional) stream data rate (bits/s)
  12901. [RosValue("total-max-limit")]
  12902. public Int32? TotalMaxLimit { get; set; }
  12903. // Queuing discipline to use for upload and download traffic
  12904. [RosValue("total-queue")]
  12905. public RouterOS.QueueType TotalQueue { get; set; }
  12906. [RosValue("borrows", IsDynamic=true)]
  12907. public Int32? Borrows { get; set; }
  12908. [RosValue("bytes", IsDynamic=true)]
  12909. public Int64? Bytes { get; set; }
  12910. [RosValue("dropped", IsDynamic=true)]
  12911. public Int32? Dropped { get; set; }
  12912. [RosValue("dynamic", IsDynamic=true)]
  12913. public String Dynamic { get; set; }
  12914. [RosValue("invalid", IsDynamic=true)]
  12915. public String Invalid { get; set; }
  12916. [RosValue("lends", IsDynamic=true)]
  12917. public Int32? Lends { get; set; }
  12918. [RosValue("packet-rate", IsDynamic=true)]
  12919. public Int32? PacketRate { get; set; }
  12920. [RosValue("packets", IsDynamic=true)]
  12921. public Int32? Packets { get; set; }
  12922. [RosValue("pcq-queues", IsDynamic=true)]
  12923. public Int32? PcqQueues { get; set; }
  12924. [RosValue("queued-bytes", IsDynamic=true)]
  12925. public Int32? QueuedBytes { get; set; }
  12926. [RosValue("queued-packets", IsDynamic=true)]
  12927. public Int32? QueuedPackets { get; set; }
  12928. [RosValue("rate", IsDynamic=true)]
  12929. public Int32? Rate { get; set; }
  12930. [RosValue("total-borrows", IsDynamic=true)]
  12931. public Int32? TotalBorrows { get; set; }
  12932. [RosValue("total-bytes", IsDynamic=true)]
  12933. public Int64? TotalBytes { get; set; }
  12934. [RosValue("total-dropped", IsDynamic=true)]
  12935. public Int32? TotalDropped { get; set; }
  12936. [RosValue("total-lends", IsDynamic=true)]
  12937. public Int32? TotalLends { get; set; }
  12938. [RosValue("total-packet-rate", IsDynamic=true)]
  12939. public Int32? TotalPacketRate { get; set; }
  12940. [RosValue("total-packets", IsDynamic=true)]
  12941. public Int32? TotalPackets { get; set; }
  12942. [RosValue("total-pcq-queues", IsDynamic=true)]
  12943. public Int32? TotalPcqQueues { get; set; }
  12944. [RosValue("total-queued-bytes", IsDynamic=true)]
  12945. public Int32? TotalQueuedBytes { get; set; }
  12946. [RosValue("total-queued-packets", IsDynamic=true)]
  12947. public Int32? TotalQueuedPackets { get; set; }
  12948. [RosValue("total-rate", IsDynamic=true)]
  12949. public Int32? TotalRate { get; set; }
  12950. public static QueueSimple Parse(string str, Connection conn)
  12951. {
  12952. if(string.IsNullOrEmpty(str))
  12953. return null;
  12954. QueueSimple obj = new QueueSimple();
  12955. obj.FindByName(conn, str);
  12956. return obj;
  12957. }
  12958. public override string ToString() { return Name.ToString(); }
  12959. }
  12960. [RosObject("queue tree", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  12961. public class QueueTree : RosItemObject<QueueTree>
  12962. {
  12963. // Maximal allowed burst of the data rate
  12964. [RosValue("burst-limit")]
  12965. public Int32? BurstLimit { get; set; }
  12966. // Average burst threshold
  12967. [RosValue("burst-threshold")]
  12968. public Int32? BurstThreshold { get; set; }
  12969. // Burst time
  12970. [RosValue("burst-time")]
  12971. public TimeSpan? BurstTime { get; set; }
  12972. // Short description of the item
  12973. [RosValue("comment")]
  12974. public String Comment { get; set; }
  12975. // Defines whether item is ignored or used
  12976. [RosValue("disabled")]
  12977. public Boolean? Disabled { get; set; }
  12978. // Maximum stream bit rate
  12979. [RosValue("limit-at")]
  12980. public Int32? LimitAt { get; set; }
  12981. // Maximal limit
  12982. [RosValue("max-limit")]
  12983. public Int32? MaxLimit { get; set; }
  12984. // Queue name
  12985. [RosValue("name")]
  12986. public String Name { get; set; }
  12987. [RosValue("packet-mark")]
  12988. public String[] PacketMark { get; set; }
  12989. // Interface which queue uses
  12990. [RosValue("parent")]
  12991. public String Parent { get; set; }
  12992. // Flow priority
  12993. [RosValue("priority")]
  12994. public Int32? Priority { get; set; }
  12995. // Queue type
  12996. [RosValue("queue")]
  12997. public RouterOS.QueueType Queue { get; set; }
  12998. [RosValue("borrows", IsDynamic=true)]
  12999. public Int32? Borrows { get; set; }
  13000. [RosValue("bytes", IsDynamic=true)]
  13001. public Int64? Bytes { get; set; }
  13002. [RosValue("dropped", IsDynamic=true)]
  13003. public Int32? Dropped { get; set; }
  13004. [RosValue("invalid", IsDynamic=true)]
  13005. public String Invalid { get; set; }
  13006. [RosValue("lends", IsDynamic=true)]
  13007. public Int32? Lends { get; set; }
  13008. [RosValue("packet-rate", IsDynamic=true)]
  13009. public Int32? PacketRate { get; set; }
  13010. [RosValue("packets", IsDynamic=true)]
  13011. public Int32? Packets { get; set; }
  13012. [RosValue("pcq-queues", IsDynamic=true)]
  13013. public Int32? PcqQueues { get; set; }
  13014. [RosValue("queued-bytes", IsDynamic=true)]
  13015. public Int32? QueuedBytes { get; set; }
  13016. [RosValue("queued-packets", IsDynamic=true)]
  13017. public Int32? QueuedPackets { get; set; }
  13018. [RosValue("rate", IsDynamic=true)]
  13019. public Int32? Rate { get; set; }
  13020. public static QueueTree Parse(string str, Connection conn)
  13021. {
  13022. if(string.IsNullOrEmpty(str))
  13023. return null;
  13024. QueueTree obj = new QueueTree();
  13025. obj.FindByName(conn, str);
  13026. return obj;
  13027. }
  13028. public override string ToString() { return Name.ToString(); }
  13029. }
  13030. [RosObject("queue type", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  13031. public class QueueType : RosItemObject<QueueType>
  13032. {
  13033. // Maximum number of bytes that the BFIFO queue can hold
  13034. [RosValue("bfifo-limit")]
  13035. public Int32? BfifoLimit { get; set; }
  13036. public enum KindEnum
  13037. {
  13038. [RosValue("bfifo")]
  13039. Bfifo,
  13040. [RosValue("pcq")]
  13041. Pcq,
  13042. [RosValue("pfifo")]
  13043. Pfifo,
  13044. [RosValue("red")]
  13045. Red,
  13046. [RosValue("sfq")]
  13047. Sfq,
  13048. }
  13049. // Queue type
  13050. [RosValue("kind")]
  13051. public KindEnum? Kind { get; set; }
  13052. // Associative name of the queue type
  13053. [RosValue("name")]
  13054. public String Name { get; set; }
  13055. [RosValue("pcq-burst-rate")]
  13056. public Int32? PcqBurstRate { get; set; }
  13057. [RosValue("pcq-burst-threshold")]
  13058. public Int32? PcqBurstThreshold { get; set; }
  13059. public enum PcqBurstTimeEnum
  13060. {
  13061. [RosValue("PcqBurstTime")]
  13062. PcqBurstTime,
  13063. }
  13064. [RosValue("pcq-burst-time")]
  13065. public PcqBurstTimeEnum? PcqBurstTime { get; set; }
  13066. // The classifier of grouping traffic flow
  13067. [RosValue("pcq-classifier")]
  13068. public String PcqClassifier { get; set; }
  13069. [RosValue("pcq-dst-address-mask")]
  13070. public String PcqDstAddressMask { get; set; }
  13071. [RosValue("pcq-dst-address6-mask")]
  13072. public Int32? PcqDstAddress6Mask { get; set; }
  13073. // PCQ queue limit
  13074. [RosValue("pcq-limit")]
  13075. public Int32? PcqLimit { get; set; }
  13076. // Maximal data rate assigned to one group (bits/s)
  13077. [RosValue("pcq-rate")]
  13078. public Int32? PcqRate { get; set; }
  13079. [RosValue("pcq-src-address-mask")]
  13080. public String PcqSrcAddressMask { get; set; }
  13081. [RosValue("pcq-src-address6-mask")]
  13082. public Int32? PcqSrcAddress6Mask { get; set; }
  13083. // Number of packets that can hold the whole PCQ queue
  13084. [RosValue("pcq-total-limit")]
  13085. public Int32? PcqTotalLimit { get; set; }
  13086. // Maximum number of packets that the PFIFO queue can hold
  13087. [RosValue("pfifo-limit")]
  13088. public Int32? PfifoLimit { get; set; }
  13089. // Used by RED for average queue size calculations
  13090. [RosValue("red-avg-packet")]
  13091. public Int32? RedAvgPacket { get; set; }
  13092. // Number of packets allowed for bursts of packets when there are no packets in the queue
  13093. [RosValue("red-burst")]
  13094. public Int32? RedBurst { get; set; }
  13095. // RED queue limit in bytes
  13096. [RosValue("red-limit")]
  13097. public Int32? RedLimit { get; set; }
  13098. // The average queue size at which packet marking probability is the highest
  13099. [RosValue("red-max-threshold")]
  13100. public Int32? RedMaxThreshold { get; set; }
  13101. // Average queue size in bytes
  13102. [RosValue("red-min-threshold")]
  13103. public Int32? RedMinThreshold { get; set; }
  13104. // How often to change hash function
  13105. [RosValue("sfq-allot")]
  13106. public Int32? SfqAllot { get; set; }
  13107. // Amount of data in bytes that can be sent in one round-robin round
  13108. [RosValue("sfq-perturb")]
  13109. public Int32? SfqPerturb { get; set; }
  13110. public static QueueType DefaultType
  13111. {
  13112. get { return new QueueType() { Id = 1 }; }
  13113. }
  13114. public static QueueType EthernetDefaultType
  13115. {
  13116. get { return new QueueType() { Id = 2 }; }
  13117. }
  13118. public static QueueType WirelessDefaultType
  13119. {
  13120. get { return new QueueType() { Id = 3 }; }
  13121. }
  13122. public static QueueType SynchronousDefaultType
  13123. {
  13124. get { return new QueueType() { Id = 4 }; }
  13125. }
  13126. public static QueueType HotspotDefaultType
  13127. {
  13128. get { return new QueueType() { Id = 5 }; }
  13129. }
  13130. public static QueueType DefaultSmallType
  13131. {
  13132. get { return new QueueType() { Id = -2 }; }
  13133. }
  13134. public static QueueType Parse(string str, Connection conn)
  13135. {
  13136. if(string.IsNullOrEmpty(str))
  13137. return null;
  13138. QueueType obj = new QueueType();
  13139. obj.FindByName(conn, str);
  13140. return obj;
  13141. }
  13142. public override string ToString() { return Name.ToString(); }
  13143. }
  13144. [RosObject("radius", CanAdd=true, CanSet=true, CanMove=true, CanGet=true, CanRemove=true)]
  13145. public class Radius : RosItemObject<Radius>
  13146. {
  13147. // Radius accounting backup
  13148. [RosValue("accounting-backup")]
  13149. public Boolean? AccountingBackup { get; set; }
  13150. // Radius accounting port
  13151. [RosValue("accounting-port")]
  13152. public Int32? AccountingPort { get; set; }
  13153. public struct AddressType
  13154. {
  13155. private object value;
  13156. public IPAddress IpAddress
  13157. {
  13158. get { return value as IPAddress; }
  13159. set { this.value = value; }
  13160. }
  13161. public static implicit operator AddressType(IPAddress value)
  13162. {
  13163. return new AddressType() { value = value };
  13164. }public IPv6Address Ipv6Address
  13165. {
  13166. get { return value as IPv6Address; }
  13167. set { this.value = value; }
  13168. }
  13169. public static implicit operator AddressType(IPv6Address value)
  13170. {
  13171. return new AddressType() { value = value };
  13172. }
  13173. public static AddressType Parse(string str, Connection conn)
  13174. {
  13175. try { return new AddressType() { value = TypeFormatter.ConvertFromString<IPAddress>(str, conn) }; }
  13176. catch(Exception) { }
  13177. try { return new AddressType() { value = TypeFormatter.ConvertFromString<IPv6Address>(str, conn) }; }
  13178. catch(Exception) { }
  13179. throw new NotSupportedException();
  13180. }
  13181. public override string ToString() { return value != null ? value.ToString() : null; }
  13182. }
  13183. // The address of radius
  13184. [RosValue("address")]
  13185. public AddressType? Address { get; set; }
  13186. // Default port 1645 to RFC
  13187. [RosValue("authentication-port")]
  13188. public Int32? AuthenticationPort { get; set; }
  13189. // Called identity
  13190. [RosValue("called-id")]
  13191. public String CalledId { get; set; }
  13192. // Short description of the item
  13193. [RosValue("comment")]
  13194. public String Comment { get; set; }
  13195. // Defines whether item is ignored or used
  13196. [RosValue("disabled")]
  13197. public Boolean? Disabled { get; set; }
  13198. // The domain of the radius
  13199. [RosValue("domain")]
  13200. public String Domain { get; set; }
  13201. // Explicitly stated realm (user domain)
  13202. [RosValue("realm")]
  13203. public String Realm { get; set; }
  13204. // PPP secret name
  13205. [RosValue("secret")]
  13206. public String Secret { get; set; }
  13207. // Name of the service
  13208. [RosValue("service")]
  13209. public String Service { get; set; }
  13210. public struct SrcAddressType
  13211. {
  13212. private object value;
  13213. public IPAddress IpAddress
  13214. {
  13215. get { return value as IPAddress; }
  13216. set { this.value = value; }
  13217. }
  13218. public static implicit operator SrcAddressType(IPAddress value)
  13219. {
  13220. return new SrcAddressType() { value = value };
  13221. }public IPv6Address Ipv6Address
  13222. {
  13223. get { return value as IPv6Address; }
  13224. set { this.value = value; }
  13225. }
  13226. public static implicit operator SrcAddressType(IPv6Address value)
  13227. {
  13228. return new SrcAddressType() { value = value };
  13229. }
  13230. public static SrcAddressType Parse(string str, Connection conn)
  13231. {
  13232. try { return new SrcAddressType() { value = TypeFormatter.ConvertFromString<IPAddress>(str, conn) }; }
  13233. catch(Exception) { }
  13234. try { return new SrcAddressType() { value = TypeFormatter.ConvertFromString<IPv6Address>(str, conn) }; }
  13235. catch(Exception) { }
  13236. throw new NotSupportedException();
  13237. }
  13238. public override string ToString() { return value != null ? value.ToString() : null; }
  13239. }
  13240. [RosValue("src-address")]
  13241. public SrcAddressType? SrcAddress { get; set; }
  13242. public enum TimeoutEnum
  13243. {
  13244. [RosValue("Timeout")]
  13245. Timeout,
  13246. }
  13247. // Time limit how long the radius client will try to connect to the radius server
  13248. [RosValue("timeout")]
  13249. public TimeoutEnum? Timeout { get; set; }
  13250. }
  13251. [RosObject("radius incoming", CanSet=true, CanGet=true)]
  13252. public class RadiusIncoming : RosValueObject
  13253. {
  13254. // Whether to accept the unsolicited messages
  13255. [RosValue("accept")]
  13256. public Boolean? Accept { get; set; }
  13257. // The port number to listen for the requests on
  13258. [RosValue("port")]
  13259. public Int32? Port { get; set; }
  13260. }
  13261. [RosObject("routing bfd interface", CanAdd=true, CanSet=true, CanGet=true, CanRemove=true)]
  13262. public class RoutingBfdInterface : RosItemObject<RoutingBfdInterface>
  13263. {
  13264. // Short description of the item
  13265. [RosValue("comment")]
  13266. public String Comment { get; set; }
  13267. // Defines whether item is ignored or used
  13268. [RosValue("disabled")]
  13269. public Boolean? Disabled { get; set; }
  13270. public struct InterfaceType
  13271. {
  13272. private object value;
  13273. public RouterOS.Interface Interface
  13274. {
  13275. get { return value as RouterOS.Interface; }
  13276. set { this.value = value; }
  13277. }
  13278. public static implicit operator InterfaceType(RouterOS.Interface value)
  13279. {
  13280. return new InterfaceType() { value = value };
  13281. }public RouterOS.Interface Interface2
  13282. {
  13283. get { return value as RouterOS.Interface; }
  13284. set { this.value = value; }
  13285. }
  13286. public static implicit operator InterfaceType(RouterOS.Interface value)
  13287. {
  13288. return new InterfaceType() { value = value };
  13289. }
  13290. public static InterfaceType Parse(string str, Connection conn)
  13291. {
  13292. try { return new InterfaceType() { value = TypeFormatter.ConvertFromString<RouterOS.Interface>(str, conn) }; }
  13293. catch(Exception) { }
  13294. try { return new InterfaceType() { value = TypeFormatter.ConvertFromString<RouterOS.Interface>(str, conn) }; }
  13295. catch(Exception) { }
  13296. throw new NotSupportedException();
  13297. }
  13298. public override string ToString() { return value != null ? value.ToString() : null; }
  13299. }
  13300. [RosValue("interface")]
  13301. public InterfaceType? Interface { get; set; }
  13302. [RosValue("interval")]
  13303. public String Interval { get; set; }
  13304. [RosValue("min-rx")]
  13305. public String MinRx { get; set; }
  13306. [RosValue("multiplier")]
  13307. public Int32? Multiplier { get; set; }
  13308. [RosValue("inactive", IsDynamic=true)]
  13309. public String Inactive { get; set; }
  13310. }
  13311. [RosObject("routing bfd neighbor", CanGet=true)]
  13312. public class RoutingBfdNeighbor : RosItemObject<RoutingBfdNeighbor>
  13313. {
  13314. [RosValue("actual-tx-interval", IsDynamic=true)]
  13315. public String ActualTxInterval { get; set; }
  13316. [RosValue("address", IsDynamic=true)]
  13317. public IPv6Address Address { get; set; }
  13318. [RosValue("desired-tx-interval", IsDynamic=true)]
  13319. public String DesiredTxInterval { get; set; }
  13320. [RosValue("hold-time", IsDynamic=true)]
  13321. public String HoldTime { get; set; }
  13322. public struct InterfaceType
  13323. {
  13324. private object value;
  13325. public RouterOS.Interface Interface
  13326. {
  13327. get { return value as RouterOS.Interface; }
  13328. set { this.value = value; }
  13329. }
  13330. public static implicit operator InterfaceType(RouterOS.Interface value)
  13331. {
  13332. return new InterfaceType() { value = value };
  13333. }public RouterOS.Interface Interface2
  13334. {
  13335. get { return value as RouterOS.Interface; }
  13336. set { this.value = value; }
  13337. }
  13338. public static implicit operator InterfaceType(RouterOS.Interface value)
  13339. {
  13340. return new InterfaceType() { value = value };
  13341. }
  13342. public static InterfaceType Parse(string str, Connection conn)
  13343. {
  13344. try { return new InterfaceType() { value = TypeFormatter.ConvertFromString<RouterOS.Interface>(str, conn) }; }
  13345. catch(Exception) { }
  13346. try { return new InterfaceType() { value = TypeFormatter.ConvertFromString<RouterOS.Interface>(str, conn) }; }
  13347. catch(Exception) { }
  13348. throw new NotSupportedException();
  13349. }
  13350. public override string ToString() { return value != null ? value.ToString() : null; }
  13351. }
  13352. [RosValue("interface", IsDynamic=true)]
  13353. public InterfaceType? Interface { get; set; }
  13354. [RosValue("multihop", IsDynamic=true)]
  13355. public Stri