Ignore:
Timestamp:
Jan 21, 2018, 12:10:09 AM (6 years ago)
Author:
coas-nagasima
Message:

prototoolに関連するプロジェクトをnewlibからmuslを使うよう変更・更新
ntshellをnewlibの下位の実装から、muslのsyscallの実装に変更・更新
以下のOSSをアップデート
・mruby-1.3.0
・musl-1.1.18
・onigmo-6.1.3
・tcc-0.9.27
以下のOSSを追加
・openssl-1.1.0e
・curl-7.57.0
・zlib-1.2.11
以下のmrbgemsを追加
・iij/mruby-digest
・iij/mruby-env
・iij/mruby-errno
・iij/mruby-iijson
・iij/mruby-ipaddr
・iij/mruby-mock
・iij/mruby-require
・iij/mruby-tls-openssl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/ping.c

    r321 r331  
    22 *  TINET (TCP/IP Protocol Stack)
    33 *
    4  *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
     4 *  Copyright (C) 2001-2017 by Dep. of Computer Science and Engineering
    55 *                   Tomakomai National College of Technology, JAPAN
    66 *
     
    6161#include <net/ppp_ipcp.h>
    6262#include <net/net.h>
     63#include <net/net_endian.h>
    6364#include <net/net_buf.h>
    6465#include <net/net_timer.h>
     
    7475#ifdef USE_PING
    7576
     77#if defined(SUPPORT_INET4)
     78
    7679/*
    7780 *  変数
    7881 */
    7982
    80 static uint16_t icmp_id = 0;
     83#if 0
    8184static uint16_t curr_icmp_id;
    8285static uint16_t curr_icmp_len;
     86#endif
     87
     88static uint16_t icmp_id = 0;
    8389static SYSTIM   icmp_start_time;
    8490
     
    9096icmp_reply_timeout (void *arg)
    9197{
    92         syslog(LOG_NOTICE, "[PING] request timeout.");
     98        syslog(LOG_NOTICE, "[PING4] request timeout.");
    9399        }
    94100
     
    100106icmp_echo_reply (T_NET_BUF *input, uint_t ihoff)
    101107{
    102         SYSTIM time;
     108        SYSTIM          time;
     109        T_IN4_ADDR      addr;
    103110
    104111        syscall(get_tim(&time));
     112        addr = ntohl(GET_IP4_HDR(input)->src);
    105113        untimeout(icmp_reply_timeout, NULL);
    106         syslog(LOG_NOTICE, "[PING] reply, %d [ms].",
    107                            (time - icmp_start_time) * 1000 / SYSTIM_HZ);
     114        syslog(LOG_NOTICE, "[PING4] reply: %5ld [ms] from: %s",
     115                           (time - icmp_start_time) * 1000 / SYSTIM_HZ,
     116                           ip2str(NULL, &addr));
    108117        }
    109118
     
    143152
    144153        /* 応答チェック用の変数を設定する。*/
     154#if 0
    145155        curr_icmp_id  = icmp_id ++;
    146156        curr_icmp_len = len;
     157#endif
    147158
    148159        NET_COUNT_MIB(icmp_stats.icmpOutMsgs, 1);
     
    157168        }
    158169
     170#endif  /* of #if defined(SUPPORT_INET4) */
     171
    159172#endif  /* of #ifdef USE_PING */
Note: See TracChangeset for help on using the changeset viewer.