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/net/ppp.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 *
     
    8181#include <net/if_ppp.h>
    8282#include <net/net.h>
     83#include <net/net_endian.h>
     84#include <net/net_var.h>
    8385#include <net/net_buf.h>
    8486#include <net/net_timer.h>
     
    8991#include <net/ppp_fsm.h>
    9092#include <net/ppp_lcp.h>
     93#include <net/ppp_ipv6cp.h>
    9194#include <net/ppp_ipcp.h>
    9295#include <net/ppp_ccp.h>
     
    108111T_PPP_PROTENT *protocols[] = {
    109112        &lcp_protent,
     113
     114#ifdef _IP6_CFG
     115        &ipv6cp_protent,
     116#endif  /* of #ifdef _IP6_CFG */
     117
     118#ifdef _IP4_CFG
    110119        &ipcp_protent,
     120#endif  /* of #ifdef _IP4_CFG */
    111121
    112122#ifdef SUPPORT_CCP
    113123        &ccp_protent,
    114 #endif  /* #ifdef SUPPORT_CCP */
     124#endif  /* of #ifdef SUPPORT_CCP */
    115125
    116126#ifdef LCP_CFG_PAP
    117127        &pap_protent,
    118 #endif  /* #ifdef LCP_CFG_PAP */
     128#endif  /* of #ifdef LCP_CFG_PAP */
    119129
    120130#ifdef LCP_CFG_CHAP
    121131        &chap_protent,
    122 #endif  /* #ifdef LCP_CFG_CHAP */
     132#endif  /* of #ifdef LCP_CFG_CHAP */
    123133
    124134        NULL
     
    223233#endif  /* of #ifdef PPP_CFG_MODEM */
    224234
     235#ifdef _IP6_CFG
     236        /* IPV6CP の接続完了まで待つ。*/
     237        if ((error = wait_ipv6cp()) != E_OK)
     238                goto buf_ret;
     239#endif  /* of #ifdef _IP6_CFG */
     240
     241#ifdef _IP4_CFG
    225242        /* IPCP の接続完了まで待つ。*/
    226243        if ((error = wait_ipcp()) != E_OK)
    227244                goto buf_ret;
     245#endif  /* of #ifdef _IP4_CFG */
     246
     247#ifdef _IP4_CFG
     248        /* IPCP の接続完了まで待つ。*/
     249        if ((error = wait_ipcp()) != E_OK)
     250                goto buf_ret;
     251#endif  /* of #ifdef _IP4_CFG */
    228252
    229253#ifdef PPP_IDLE_TIMEOUT
     
    290314        ID              tskid;
    291315        int_t           ix;
     316        uint8_t         rcount = 0;
    292317
    293318        /* ポートを初期設定する */
     
    321346        /* PPP 出力タスクを起動する */
    322347        syscall(act_tsk(PPP_OUTPUT_TASK));
     348
     349        /* 乱数生成を初期化する。*/
     350        net_srand(0);
    323351
    324352        while (true) {
     
    328356                        if (input->len > 0) {
    329357
    330         #ifdef PPP_IDLE_TIMEOUT
     358                                /* 乱数生成を初期化する。*/
     359                                if (rcount == 0)
     360                                        net_srand(input->len);
     361                                rcount ++;
     362
     363#ifdef PPP_IDLE_TIMEOUT
    331364                                wai_sem(SEM_IDLE_TIMEOUT);
    332365                                if (idle && ntohs(*GET_PPP_HDR(input)) != PPP_LCP) {
     
    335368                                        }
    336369                                sig_sem(SEM_IDLE_TIMEOUT);
    337         #endif  /* of #ifdef PPP_IDLE_TIMEOUT */
     370#endif  /* of #ifdef PPP_IDLE_TIMEOUT */
    338371
    339372                                parse_input(input);
     
    342375                                syscall(rel_net_buf(input));
    343376
    344         #ifdef PPP_IDLE_TIMEOUT
     377#ifdef PPP_IDLE_TIMEOUT
    345378                        wai_sem(SEM_IDLE_TIMEOUT);
    346379                        if (!idle && ppp_phase == PPP_PHASE_NETWORK) {
     
    353386                                }
    354387                        sig_sem(SEM_IDLE_TIMEOUT);
    355         #endif  /* of #ifdef PPP_IDLE_TIMEOUT */
     388#endif  /* of #ifdef PPP_IDLE_TIMEOUT */
    356389
    357390                        }
Note: See TracChangeset for help on using the changeset viewer.