udhcpc: tweak help text
[oweals/busybox.git] / networking / udhcp / common.h
index 786266810b7cd08d68d357811c19875c84a6d201..0e8e45fd2a7378abe56401985743e64a6e50f516 100644 (file)
@@ -14,7 +14,7 @@
 
 PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
 
-extern const uint8_t MAC_BCAST_ADDR[6]; /* six all-ones */
+extern const uint8_t MAC_BCAST_ADDR[6] ALIGN2; /* six all-ones */
 
 
 /*** DHCP packet ***/
@@ -80,6 +80,9 @@ enum {
        OPTION_IP = 1,
        OPTION_IP_PAIR,
        OPTION_STRING,
+       /* Opts of STRING_HOST type will be sanitized before they are passed
+        * to udhcpc script's environment: */
+       OPTION_STRING_HOST,
 //     OPTION_BOOLEAN,
        OPTION_U8,
        OPTION_U16,
@@ -88,6 +91,7 @@ enum {
        OPTION_S32,
        OPTION_BIN,
        OPTION_STATIC_ROUTES,
+       OPTION_6RD,
 #if ENABLE_FEATURE_UDHCP_RFC3397
        OPTION_DNS_STRING,  /* RFC1035 compressed domain name list */
        OPTION_SIP_SERVERS,
@@ -103,7 +107,7 @@ enum {
 /* DHCP option codes (partial list). See RFC 2132 and
  * http://www.iana.org/assignments/bootp-dhcp-parameters/
  * Commented out options are handled by common option machinery,
- * uncommented ones have spacial cases (grep for them to see).
+ * uncommented ones have special cases (grep for them to see).
  */
 #define DHCP_PADDING            0x00
 #define DHCP_SUBNET             0x01
@@ -183,8 +187,8 @@ struct option_set {
 };
 
 extern const struct dhcp_optflag dhcp_optflags[];
-extern const char dhcp_option_strings[];
-extern const uint8_t dhcp_option_lengths[];
+extern const char dhcp_option_strings[] ALIGN1;
+extern const uint8_t dhcp_option_lengths[] ALIGN1;
 
 unsigned FAST_FUNC udhcp_option_idx(const char *name);
 
@@ -307,6 +311,9 @@ int arpping(uint32_t test_nip,
                uint8_t *from_mac,
                const char *interface) FAST_FUNC;
 
+/* note: ip is a pointer to an IPv6 in network order, possibly misaliged */
+int sprint_nip6(char *dest, /*const char *pre,*/ const uint8_t *ip) FAST_FUNC;
+
 POP_SAVED_FUNCTION_VISIBILITY
 
 #endif