]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Add agent option universe.
authorTed Lemon <source@isc.org>
Sun, 19 Apr 1998 23:20:06 +0000 (23:20 +0000)
committerTed Lemon <source@isc.org>
Sun, 19 Apr 1998 23:20:06 +0000 (23:20 +0000)
common/tables.c

index 34d6260cdd9b499afa259ebbffe43ce5bf0fbe31..c53745b8001b802234d4907236afb169eb3e8bd7 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: tables.c,v 1.14 1998/03/16 06:15:04 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: tables.c,v 1.15 1998/04/19 23:20:06 mellon Exp $ Copyright (c) 1995, 1996, 1998 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -667,7 +667,265 @@ char *hardware_types [] = {
        "unknown-254",
        "unknown-255" };
 
-
+struct universe agent_universe;
+struct option agent_options [256] = {
+       { "pad", "",                                    &agent_universe, 0 },
+       { "circuit-id", "X",                            &agent_universe, 1 },
+       { "remote-id", "X",                             &agent_universe, 2 },
+       { "agent-id", "I",                              &agent_universe, 3 },
+       { "option-4", "X",                              &agent_universe, 4 },
+       { "option-5", "X",                              &agent_universe, 5 },
+       { "option-6", "X",                              &agent_universe, 6 },
+       { "option-7", "X",                              &agent_universe, 7 },
+       { "option-8", "X",                              &agent_universe, 8 },
+       { "option-9", "X",                              &agent_universe, 9 },
+       { "option-10", "X",                             &agent_universe, 10 },
+       { "option-11", "X",                             &agent_universe, 11 },
+       { "option-12", "X",                             &agent_universe, 12 },
+       { "option-13", "X",                             &agent_universe, 13 },
+       { "option-14", "X",                             &agent_universe, 14 },
+       { "option-15", "X",                             &agent_universe, 15 },
+       { "option-16", "X",                             &agent_universe, 16 },
+       { "option-17", "X",                             &agent_universe, 17 },
+       { "option-18", "X",                             &agent_universe, 18 },
+       { "option-19", "X",                             &agent_universe, 19 },
+       { "option-20", "X",                             &agent_universe, 20 },
+       { "option-21", "X",                             &agent_universe, 21 },
+       { "option-22", "X",                             &agent_universe, 22 },
+       { "option-23", "X",                             &agent_universe, 23 },
+       { "option-24", "X",                             &agent_universe, 24 },
+       { "option-25", "X",                             &agent_universe, 25 },
+       { "option-26", "X",                             &agent_universe, 26 },
+       { "option-27", "X",                             &agent_universe, 27 },
+       { "option-28", "X",                             &agent_universe, 28 },
+       { "option-29", "X",                             &agent_universe, 29 },
+       { "option-30", "X",                             &agent_universe, 30 },
+       { "option-31", "X",                             &agent_universe, 31 },
+       { "option-32", "X",                             &agent_universe, 32 },
+       { "option-33", "X",                             &agent_universe, 33 },
+       { "option-34", "X",                             &agent_universe, 34 },
+       { "option-35", "X",                             &agent_universe, 35 },
+       { "option-36", "X",                             &agent_universe, 36 },
+       { "option-37", "X",                             &agent_universe, 37 },
+       { "option-38", "X",                             &agent_universe, 38 },
+       { "option-39", "X",                             &agent_universe, 39 },
+       { "option-40", "X",                             &agent_universe, 40 },
+       { "option-41", "X",                             &agent_universe, 41 },
+       { "option-42", "X",                             &agent_universe, 42 },
+       { "option-43", "X",                             &agent_universe, 43 },
+       { "option-44", "X",                             &agent_universe, 44 },
+       { "option-45", "X",                             &agent_universe, 45 },
+       { "option-46", "X",                             &agent_universe, 46 },
+       { "option-47", "X",                             &agent_universe, 47 },
+       { "option-48", "X",                             &agent_universe, 48 },
+       { "option-49", "X",                             &agent_universe, 49 },
+       { "option-50", "X",                             &agent_universe, 50 },
+       { "option-51", "X",                             &agent_universe, 51 },
+       { "option-52", "X",                             &agent_universe, 52 },
+       { "option-53", "X",                             &agent_universe, 53 },
+       { "option-54", "X",                             &agent_universe, 54 },
+       { "option-55", "X",                             &agent_universe, 55 },
+       { "option-56", "X",                             &agent_universe, 56 },
+       { "option-57", "X",                             &agent_universe, 57 },
+       { "option-58", "X",                             &agent_universe, 58 },
+       { "option-59", "X",                             &agent_universe, 59 },
+       { "option-60", "X",                             &agent_universe, 60 },
+       { "option-61", "X",                             &agent_universe, 61 },
+       { "option-62", "X",                             &agent_universe, 62 },
+       { "option-63", "X",                             &agent_universe, 63 },
+       { "option-64", "X",                             &agent_universe, 64 },
+       { "option-65", "X",                             &agent_universe, 65 },
+       { "option-66", "X",                             &agent_universe, 66 },
+       { "option-67", "X",                             &agent_universe, 67 },
+       { "option-68", "X",                             &agent_universe, 68 },
+       { "option-69", "X",                             &agent_universe, 69 },
+       { "option-70", "X",                             &agent_universe, 70 },
+       { "option-71", "X",                             &agent_universe, 71 },
+       { "option-72", "X",                             &agent_universe, 72 },
+       { "option-73", "X",                             &agent_universe, 73 },
+       { "option-74", "X",                             &agent_universe, 74 },
+       { "option-75", "X",                             &agent_universe, 75 },
+       { "option-76", "X",                             &agent_universe, 76 },
+       { "option-77", "X",                             &agent_universe, 77 },
+       { "option-78", "X",                             &agent_universe, 78 },
+       { "option-79", "X",                             &agent_universe, 79 },
+       { "option-80", "X",                             &agent_universe, 80 },
+       { "option-81", "X",                             &agent_universe, 81 },
+       { "option-82", "X",                             &agent_universe, 82 },
+       { "option-83", "X",                             &agent_universe, 83 },
+       { "option-84", "X",                             &agent_universe, 84 },
+       { "option-85", "X",                             &agent_universe, 85 },
+       { "option-86", "X",                             &agent_universe, 86 },
+       { "option-87", "X",                             &agent_universe, 87 },
+       { "option-88", "X",                             &agent_universe, 88 },
+       { "option-89", "X",                             &agent_universe, 89 },
+       { "option-90", "X",                             &agent_universe, 90 },
+       { "option-91", "X",                             &agent_universe, 91 },
+       { "option-92", "X",                             &agent_universe, 92 },
+       { "option-93", "X",                             &agent_universe, 93 },
+       { "option-94", "X",                             &agent_universe, 94 },
+       { "option-95", "X",                             &agent_universe, 95 },
+       { "option-96", "X",                             &agent_universe, 96 },
+       { "option-97", "X",                             &agent_universe, 97 },
+       { "option-98", "X",                             &agent_universe, 98 },
+       { "option-99", "X",                             &agent_universe, 99 },
+       { "option-100", "X",                            &agent_universe, 100 },
+       { "option-101", "X",                            &agent_universe, 101 },
+       { "option-102", "X",                            &agent_universe, 102 },
+       { "option-103", "X",                            &agent_universe, 103 },
+       { "option-104", "X",                            &agent_universe, 104 },
+       { "option-105", "X",                            &agent_universe, 105 },
+       { "option-106", "X",                            &agent_universe, 106 },
+       { "option-107", "X",                            &agent_universe, 107 },
+       { "option-108", "X",                            &agent_universe, 108 },
+       { "option-109", "X",                            &agent_universe, 109 },
+       { "option-110", "X",                            &agent_universe, 110 },
+       { "option-111", "X",                            &agent_universe, 111 },
+       { "option-112", "X",                            &agent_universe, 112 },
+       { "option-113", "X",                            &agent_universe, 113 },
+       { "option-114", "X",                            &agent_universe, 114 },
+       { "option-115", "X",                            &agent_universe, 115 },
+       { "option-116", "X",                            &agent_universe, 116 },
+       { "option-117", "X",                            &agent_universe, 117 },
+       { "option-118", "X",                            &agent_universe, 118 },
+       { "option-119", "X",                            &agent_universe, 119 },
+       { "option-120", "X",                            &agent_universe, 120 },
+       { "option-121", "X",                            &agent_universe, 121 },
+       { "option-122", "X",                            &agent_universe, 122 },
+       { "option-123", "X",                            &agent_universe, 123 },
+       { "option-124", "X",                            &agent_universe, 124 },
+       { "option-125", "X",                            &agent_universe, 125 },
+       { "option-126", "X",                            &agent_universe, 126 },
+       { "option-127", "X",                            &agent_universe, 127 },
+       { "option-128", "X",                            &agent_universe, 128 },
+       { "option-129", "X",                            &agent_universe, 129 },
+       { "option-130", "X",                            &agent_universe, 130 },
+       { "option-131", "X",                            &agent_universe, 131 },
+       { "option-132", "X",                            &agent_universe, 132 },
+       { "option-133", "X",                            &agent_universe, 133 },
+       { "option-134", "X",                            &agent_universe, 134 },
+       { "option-135", "X",                            &agent_universe, 135 },
+       { "option-136", "X",                            &agent_universe, 136 },
+       { "option-137", "X",                            &agent_universe, 137 },
+       { "option-138", "X",                            &agent_universe, 138 },
+       { "option-139", "X",                            &agent_universe, 139 },
+       { "option-140", "X",                            &agent_universe, 140 },
+       { "option-141", "X",                            &agent_universe, 141 },
+       { "option-142", "X",                            &agent_universe, 142 },
+       { "option-143", "X",                            &agent_universe, 143 },
+       { "option-144", "X",                            &agent_universe, 144 },
+       { "option-145", "X",                            &agent_universe, 145 },
+       { "option-146", "X",                            &agent_universe, 146 },
+       { "option-147", "X",                            &agent_universe, 147 },
+       { "option-148", "X",                            &agent_universe, 148 },
+       { "option-149", "X",                            &agent_universe, 149 },
+       { "option-150", "X",                            &agent_universe, 150 },
+       { "option-151", "X",                            &agent_universe, 151 },
+       { "option-152", "X",                            &agent_universe, 152 },
+       { "option-153", "X",                            &agent_universe, 153 },
+       { "option-154", "X",                            &agent_universe, 154 },
+       { "option-155", "X",                            &agent_universe, 155 },
+       { "option-156", "X",                            &agent_universe, 156 },
+       { "option-157", "X",                            &agent_universe, 157 },
+       { "option-158", "X",                            &agent_universe, 158 },
+       { "option-159", "X",                            &agent_universe, 159 },
+       { "option-160", "X",                            &agent_universe, 160 },
+       { "option-161", "X",                            &agent_universe, 161 },
+       { "option-162", "X",                            &agent_universe, 162 },
+       { "option-163", "X",                            &agent_universe, 163 },
+       { "option-164", "X",                            &agent_universe, 164 },
+       { "option-165", "X",                            &agent_universe, 165 },
+       { "option-166", "X",                            &agent_universe, 166 },
+       { "option-167", "X",                            &agent_universe, 167 },
+       { "option-168", "X",                            &agent_universe, 168 },
+       { "option-169", "X",                            &agent_universe, 169 },
+       { "option-170", "X",                            &agent_universe, 170 },
+       { "option-171", "X",                            &agent_universe, 171 },
+       { "option-172", "X",                            &agent_universe, 172 },
+       { "option-173", "X",                            &agent_universe, 173 },
+       { "option-174", "X",                            &agent_universe, 174 },
+       { "option-175", "X",                            &agent_universe, 175 },
+       { "option-176", "X",                            &agent_universe, 176 },
+       { "option-177", "X",                            &agent_universe, 177 },
+       { "option-178", "X",                            &agent_universe, 178 },
+       { "option-179", "X",                            &agent_universe, 179 },
+       { "option-180", "X",                            &agent_universe, 180 },
+       { "option-181", "X",                            &agent_universe, 181 },
+       { "option-182", "X",                            &agent_universe, 182 },
+       { "option-183", "X",                            &agent_universe, 183 },
+       { "option-184", "X",                            &agent_universe, 184 },
+       { "option-185", "X",                            &agent_universe, 185 },
+       { "option-186", "X",                            &agent_universe, 186 },
+       { "option-187", "X",                            &agent_universe, 187 },
+       { "option-188", "X",                            &agent_universe, 188 },
+       { "option-189", "X",                            &agent_universe, 189 },
+       { "option-190", "X",                            &agent_universe, 190 },
+       { "option-191", "X",                            &agent_universe, 191 },
+       { "option-192", "X",                            &agent_universe, 192 },
+       { "option-193", "X",                            &agent_universe, 193 },
+       { "option-194", "X",                            &agent_universe, 194 },
+       { "option-195", "X",                            &agent_universe, 195 },
+       { "option-196", "X",                            &agent_universe, 196 },
+       { "option-197", "X",                            &agent_universe, 197 },
+       { "option-198", "X",                            &agent_universe, 198 },
+       { "option-199", "X",                            &agent_universe, 199 },
+       { "option-200", "X",                            &agent_universe, 200 },
+       { "option-201", "X",                            &agent_universe, 201 },
+       { "option-202", "X",                            &agent_universe, 202 },
+       { "option-203", "X",                            &agent_universe, 203 },
+       { "option-204", "X",                            &agent_universe, 204 },
+       { "option-205", "X",                            &agent_universe, 205 },
+       { "option-206", "X",                            &agent_universe, 206 },
+       { "option-207", "X",                            &agent_universe, 207 },
+       { "option-208", "X",                            &agent_universe, 208 },
+       { "option-209", "X",                            &agent_universe, 209 },
+       { "option-210", "X",                            &agent_universe, 210 },
+       { "option-211", "X",                            &agent_universe, 211 },
+       { "option-212", "X",                            &agent_universe, 212 },
+       { "option-213", "X",                            &agent_universe, 213 },
+       { "option-214", "X",                            &agent_universe, 214 },
+       { "option-215", "X",                            &agent_universe, 215 },
+       { "option-216", "X",                            &agent_universe, 216 },
+       { "option-217", "X",                            &agent_universe, 217 },
+       { "option-218", "X",                            &agent_universe, 218 },
+       { "option-219", "X",                            &agent_universe, 219 },
+       { "option-220", "X",                            &agent_universe, 220 },
+       { "option-221", "X",                            &agent_universe, 221 },
+       { "option-222", "X",                            &agent_universe, 222 },
+       { "option-223", "X",                            &agent_universe, 223 },
+       { "option-224", "X",                            &agent_universe, 224 },
+       { "option-225", "X",                            &agent_universe, 225 },
+       { "option-226", "X",                            &agent_universe, 226 },
+       { "option-227", "X",                            &agent_universe, 227 },
+       { "option-228", "X",                            &agent_universe, 228 },
+       { "option-229", "X",                            &agent_universe, 229 },
+       { "option-230", "X",                            &agent_universe, 230 },
+       { "option-231", "X",                            &agent_universe, 231 },
+       { "option-232", "X",                            &agent_universe, 232 },
+       { "option-233", "X",                            &agent_universe, 233 },
+       { "option-234", "X",                            &agent_universe, 234 },
+       { "option-235", "X",                            &agent_universe, 235 },
+       { "option-236", "X",                            &agent_universe, 236 },
+       { "option-237", "X",                            &agent_universe, 237 },
+       { "option-238", "X",                            &agent_universe, 238 },
+       { "option-239", "X",                            &agent_universe, 239 },
+       { "option-240", "X",                            &agent_universe, 240 },
+       { "option-241", "X",                            &agent_universe, 241 },
+       { "option-242", "X",                            &agent_universe, 242 },
+       { "option-243", "X",                            &agent_universe, 243 },
+       { "option-244", "X",                            &agent_universe, 244 },
+       { "option-245", "X",                            &agent_universe, 245 },
+       { "option-246", "X",                            &agent_universe, 246 },
+       { "option-247", "X",                            &agent_universe, 247 },
+       { "option-248", "X",                            &agent_universe, 248 },
+       { "option-249", "X",                            &agent_universe, 249 },
+       { "option-250", "X",                            &agent_universe, 250 },
+       { "option-251", "X",                            &agent_universe, 251 },
+       { "option-252", "X",                            &agent_universe, 252 },
+       { "option-253", "X",                            &agent_universe, 253 },
+       { "option-254", "X",                            &agent_universe, 254 },
+       { "option-end", "e",                            &agent_universe, 255 },
+};
 
 struct hash_table universe_hash;
 
