BGP.xsd 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  3. <xsd:simpleType name="IPv4AddressType">
  4. <xsd:annotation>
  5. <xsd:documentation xml:lang="en">
  6. A string containing an IPv4 address in dotted decimal notation.
  7. </xsd:documentation>
  8. </xsd:annotation>
  9. <xsd:restriction base="xsd:string">
  10. <xsd:pattern value="(([0-1]?[0-9]?[0-9]|2([0-4][0-9]|5[0-5]))\.){3}([0-1]?[0-9]?[0-9]|2([0-4][0-9]|5[0-5]))" />
  11. </xsd:restriction>
  12. </xsd:simpleType>
  13. <xsd:element name="Router">
  14. <xsd:complexType>
  15. <xsd:sequence>
  16. <xsd:attribute name="interAddr" type="IPv4AddressType" maxOccurs="1" />
  17. <xsd:attribute name="exterAddr" type="IPv4AddressType" maxOccurs="1" />
  18. </xsd:sequence>
  19. </xsd:complexType>
  20. </xsd:element>
  21. <xsd:simpleType name="RouteType">
  22. <xsd:annotation>
  23. <xsd:documentation xml:lang="en">
  24. A value type which decides which routes are deny for in/out/all traffic
  25. </xsd:documentation>
  26. </xsd:annotation>
  27. <xsd:restriction base="xsd:string">
  28. <xsd:enumeration value="DenyRouteIN" />
  29. <xsd:enumeration value="DenyRouteOUT" />
  30. <xsd:enumeration value="DenyRoute" />
  31. </xsd:restriction>
  32. <xsd:complexType>
  33. <xsd:sequence>
  34. <xsd:attribute name="Address" type="IPv4AddressType" use="required" />
  35. <xsd:attribute name="Netmask" type="IPv4AddressType" use="required" />
  36. </xsd:sequence>
  37. </xsd:complexType>
  38. </xsd:simpleType>
  39. <xsd:simpleType name="ASType">
  40. <xsd:annotation>
  41. <xsd:documentation xml:lang="en">
  42. A value type which decides which AS are deny for in/out/all traffic
  43. </xsd:documentation>
  44. </xsd:annotation>
  45. <xsd:restriction base="xsd:string">
  46. <xsd:enumeration value="DenyASIN" />
  47. <xsd:enumeration value="DenyASOUT" />
  48. <xsd:enumeration value="DenyAS" />
  49. </xsd:restriction>
  50. <xsd:complexType>
  51. <xsd:sequence>
  52. <xsd:attribute name="id" type="xsd:positiveInteger" use="required" />
  53. </xsd:sequence>
  54. </xsd:complexType>
  55. </xsd:simpleType>
  56. <xsd:element name="TimerParams">
  57. <xsd:complexType>
  58. <xsd:sequence>
  59. <xsd:element name="connectRetryTime" type="xsd:positiveInteger" default="120"/>
  60. <xsd:element name="holdTime" type="xsd:positiveInteger" default="180"/>
  61. <xsd:element name="keepAliveTime" type="xsd:positiveInteger" default= "60"/>
  62. <xsd:element name="startDelay" type="xsd:positiveInteger" />
  63. </xsd:sequence>
  64. </xsd:complexType>
  65. </xsd:element>
  66. <xsd:element name="AS">
  67. <xsd:annotation>
  68. <xsd:documentation xml:lang="en">
  69. The definition of an AS. It has to have an AS ID given in a positive integer.
  70. AS IDs between 1 and 64511 are reserved for public use (Internet),
  71. and AS IDs between 64512 and 65535 are for private use.
  72. In this AS, you have BGP router(s), the deny routes (IN/OUT) and
  73. the deny AS (IN/OUT).
  74. </xsd:documentation>
  75. </xsd:annotation>
  76. <xsd:complexType>
  77. <xsd:sequence>
  78. <xsd:element ref="Router" minOccurs="1" maxOccurs="unbounded" />
  79. <xsd:element ref="RouteType" minOccurs="0" maxOccurs="unbounded" />
  80. <xsd:element ref="ASType" minOccurs="0" maxOccurs="unbounded" />
  81. </xsd:sequence>
  82. <xsd:attribute name="id" type="xsd:positiveInteger" use="required" />
  83. </xsd:complexType>
  84. </xsd:element>
  85. <xsd:element name="Session">
  86. <xsd:complexType>
  87. <xsd:sequence>
  88. <xsd:element ref="Router" minOccurs="2" maxOccurs="2" use="required"/>
  89. </xsd:sequence>
  90. <xsd:attribute name="id" type="xsd:positiveInteger" use="required" />
  91. </xsd:complexType>
  92. </xsd:element>
  93. </xsd:schema>