Re-indent clatd code with clang-format
clang-format --style file -i *.{c,h,cpp}
Bug: 118848635
Test: 1. browse over ipv6-only network
2. atest clatd_test
3. clang-format --style file -i *.{c,h,cpp}
Change-Id: I7389426101df7745370d0ac5c55176cd8fe2b08b
diff --git a/clatd.h b/clatd.h
index f421f46..327a948 100644
--- a/clatd.h
+++ b/clatd.h
@@ -21,7 +21,7 @@
#include <sys/uio.h>
#define MAXMTU 1500
-#define PACKETLEN (MAXMTU+sizeof(struct tun_pi))
+#define PACKETLEN (MAXMTU + sizeof(struct tun_pi))
#define CLATD_VERSION "1.4"
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
@@ -37,9 +37,15 @@
// specific parts of the packet. The packet_* functions operate on all the packet segments past a
// given position.
typedef enum {
- CLAT_POS_TUNHDR, CLAT_POS_IPHDR, CLAT_POS_FRAGHDR, CLAT_POS_TRANSPORTHDR,
- CLAT_POS_ICMPERR_IPHDR, CLAT_POS_ICMPERR_FRAGHDR, CLAT_POS_ICMPERR_TRANSPORTHDR,
- CLAT_POS_PAYLOAD, CLAT_POS_MAX
+ CLAT_POS_TUNHDR,
+ CLAT_POS_IPHDR,
+ CLAT_POS_FRAGHDR,
+ CLAT_POS_TRANSPORTHDR,
+ CLAT_POS_ICMPERR_IPHDR,
+ CLAT_POS_ICMPERR_FRAGHDR,
+ CLAT_POS_ICMPERR_TRANSPORTHDR,
+ CLAT_POS_PAYLOAD,
+ CLAT_POS_MAX
} clat_packet_index;
typedef struct iovec clat_packet[CLAT_POS_MAX];