@@ -675,7 +933,9 @@ void initialize_universes()
 {
        int i;
 
+       /* Set up the DHCP option universe... */
        dhcp_universe.name = "dhcp";
+       dhcp_universe.lookup_func = dhcp_option_lookup;
        dhcp_universe.hash = new_hash ();
        if (!dhcp_universe.hash)
                error ("Can't allocate dhcp option hash table.");
@@ -685,7 +945,24 @@ void initialize_universes()
                          (unsigned char *)dhcp_options [i].name, 0,
                          (unsigned char *)&dhcp_options [i]);
        }
-       universe_hash.hash_count = DEFAULT_HASH_SIZE;
+
+       /* Set up the Relay Agent Information Option suboption universe... */
+       agent_universe.name = "agent";
+       agent_universe.lookup_func = agent_suboption_lookup;
+       agent_universe.hash = new_hash ();
+       if (!agent_universe.hash)
+               error ("Can't allocate agent option hash table.");
+       for (i = 0; i < 256; i++) {
+               agent_universe.options [i] = &agent_options [i];
+               add_hash (agent_universe.hash,
+                         (unsigned char *)agent_options [i].name, 0,
+                         (unsigned char *)&agent_options [i]);
+       }
+
+       /* Set up the hash of universes. */
+       universe_hash.hash_count = DEFAULT_HASH_SIZE;   
        add_hash (&universe_hash, (unsigned char *)dhcp_universe.name, 0,
                  (unsigned char *)&dhcp_universe);
+       add_hash (&universe_hash, (unsigned char *)agent_universe.name, 0,
+                 (unsigned char *)&agent_universe);
 }