Changeset 331 for EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/ping6.c
- Timestamp:
- Jan 21, 2018, 12:10:09 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/ping6.c
r321 r331 2 2 * TINET (TCP/IP Protocol Stack) 3 3 * 4 * Copyright (C) 2001-20 09by Dep. of Computer Science and Engineering4 * Copyright (C) 2001-2017 by Dep. of Computer Science and Engineering 5 5 * Tomakomai National College of Technology, JAPAN 6 6 * … … 61 61 #include <net/ppp_ipcp.h> 62 62 #include <net/net.h> 63 #include <net/net_endian.h> 63 64 #include <net/net_buf.h> 64 65 #include <net/net_timer.h> … … 67 68 #include <netinet/in.h> 68 69 #include <netinet/in_var.h> 70 #include <netinet/ip.h> 71 #include <netinet/ip_var.h> 72 #include <netinet/ip_icmp.h> 69 73 70 #include <netinet6/in6.h>71 #include <netinet6/in6_var.h>72 74 #include <netinet6/nd6.h> 73 75 74 #include <netinet/ip6.h> 75 #include <netinet6/ip6_var.h> 76 #include <netinet/icmp6.h> 77 78 #include <net/if6_var.h> 76 #include <net/if_var.h> 79 77 80 78 #ifdef USE_PING 79 80 #if defined(SUPPORT_INET6) 81 81 82 82 /* … … 84 84 */ 85 85 86 static uint16_t send_icmp6_id = 0; 86 #if 0 87 87 static uint16_t curr_icmp6_id; 88 88 static uint16_t curr_icmp6_size; 89 #endif 90 91 static uint16_t send_icmp6_id = 0; 89 92 static uint16_t reply_count; 90 93 static SYSTIM icmp6_start_time; … … 108 111 icmp6_echo_reply (T_NET_BUF *input, uint_t ihoff) 109 112 { 110 T_IP6_HDR *ip6h; 111 SYSTIM time; 113 SYSTIM time; 112 114 113 115 syscall(get_tim(&time)); 114 ip6h = GET_IP6_HDR(input); 115 116 syslog(LOG_NOTICE, "[PING6] reply: %5d [ms] from: %s", 116 untimeout(icmp6_reply_timeout, NULL); 117 syslog(LOG_NOTICE, "[PING6] reply: %5ld [ms] from: %s", 117 118 (time - icmp6_start_time) * 1000 / SYSTIM_HZ, 118 ipv62str(NULL, & ip6h->src));119 ipv62str(NULL, &GET_IP6_HDR(input)->src)); 119 120 reply_count ++; 120 121 } … … 169 170 170 171 /* 応答チェック用の変数を設定する。*/ 172 reply_count = 0; 173 174 #if 0 171 175 curr_icmp6_id = send_icmp6_id ++; 172 176 curr_icmp6_size = size; 177 #endif 173 178 174 reply_count = 0; 175 179 #if 0 176 180 syslog(LOG_NOTICE, "[PING6] send: TMO:%d, SIZE:%d, to: %s, from %s", 177 181 tmo, size, 178 182 ipv62str(NULL, addr), ipv62str(NULL, &ia->addr)); 183 #endif 179 184 180 185 /* 送信後、現在の時間を記憶し、タイムアウトを設定する。*/ … … 188 193 } 189 194 195 #endif /* of #if defined(SUPPORT_INET6) */ 196 190 197 #endif /* of #ifdef USE_PING */
Note:
See TracChangeset
for help on using the changeset viewer.