#ifdef TCSETS
TCSETS_val = TCSETS,
#endif
+#ifdef TUNSETIFF
+ TUNSETIFF_val = TUNSETIFF,
+#endif
+#ifdef TUNSETNOCSUM
+ TUNSETNOCSUM_val = TUNSETNOCSUM,
+#endif
+#ifdef TUNSETDEBUG
+ TUNSETDEBUG_val = TUNSETDEBUG,
+#endif
+#ifdef TUNSETPERSIST
+ TUNSETPERSIST_val = TUNSETPERSIST,
+#endif
+#ifdef TUNSETOWNER
+ TUNSETOWNER_val = TUNSETOWNER,
+#endif
+#ifdef TUNSETLINK
+ TUNSETLINK_val = TUNSETLINK,
+#endif
+#ifdef TUNSETGROUP
+ TUNSETGROUP_val = TUNSETGROUP,
+#endif
+#ifdef TUNGETFEATURES
+ TUNGETFEATURES_val = TUNGETFEATURES,
+#endif
+#ifdef TUNSETOFFLOAD
+ TUNSETOFFLOAD_val = TUNSETOFFLOAD,
+#endif
+#ifdef TUNSETTXFILTER
+ TUNSETTXFILTER_val = TUNSETTXFILTER,
+#endif
+#ifdef TUNGETIFF
+ TUNGETIFF_val = TUNGETIFF,
+#endif
+#ifdef TUNGETSNDBUF
+ TUNGETSNDBUF_val = TUNGETSNDBUF,
+#endif
+#ifdef TUNSETSNDBUF
+ TUNSETSNDBUF_val = TUNSETSNDBUF,
+#endif
+#ifdef TUNATTACHFILTER
+ TUNATTACHFILTER_val = TUNATTACHFILTER,
+#endif
+#ifdef TUNDETACHFILTER
+ TUNDETACHFILTER_val = TUNDETACHFILTER,
+#endif
+#ifdef TUNGETVNETHDRSZ
+ TUNGETVNETHDRSZ_val = TUNGETVNETHDRSZ,
+#endif
+#ifdef TUNSETVNETHDRSZ
+ TUNSETVNETHDRSZ_val = TUNSETVNETHDRSZ,
+#endif
+#ifdef TUNSETQUEUE
+ TUNSETQUEUE_val = TUNSETQUEUE,
+#endif
+#ifdef TUNSETIFINDEX
+ TUNSETIFINDEX_val = TUNSETIFINDEX,
+#endif
+#ifdef TUNGETFILTER
+ TUNGETFILTER_val = TUNGETFILTER,
+#endif
+
};
EOF
grep '^const _TIOC' gen-sysinfo.go | \
grep -v '_val =' | \
sed -e 's/^\(const \)_\(TIOC[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
+grep '^const _TUNSET' gen-sysinfo.go | \
+ grep -v '_val =' | \
+ sed -e 's/^\(const \)_\(TUNSET[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}
# We need TIOCGWINSZ.
if ! grep '^const TIOCGWINSZ' ${OUT} >/dev/null 2>&1; then
if grep '^const _TIOCGWINSZ_val' ${OUT} >/dev/null 2>&1; then
fi
fi
+if ! grep '^const TUNSETNOCSUM' ${OUT} >/dev/null 2>&1; then
+ if grep '^const _TUNSETNOCSUM_val' ${OUT} >/dev/null 2>&1; then
+ echo 'const TUNSETNOCSUM = _TUNSETNOCSUM_val' >> ${OUT}
+ fi
+fi
+
+if ! grep '^const TUNSETDEBUG' ${OUT} >/dev/null 2>&1; then
+ if grep '^const _TUNSETDEBUG_val' ${OUT} >/dev/null 2>&1; then
+ echo 'const TUNSETDEBUG = _TUNSETDEBUG_val' >> ${OUT}
+ fi
+fi
+
+if ! grep '^const TUNSETIFF' ${OUT} >/dev/null 2>&1; then
+ if grep '^const _TUNSETIFF_val' ${OUT} >/dev/null 2>&1; then
+ echo 'const TUNSETIFF = _TUNSETIFF_val' >> ${OUT}
+ fi
+fi
+
+if ! grep '^const TUNSETPERSIST' ${OUT} >/dev/null 2>&1; then
+ if grep '^const _TUNSETPERSIST_val' ${OUT} >/dev/null 2>&1; then
+ echo 'const TUNSETPERSIST = _TUNSETPERSIST_val' >> ${OUT}
+ fi
+fi
+
+if ! grep '^const TUNSETOWNER' ${OUT} >/dev/null 2>&1; then
+ if grep '^const _TUNSETOWNER_val' ${OUT} >/dev/null 2>&1; then
+ echo 'const TUNSETOWNER = _TUNSETOWNER_val' >> ${OUT}
+ fi
+fi
+
+if ! grep '^const TUNSETLINK' ${OUT} >/dev/null 2>&1; then
+ if grep '^const _TUNSETLINK_val' ${OUT} >/dev/null 2>&1; then
+ echo 'const TUNSETLINK = _TUNSETLINK_val' >> ${OUT}
+ fi
+fi
+
+if ! grep '^const TUNSETGROUP' ${OUT} >/dev/null 2>&1; then
+ if grep '^const _TUNSETGROUP_val' ${OUT} >/dev/null 2>&1; then
+ echo 'const TUNSETGROUP = _TUNSETGROUP_val' >> ${OUT}
+ fi
+fi
+
+if ! grep '^const TUNGETFEATURES' ${OUT} >/dev/null 2>&1; then
+ if grep '^const _TUNGETFEATURES_val' ${OUT} >/dev/null 2>&1; then
+ echo 'const TUNGETFEATURES = _TUNGETFEATURES_val' >> ${OUT}
+ fi
+fi
+
+if ! grep '^const TUNSETOFFLOAD' ${OUT} >/dev/null 2>&1; then
+ if grep '^const _TUNSETOFFLOAD_val' ${OUT} >/dev/null 2>&1; then
+ echo 'const TUNSETOFFLOAD = _TUNSETOFFLOAD_val' >> ${OUT}
+ fi
+fi
+
+if ! grep '^const TUNSETTXFILTER' ${OUT} >/dev/null 2>&1; then
+ if grep '^const _TUNSETTXFILTER_val' ${OUT} >/dev/null 2>&1; then
+ echo 'const TUNSETTXFILTER = _TUNSETTXFILTER_val' >> ${OUT}
+ fi
+fi
+
+if ! grep '^const TUNGETIFF' ${OUT} >/dev/null 2>&1; then
+ if grep '^const _TUNGETIFF_val' ${OUT} >/dev/null 2>&1; then
+ echo 'const TUNGETIFF = _TUNGETIFF_val' >> ${OUT}
+ fi
+fi
+
+if ! grep '^const TUNGETSNDBUF' ${OUT} >/dev/null 2>&1; then
+ if grep '^const _TUNGETSNDBUF_val' ${OUT} >/dev/null 2>&1; then
+ echo 'const TUNGETSNDBUF = _TUNGETSNDBUF_val' >> ${OUT}
+ fi
+fi
+
+if ! grep '^const TUNSETSNDBUF' ${OUT} >/dev/null 2>&1; then
+ if grep '^const _TUNSETSNDBUF_val' ${OUT} >/dev/null 2>&1; then
+ echo 'const TUNSETSNDBUF = _TUNSETSNDBUF_val' >> ${OUT}
+ fi
+fi
+
+if ! grep '^const TUNATTACHFILTER' ${OUT} >/dev/null 2>&1; then
+ if grep '^const _TUNATTACHFILTER_val' ${OUT} >/dev/null 2>&1; then
+ echo 'const TUNATTACHFILTER = _TUNATTACHFILTER_val' >> ${OUT}
+ fi
+fi
+
+if ! grep '^const TUNDETACHFILTER' ${OUT} >/dev/null 2>&1; then
+ if grep '^const _TUNDETACHFILTER_val' ${OUT} >/dev/null 2>&1; then
+ echo 'const TUNDETACHFILTER = _TUNDETACHFILTER_val' >> ${OUT}
+ fi
+fi
+
+if ! grep '^const TUNGETVNETHDRSZ'${OUT} >/dev/null 2>&1; then
+ if grep '^const _TUNGETVNETHDRSZ_val' ${OUT} >/dev/null 2>&1; then
+ echo 'const TUNGETVNETHDRSZ = _TUNGETVNETHDRSZ_val' >> ${OUT}
+ fi
+fi
+
+if ! grep '^const TUNSETVNETHDRSZ'${OUT} >/dev/null 2>&1; then
+ if grep '^const _TUNSETVNETHDRSZ_val' ${OUT} >/dev/null 2>&1; then
+ echo 'const TUNSETVNETHDRSZ = _TUNSETVNETHDRSZ_val' >> ${OUT}
+ fi
+fi
+
+if ! grep '^const TUNSETQUEUE'${OUT} >/dev/null 2>&1; then
+ if grep '^const _TUNSETQUEUE_val' ${OUT} >/dev/null 2>&1; then
+ echo 'const TUNSETQUEUE = _TUNSETQUEUE_val' >> ${OUT}
+ fi
+fi
+
+
+if ! grep '^const TUNSETIFINDEX' ${OUT} >/dev/null 2>&1; then
+ if grep '^const _TUNSETIFINDEX_val' ${OUT} >/dev/null 2>&1; then
+ echo 'const TUNSETIFINDEX = _TUNSETIFINDEX_val' >> ${OUT}
+ fi
+fi
+
+if ! grep '^const TUNGETFILTER' ${OUT} >/dev/null 2>&1; then
+ if grep '^const _TUNGETFILTER_val' ${OUT} >/dev/null 2>&1; then
+ echo 'const TUNGETFILTER = _TUNGETFILTER_val' >> ${OUT}
+ fi
+fi
+
+
+
# The ioctl flags for terminal control
grep '^const _TC[GS]ET' gen-sysinfo.go | grep -v _val | \
sed -e 's/^\(const \)_\(TC[GS]ET[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT}