]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Clean up and regularize names
authorAlan T. DeKok <aland@freeradius.org>
Tue, 24 Jan 2023 01:14:47 +0000 (20:14 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 24 Jan 2023 01:14:47 +0000 (20:14 -0500)
perl -p -i -e 's/fr_dhcpv6_packet_types/fr_dhcpv6_packet_names/g' $(git grep -l fr_dhcpv6_packet_types)

src/listen/dhcpv6/proto_dhcpv6_udp.c
src/process/dhcpv6/base.c
src/protocols/dhcpv6/base.c
src/protocols/dhcpv6/dhcpv6.h

index 0a47eb6210026302d44ebb126fe1677d73b32439..2e7ca69a5a13040fa951bcf38a93e3c694ede0ee 100644 (file)
@@ -186,7 +186,7 @@ static ssize_t mod_read(fr_listen_t *li, void **packet_ctx, fr_time_t *recv_time
                if ((packet->code == FR_DHCPV6_SOLICIT) ||
                    (packet->code == FR_DHCPV6_REBIND) ||
                    (packet->code == FR_DHCPV6_CONFIRM)) {
-                       RATE_LIMIT_GLOBAL(WARN, "Unicast packet %s - ignoring", fr_dhcpv6_packet_types[packet->code]);
+                       RATE_LIMIT_GLOBAL(WARN, "Unicast packet %s - ignoring", fr_dhcpv6_packet_names[packet->code]);
                        return 0;
                }
        } /* else it was multicast... remember that */
@@ -200,7 +200,7 @@ static ssize_t mod_read(fr_listen_t *li, void **packet_ctx, fr_time_t *recv_time
        /*
         *      Print out what we received.
         */
-       DEBUG2("Received %s XID %08x length %d %s", fr_dhcpv6_packet_types[packet->code], xid,
+       DEBUG2("Received %s XID %08x length %d %s", fr_dhcpv6_packet_names[packet->code], xid,
               (int) packet_len, thread->name);
 
        return packet_len;
index 96730737c72e59669331eb0b55cd023c47e26c36..4ef386a36910ec7a81f2a3c3ac20c7de708a634e 100644 (file)
@@ -299,7 +299,7 @@ static void dhcpv6_packet_debug(request_t *request, fr_radius_packet_t const *pa
 #endif
                    "",
                    received ? "Received" : "Sending",
-                   fr_dhcpv6_packet_types[packet->code],
+                   fr_dhcpv6_packet_names[packet->code],
                    packet->id,
                    packet->socket.inet.src_ipaddr.af == AF_INET6 ? "[" : "",
                    fr_box_ipaddr(packet->socket.inet.src_ipaddr),
index 440dad8ed93e7f2279ada1a38c60a5209d71e085..bdc486f501779552f3cb87f64bfa02890c649ae1 100644 (file)
@@ -68,7 +68,7 @@ fr_dict_attr_autoload_t libfreeradius_dhcpv6_dict_attr[] = {
 /*
  * grep VALUE share/dictionary/dhcpv6/dictionary.freeradius.internal  | awk '{print "[" $4 "] = \"" $3 "\"," }'
  */
-char const *fr_dhcpv6_packet_types[FR_DHCPV6_CODE_MAX] = {
+char const *fr_dhcpv6_packet_names[FR_DHCPV6_CODE_MAX] = {
         [0]                                            = "invalid",
         [FR_PACKET_TYPE_VALUE_SOLICIT]                 = "Solicit",
         [FR_PACKET_TYPE_VALUE_ADVERTISE]               = "Advertise",
@@ -834,7 +834,7 @@ static void dhcpv6_print_hex(FILE *fp, uint8_t const *packet, size_t packet_len,
 
        fprintf(fp, "%.*s", depth, tabs);
        if ((packet[0] > 0) && (packet[0] < FR_DHCPV6_CODE_MAX)) {
-               fprintf(fp, "packet: %s\n", fr_dhcpv6_packet_types[packet[0]]);
+               fprintf(fp, "packet: %s\n", fr_dhcpv6_packet_names[packet[0]]);
        } else {
                fprintf(fp, "packet: %02x\n", packet[0]);
        }
index d74c222807bdbcffa991b1d8eb680914722a6dd9..1805eb730fe9d492d6cfa0676d760d6a1608d20e 100644 (file)
@@ -104,7 +104,7 @@ typedef enum {
 
 #define FR_DHCPV6_PACKET_CODE_VALID(_code) (((_code) > 0) && ((_code) < FR_DHCPV6_CODE_MAX))
 
-extern char const              *fr_dhcpv6_packet_types[FR_DHCPV6_CODE_MAX];
+extern char const              *fr_dhcpv6_packet_names[FR_DHCPV6_CODE_MAX];
 
 /** subtype values for DHCPv4 and DHCPv6
  *