summaryrefslogtreecommitdiffstats
path: root/tun.h
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2019-04-10 23:22:30 +0900
committerMaciej Zenczykowski <maze@google.com>2019-05-02 00:49:33 +0000
commit3297c7d7bca85db2b178e8838138b71e9d2a86ad (patch)
tree0a8afeddec201ee6f1b47629cd6bdaefad13b8ca /tun.h
parent35d9175db948861be168f20bf72f928802b85fe1 (diff)
downloadplatform_external_android-clat-3297c7d7bca85db2b178e8838138b71e9d2a86ad.tar.gz
platform_external_android-clat-3297c7d7bca85db2b178e8838138b71e9d2a86ad.tar.bz2
platform_external_android-clat-3297c7d7bca85db2b178e8838138b71e9d2a86ad.zip
Enable clang-tidy for clatd.
Enable the same warnings used elsewhere in the tree, and fix two warnings it found (a safe use of strcpy, and a missing O_CLOEXEC when opening the tun device node. Test: builds, boots, clatd works Test: m clatd clatd_test clatd_microbenchmark && atest clatd_test Bug: 131268436 Change-Id: I9a5ea4de5f31d3c495871250a6493b07535a604b Merged-In: I9a5ea4de5f31d3c495871250a6493b07535a604b (cherry picked from commit 6a095dfa6bd2000f650308cdfa5a69e2635c02ec)
Diffstat (limited to 'tun.h')
-rw-r--r--tun.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tun.h b/tun.h
index f0449b9..95650fa 100644
--- a/tun.h
+++ b/tun.h
@@ -30,7 +30,7 @@ struct tun_data {
};
int tun_open();
-int tun_alloc(char *dev, int fd);
+int tun_alloc(char *dev, int fd, size_t len);
int send_tun(int fd, clat_packet out, int iov_len);
int set_nonblocking(int fd);