1 //! The TALs bundled with Routinator. 2 3 4 //------------ BundledTal ---------------------------------------------------- 5 6 /// Description and content of a TAL bundled with Routinator. 7 pub struct BundledTal { 8 /// The short name of the TAL. 9 pub name: &'static str, 10 11 /// A description of the TAL. 12 pub description: &'static str, 13 14 /// The category of the TAL. 15 pub category: Category, 16 17 /// Does this TAL need explicit opt-in and if so, how is it to be done? 18 pub opt_in: Option<OptIn>, 19 20 /// The actual content of the TAL. 21 pub content: &'static str, 22 } 23 24 25 //------------ OptIn --------------------------------------------------------- 26 27 /// Information about performing the opt-in procedure for some TALs. 28 pub struct OptIn { 29 /// The command line option for explicitely opting in. 30 pub option_name: &'static str, 31 32 /// The help text for the command line option. 33 pub option_help: &'static str, 34 35 /// The text to show when opt-in is missing. 36 pub message: &'static str, 37 } 38 39 40 //------------ Category ------------------------------------------------------ 41 42 /// The category of a TAL. 43 #[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)] 44 pub enum Category { 45 /// One of the five RIR TALs. 46 Production, 47 48 /// A TAL for a testbed of one of the five RIRs. 49 RirTest, 50 51 /// A TAL for a third-party test bed. 52 Test, 53 54 /// Any other TAL. 55 Other, 56 } 57 58 59 //------------ All Bundled TALs ---------------------------------------------- 60 61 /// All TALs bundled with Routinators. 62 pub static BUNDLED_TALS: &[BundledTal] = &[ 63 64 //--- Production RIR TALs. 65 // 66 BundledTal { 67 name: "afrinic", 68 description: "AFRINIC production TAL", 69 category: Category::Production, 70 opt_in: None, 71 content: include_str!("../tals/afrinic.tal"), 72 }, 73 BundledTal { 74 name: "apnic", 75 description: "APNIC production TAL", 76 category: Category::Production, 77 opt_in: None, 78 content: include_str!("../tals/apnic.tal"), 79 }, 80 BundledTal { 81 name: "arin", 82 description: "ARIN production TAL", 83 category: Category::Production, 84 opt_in: Some(OptIn { 85 option_name: "accept-arin-rpa", 86 option_help: 87 "You have read and accept \ 88 https://www.arin.net/resources/manage/rpki/rpa.pdf", 89 message: 90 "Before we can install the ARIN TAL, you must have read\n\ 91 and agree to the ARIN Relying Party Agreement (RPA).\n\ 92 It is available at\n\ 93 \n\ 94 https://www.arin.net/resources/manage/rpki/rpa.pdf\n\ 95 \n\ 96 If you agree to the RPA, please run the command\n\ 97 again with the --accept-arin-rpa option." 98 }), 99 content: include_str!("../tals/arin.tal"), 100 }, 101 BundledTal { 102 name: "lacnic", 103 description: "LACNIC production TAL", 104 category: Category::Production, 105 opt_in: None, 106 content: include_str!("../tals/lacnic.tal"), 107 }, 108 BundledTal { 109 name: "ripe", 110 description: "RIPE production TAL", 111 category: Category::Production, 112 opt_in: None, 113 content: include_str!("../tals/ripe.tal"), 114 }, 115 116 // RIR Testbed TALS 117 BundledTal { 118 name: "apnic-testbed", 119 description: "APNIC RPKI Testbed", 120 category: Category::RirTest, 121 opt_in: None, 122 content: include_str!("../tals/apnic-testbed.tal"), 123 }, 124 BundledTal { 125 name: "arin-ote", 126 description: "ARIN Operational Test and Evaluation Environment", 127 category: Category::RirTest, 128 opt_in: None, 129 content: include_str!("../tals/arin-ote.tal"), 130 }, 131 BundledTal { 132 name: "ripe-pilot", 133 description: "RIPE NCC RPKI Test Environment", 134 category: Category::RirTest, 135 opt_in: None, 136 content: include_str!("../tals/ripe-pilot.tal"), 137 }, 138 139 // Other Testbed TALs 140 BundledTal { 141 name: "nlnetlabs-testbed", 142 description: "NLnet Labs RPKI Testbed", 143 category: Category::Test, 144 opt_in: None, 145 content: include_str!("../tals/nlnetlabs-testbed.tal"), 146 } 147 ]; 148 149