Commit af5e4b17 authored by Lionel Gauthier's avatar Lionel Gauthier

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5616 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 2c37f777
...@@ -245,9 +245,17 @@ set_interface_up() { ...@@ -245,9 +245,17 @@ set_interface_up() {
sync sync
} }
# input is hostname, you should have checked it is reachable by
# ping -c 1 $the_hostname > /dev/null || { echo_fatal "the_hostname does not respond to ping" >&2 ; }
get_ip() {
IP=$(python -c 'import socket; print socket.gethostbyname("'$1'")')
echo "$IP"
}
get_mac_router() { get_mac_router() {
ping -c 1 router.eur > /dev/null || { echo_fatal "router.eur does not respond to ping" >&2 ; } ping -c 1 router.eur > /dev/null || { echo_fatal "router.eur does not respond to ping" >&2 ; }
IP_ROUTER=`python -c 'import socket; print socket.gethostbyname("router.eur")'` IP_ROUTER=$(get_ip router.eur)
#IP_ROUTER=`python -c 'import socket; print socket.gethostbyname("router.eur")'`
export MAC_ROUTER=`ip neigh show | grep $IP_ROUTER' ' | cut -d ' ' -f5 | tr -d ':'` export MAC_ROUTER=`ip neigh show | grep $IP_ROUTER' ' | cut -d ' ' -f5 | tr -d ':'`
echo_success "ROUTER IP ADDRESS= $IP_ROUTER" echo_success "ROUTER IP ADDRESS= $IP_ROUTER"
echo_success "ROUTER MAC ADDRESS= $MAC_ROUTER" echo_success "ROUTER MAC ADDRESS= $MAC_ROUTER"
......
...@@ -162,7 +162,7 @@ fi ...@@ -162,7 +162,7 @@ fi
check_install_epc_software #check_install_epc_software
################################## ##################################
...@@ -329,8 +329,14 @@ PCAP_S6A_LOG_FILE=tshark_mme_s6a.$HOSTNAME.pcap ...@@ -329,8 +329,14 @@ PCAP_S6A_LOG_FILE=tshark_mme_s6a.$HOSTNAME.pcap
trap control_c SIGINT trap control_c SIGINT
nohup tshark -i $MME_INTERFACE_NAME_FOR_S1_MME -w $THIS_SCRIPT_PATH/OUTPUT/$HOSTNAME/$PCAP_S1C_LOG_FILE & HSS_IP=$(get_ip hss.eur)
nohup tshark -i $MME_INTERFACE_NAME_FOR_S6A -w $THIS_SCRIPT_PATH/OUTPUT/$HOSTNAME/$PCAP_S6A_LOG_FILE & echo_success "HSS_IP: $HSS_IP"
MME_INTERFACE_NAME_FOR_S6A=`ip route get $HSS_IP | grep $HSS_IP | cut -d ' ' -f 3`
echo_success "MME_INTERFACE_NAME_FOR_S1_MME : $MME_INTERFACE_NAME_FOR_S1_MME"
echo_success "MME_INTERFACE_NAME_FOR_S6A : $MME_INTERFACE_NAME_FOR_S6A"
nohup tshark -i $MME_INTERFACE_NAME_FOR_S1_MME -f "not port 22" -w $THIS_SCRIPT_PATH/OUTPUT/$HOSTNAME/$PCAP_S1C_LOG_FILE &
nohup tshark -i $MME_INTERFACE_NAME_FOR_S6A -f "not port 22" -w $THIS_SCRIPT_PATH/OUTPUT/$HOSTNAME/$PCAP_S6A_LOG_FILE &
cd $OPENAIRCN_DIR/$OBJ_DIR cd $OPENAIRCN_DIR/$OBJ_DIR
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment