PageRenderTime 74ms CodeModel.GetById 30ms RepoModel.GetById 0ms app.codeStats 4ms

/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

Large files files are truncated, but you can click here to view the full 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. pub

Large files files are truncated, but you can click here to view the full file