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_ipcp.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 *
     
    8989#include <net/if_ppp.h>
    9090#include <net/net.h>
     91#include <net/net_endian.h>
    9192#include <net/net_buf.h>
    9293#include <net/net_count.h>
     
    102103#include <netinet/ip.h>
    103104#include <netinet/tcp.h>
     105#include <netinet/tcp_var.h>
    104106#include <netinet/tcp_timer.h>
    105 #include <netinet/tcp_var.h>
    106107#include <netinet/udp_var.h>
    107108
     
    149150        NULL,
    150151        {
    151                 IPV4_ADDR_LOCAL,                /* IP アドレス                      */
     152                IPV4_ADDR_LOCAL,                /* IPv4 アドレス                    */
    152153                UINT_C(0),                      /* サブネットマスク             */
    153154                },
     
    157158        NULL,
    158159        {
    159                 IPV4_ADDR_REMOTE,               /* IP アドレス                      */
     160                IPV4_ADDR_REMOTE,               /* IPv4 アドレス                    */
    160161                UINT_C(0),                      /* サブネットマスク             */
    161162                }
     
    200201        ipcp_open,                      /* オープンする                       */
    201202        ipcp_close,                     /* クローズする                       */
    202         ip_input,                       /* データ入力、IP 入力          */
     203        ip_input,                       /* データ入力、IPv4 入力        */
    203204        };
    204205
     
    307308        int_t cilen = 0;
    308309
    309         cilen += sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);       /* IP アドレス */
     310        cilen += sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);       /* IPv4 アドレス */
    310311
    311312        return cilen;
     
    323324        buf = output->buf + sizeof(T_PPP_HDR) + sizeof(T_PPP_CP_HDR);
    324325
    325         /* IP アドレスオプションを追加する。 */
     326        /* IPv4 アドレスオプションを追加する。 */
    326327        *buf ++ = IPCP_CIT_ADDR;
    327328        *buf ++ = sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);
    328         ahtonl(buf, ipcp_local_neg_cfg.in_ifaddr.addr);
     329        ahtonl(buf, ipcp_local_neg_cfg.in4_ifaddr.addr);
    329330        buf += sizeof(uint32_t);
    330331        }
     
    355356            *buf ++ != IPCP_CIT_ADDR                    ||
    356357            *buf ++ != sizeof(T_PPP_CI_HDR) + sizeof(uint32_t)||
    357             nahcmpl(buf, ipcp_local_neg_cfg.in_ifaddr.addr))
     358            nahcmpl(buf, ipcp_local_neg_cfg.in4_ifaddr.addr))
    358359                return false;
    359360        buf += sizeof(uint32_t);
     
    390391                buf += sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);
    391392                len -= sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);
    392                 new_cfg.in_ifaddr.addr = cilong;
     393                new_cfg.in4_ifaddr.addr = cilong;
    393394                }
    394395
     
    438439                buf += sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);
    439440                len -= sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);
    440                 new_cfg.in_ifaddr.addr = 0;
     441                new_cfg.in4_ifaddr.addr = 0;
    441442                }
    442443
     
    499500                switch (type) {
    500501
    501                 case IPCP_CIT_ADDR:     /* IP アドレス */
     502                case IPCP_CIT_ADDR:     /* IPv4 アドレス */
    502503
    503504                        /* CI 長が、ヘッダ + 4 オクテットでなければエラー */
     
    506507                        else {
    507508                                ntoahl(addr, ap);
    508                                 if (addr != ipcp_remote_neg_cfg.in_ifaddr.addr &&
    509                                     (addr == 0 || ipcp_remote_neg_cfg.in_ifaddr.addr != 0)) {
     509                                if (addr != ipcp_remote_neg_cfg.in4_ifaddr.addr &&
     510                                    (addr == 0 || ipcp_remote_neg_cfg.in4_ifaddr.addr != 0)) {
    510511                                        *np ++ = IPCP_CIT_ADDR;
    511512                                        *np ++ = sizeof(T_PPP_CI_HDR) + sizeof(uint32_t);
    512                                         ahtonl(np, ipcp_remote_neg_cfg.in_ifaddr.addr);
     513                                        ahtonl(np, ipcp_remote_neg_cfg.in4_ifaddr.addr);
    513514                                        np  += sizeof(uint32_t);
    514515                                        code = PPP_CONFNAK;
    515516                                        }
    516517#if 1   /* 要確認 */
    517                                 else if (addr == 0 && ipcp_remote_neg_cfg.in_ifaddr.addr == 0)
     518                                else if (addr == 0 && ipcp_remote_neg_cfg.in4_ifaddr.addr == 0)
    518519#else
    519                                 else if (addr == 0 || ipcp_remote_neg_cfg.in_ifaddr.addr == 0)
     520                                else if (addr == 0 || ipcp_remote_neg_cfg.in4_ifaddr.addr == 0)
    520521#endif
    521522                                        code = PPP_CONFREJ;
    522523                                else
    523                                         ipcp_remote_neg_cfg.in_ifaddr.addr = addr;
     524                                        ipcp_remote_neg_cfg.in4_ifaddr.addr = addr;
    524525                                }
    525526                        break;
     
    582583        /*
    583584         *  サブネットマスクと
    584          *  ローカル・ブロードキャスト IP アドレスを設定する。
     585         *  ローカル・ブロードキャスト IPv4 アドレスを設定する。
    585586         */
    586         ipcp_local_ack_cfg.in_ifaddr.mask = MAKE_IPV4_LOCAL_MASK(ipcp_local_neg_cfg.in_ifaddr.addr);
     587        ipcp_local_ack_cfg.in4_ifaddr.mask = MAKE_IPV4_LOCAL_MASK(ipcp_local_neg_cfg.in4_ifaddr.addr);
    587588
    588589        /* 相手の構成情報の初期設定 */
     
    591592        /*
    592593         *  サブネットマスクと
    593          *  ローカル・ブロードキャスト IP アドレスを設定する。
     594         *  ローカル・ブロードキャスト IPv4 アドレスを設定する。
    594595         */
    595         ipcp_remote_ack_cfg.in_ifaddr.mask = MAKE_IPV4_LOCAL_MASK(ipcp_remote_neg_cfg.in_ifaddr.addr);
     596        ipcp_remote_ack_cfg.in4_ifaddr.mask = MAKE_IPV4_LOCAL_MASK(ipcp_remote_neg_cfg.in4_ifaddr.addr);
    596597
    597598        sig_sem(SEM_IPCP_READY);
    598599
    599         syslog(LOG_NOTICE, "[PPP/IPCP] up, Local IP Addr: %s, Remote IP Addr: %s.",
    600                            ip2str(NULL, &ipcp_local_neg_cfg.in_ifaddr.addr),
    601                            ip2str(NULL, &ipcp_remote_neg_cfg.in_ifaddr.addr));
     600        syslog(LOG_NOTICE, "[PPP/IPCP] up, Local IPv4 Addr: %s, Remote IPv4 Addr: %s.",
     601                           ip2str(NULL, &ipcp_local_neg_cfg.in4_ifaddr.addr),
     602                           ip2str(NULL, &ipcp_remote_neg_cfg.in4_ifaddr.addr));
    602603        }
    603604
Note: See TracChangeset for help on using the changeset viewer.