]> rtime.felk.cvut.cz Git - lisovros/iproute2_canprio.git/commitdiff
XFRM is now a config optio.
authorosdl.net!shemminger <osdl.net!shemminger>
Fri, 30 Jul 2004 22:27:50 +0000 (22:27 +0000)
committerosdl.net!shemminger <osdl.net!shemminger>
Fri, 30 Jul 2004 22:27:50 +0000 (22:27 +0000)
(Logical change 1.60)

configure
ip/Makefile

index 84a87c9791ea28cc3ab3a2dfb040f8c00b4daab2..406ba954fbae545d44fb7bf443a1670b8ceda1c4 100644 (file)
--- a/configure
+++ b/configure
@@ -5,7 +5,17 @@ INCLUDE=${1:-"/usr/include"}
 
 echo "# Generated config based on" $INCLUDE >Config
 
-echo "TC"
+echo -n "TC xfrm       "
+XFRM=$INCLUDE/linux/xfrm.h
+if [ ! -r $XFRM ];
+then
+    echo no
+else
+    echo "IP_CONFIG_XFRM:=y" >>Config
+    echo yes
+fi
+
+echo "TC schedulers"
 PKT_SCHED=$INCLUDE/linux/pkt_sched.h
 if [ ! -r $PKT_SCHED ];
 then
@@ -13,7 +23,7 @@ then
     exit 1
 fi
 
-echo -n " netem scheduler... "
+echo -n " netem  "
 cat >/tmp/netemtest.c <<EOF
 #include <asm/types.h>
 #include <linux/pkt_sched.h>
@@ -26,13 +36,13 @@ gcc -I$INCLUDE -c /tmp/netemtest.c  >/dev/null 2>&1
 if [ $? -eq 0 ]
 then 
     echo "TC_CONFIG_NETEM:=y" >>Config
-    echo y
+    echo yes
 else
-    echo n
+    echo no
 fi
 rm -f /tmp/netemtest.c /tmp/netemtest.o
 
-echo -n " ATM...              "
+echo -n " ATM  "
 cat >/tmp/atmtest.c <<EOF
 #include <atm.h>
 int main(int argc, char **argv) {
@@ -45,13 +55,13 @@ gcc -I$INCLUDE -o /tmp/atmtest /tmp/atmtest.c -latm >/dev/null 2>&1
 if [ $? -eq 0 ]
 then
     echo "TC_CONFIG_ATM:=y" >>Config
-    echo y
+    echo yes
 else
-    echo n
+    echo no
 fi
 rm -f /tmp/atmtest.c /tmp/atmtest
 
-echo -n " HTB...              "
+echo -n " HTB  "
 DEF_HTB=`grep '^#define HTB_TC_VER' tc/q_htb.c`
 cat >/tmp/htbtest.c <<EOF
 #include <stdio.h>
@@ -66,34 +76,56 @@ int main(int argc, char **argv) {
        return 0;
 }
 EOF
-gcc -I$INCLUDE -o /tmp/htbtest /tmp/htbtest.c
+gcc -I$INCLUDE -o /tmp/htbtest /tmp/htbtest.c >/dev/null 2>&1
 if [ $? -eq 0 -a /tmp/htbtest ]
 then
        echo "TC_CONFIG_HTB:=y" >>Config
-       echo y
+       echo yes
 else
-    echo n
+    echo no
 fi
 rm -f /tmp/htbtest /tmp/htbtest.c
 
+echo -n " HFSC "
+cat >/tmp/hfsctest.c <<EOF
+#include <asm/types.h>
+#include <linux/pkt_sched.h>
+int main(int argc, char **argv) {
+       static struct tc_hfsc_qopt qopt;
+
+       exit(qopt.defcls);
+}
+EOF
+gcc -I$INCLUDE -c /tmp/hfsctest.c  >/dev/null 2>&1
+if [ $? -eq 0 ]
+then 
+    echo "TC_CONFIG_HFSC:=y" >>Config
+    echo yes
+else
+    echo no
+fi
+rm -f /tmp/hfsctest.c /tmp/hfsctest.o
+
+
+
 # See if we know about TCP Vegas
 echo "SS"
-echo -n " TCP Vegas...        "
+echo -n " TCP Vegas        "
 if grep -q TCPDIAG_VEGASINFO $INCLUDE/linux/tcp_diag.h  >/dev/null 2>&1
 then
     echo "SS_CONFIG_VEGAS:=y" >>Config
-    echo y
+    echo yes
 else
-    echo n
+    echo no
 fi
 
-echo -n " TCP DRS...          "
+echo -n " TCP DRS          "
 if grep -q tcpi_rcv_space $INCLUDE/linux/tcp.h
 then
     echo "SS_CONFIG_DRS:=y" >>Config
-    echo y
+    echo yes
 else
-    echo n
+    echo no
 fi
 
 
index df4fbda13830699f1c260d5ba643c895eb421f24..b73371de1512261a5d77b56a05f89059e26b0a0b 100644 (file)
@@ -1,6 +1,14 @@
 IPOBJ=ip.o ipaddress.o iproute.o iprule.o \
-    rtm_map.o iptunnel.o ipneigh.o iplink.o ipmaddr.o \
-    ipmonitor.o ipmroute.o ipxfrm.o xfrm_state.o xfrm_policy.o
+    rtm_map.o iptunnel.o ipneigh.o iplink.o \
+    ipmaddr.o ipmonitor.o ipmroute.o 
+
+include ../Config
+
+ifeq ($(IP_CONFIG_XFRM),y)
+       IPOBJ   += ipxfrm.o xfrm_state.o xfrm_policy.o
+else
+       IPOBJ   += xfrm_stub.o
+endif
 
 RTMONOBJ=rtmon.o