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

Location:
EcnlProtoTool/trunk/asp3_dcre/tinet/net
Files:
4 added
49 edited

Legend:

Unmodified
Added
Removed
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/ether_var.h

    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 *
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/ethernet.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 *
     
    6363#include <net/if_arp.h>
    6464#include <net/net.h>
     65#include <net/net_endian.h>
    6566#include <net/net_var.h>
    6667#include <net/net_buf.h>
     
    7172#include <netinet/in_var.h>
    7273#include <netinet/if_ether.h>
     74
    7375#include <netinet6/if6_ether.h>
    7476#include <netinet6/nd6.h>
    7577
    7678#include <net/if_var.h>
    77 #include <net/if6_var.h>
    7879
    7980#ifdef SUPPORT_ETHER
     
    8384 */
    8485
    85 #if defined(SUPPORT_INET4)
     86#if defined(_IP4_CFG)
    8687
    8788const uint8_t ether_broad_cast_addr[ETHER_ADDR_LEN] = {
     
    9091        };
    9192
    92 #endif  /* of #if defined(SUPPORT_INET4) */
     93#endif  /* of #if defined(_IP4_CFG) */
    9394
    9495/*
     
    9899/* ネットワークインタフェース構造体 */
    99100
    100 #if defined(SUPPORT_INET4)
    101 
    102 static T_IFNET ether_ifnet = {
    103         NULL,                   /* ネットワークインタフェースのソフトウェア情報       */
    104         {
    105                 IPV4_ADDR_LOCAL,        /* IPv4 アドレス            */
    106                 IPV4_ADDR_LOCAL_MASK,   /* サブネットマスク             */
    107                 },
    108         };
    109 
    110 #endif  /* of #if defined(SUPPORT_INET4) */
    111 
    112 #if defined(SUPPORT_INET6)
    113 
    114 static T_IFNET ether_ifnet = {
    115         NULL,                   /* ネットワークインタフェースのソフトウェア情報       */
    116         {0},                    /* IPv6 アドレス情報                          */
    117         {0},                    /* マルチキャスト IPv6 アドレス                    */
    118         0,                              /* フラグ                                  */
    119         };
    120 
    121 #endif  /* of #if defined(SUPPORT_INET6) */
     101static T_IFNET ether_ifnet;
    122102
    123103#ifdef SUPPORT_MIB
    124104
    125 /*
    126  *  SNMP の 管理情報ベース (MIB)
    127  */
     105/*  SNMP の 管理情報ベース (MIB) */
    128106
    129107T_IF_STATS if_stats;
     
    158136
    159137/*
     138 *  ether_srand -- 乱数を初期値を返す。
     139 */
     140
     141uint32_t
     142ether_srand (void)
     143{
     144        T_IF_SOFTC      *ic;
     145        uint32_t        rval;
     146
     147        ic = IF_ETHER_NIC_GET_SOFTC();
     148        rval  = (ic->ifaddr.lladdr[2] << 24)
     149              + (ic->ifaddr.lladdr[3] << 16)
     150              + (ic->ifaddr.lladdr[4] <<  8)
     151              + (ic->ifaddr.lladdr[5]      );
     152
     153#ifdef ETHER_CFG_COLLECT_ADDR
     154
     155        rval += (ether_collect_addr.lladdr[2] << 24)
     156              + (ether_collect_addr.lladdr[3] << 16)
     157              + (ether_collect_addr.lladdr[4] <<  8)
     158              + (ether_collect_addr.lladdr[5]      );
     159
     160#endif  /* of #ifdef ETHER_CFG_COLLECT_ADDR */
     161
     162        return rval;
     163        }
     164
     165/*
    160166 *  ether_get_ifnet -- ネットワークインタフェース構造体を返す。
    161167 */
     
    167173        }
    168174
    169 #if defined(SUPPORT_INET6)
     175#if defined(_IP6_CFG)
    170176
    171177/*
     
    174180
    175181ER
    176 ether_in6_resolve_multicast (T_ETHER_ADDR *ifaddr, T_IN6_ADDR *maddr)
     182ether_in6_resolve_multicast (T_ETHER_ADDR *ifaddr, const T_IN6_ADDR *maddr)
    177183{
    178184        /* マルチキャストアドレスかチェックする。*/
     
    186192        }
    187193
    188 #endif  /* of #if defined(SUPPORT_INET6) */
     194#endif  /* of #if defined(_IP6_CFG) */
    189195
    190196/**
     
    203209      }
    204210#endif /* LWIP_ARP */
     211
     212#if LWIP_IGMP
     213      /* resend IGMP memberships */
     214      if (ether->_flags & IF_FLAG_IGMP) {
     215        igmp_report_groups(ether);
     216      }
     217#endif /* LWIP_IGMP */
    205218    }
    206219    if (ether->link_callback) {
     
    262275
    263276ER
    264 ether_output (T_NET_BUF *output, void *dst, T_IF_ADDR *gw, TMO tmout)
     277ether_output (T_NET_BUF *output, const void *dst, T_IF_ADDR *gw, TMO tmout)
    265278{
    266279        T_IF_SOFTC      *ic;
     
    275288        switch(ntohs(eth->type)) {
    276289
    277 #if defined(SUPPORT_INET4)
     290#if defined(_IP4_CFG)
    278291
    279292        case ETHER_TYPE_IP:             /* IPv4 */
     
    292305                break;
    293306
    294 #endif  /* of #if defined(SUPPORT_INET4) */
    295 
    296 #if defined(SUPPORT_INET6)
     307#endif  /* of #if defined(_IP4_CFG) */
     308
     309#if defined(_IP6_CFG)
    297310
    298311        case ETHER_TYPE_IPV6:           /* IPv6 */
    299                 error = nd6_storelladdr((T_ETHER_ADDR*)GET_ETHER_HDR(output)->dhost,
    300                                         (T_IN6_ADDR*)dst, gw);
     312                error = nd6_storelladdr((T_ETHER_ADDR*)eth->dhost,
     313                                        (const T_IN6_ADDR*)dst, gw);
    301314                if (error == E_OK)
    302315                        error = ether_raw_output(output, tmout);
     
    311324                break;
    312325
    313 #endif  /* of #if defined(SUPPORT_INET6) */
     326#endif  /* of #if defined(_IP6_CFG) */
    314327
    315328        default:
     
    398411        ID              tskid;
    399412        uint16_t        proto;
     413        uint8_t         rcount = 0;
    400414
    401415        /* ネットワークインタフェース管理を初期化する。*/
    402416        ifinit();
     417
     418        /* イーサネットネットワークインタフェース管理を初期化する。*/
     419
     420#if defined(_IP4_CFG)
     421
     422        ether_ifnet.in4_ifaddr.addr = IPV4_ADDR_LOCAL;          /* IPv4 アドレス            */
     423        ether_ifnet.in4_ifaddr.mask = IPV4_ADDR_LOCAL_MASK;     /* サブネットマスク             */
     424
     425#endif  /* of #if defined(_IP4_CFG) */
    403426
    404427        /* NIC を初期化する。*/
     
    418441                           tskid, mac2str(NULL, ic->ifaddr.lladdr));
    419442
    420 #if defined(SUPPORT_INET4)
     443#if defined(_IP4_CFG)
    421444
    422445        /* ARP を初期化する。*/
    423446        arp_init();
    424447
    425 #endif  /* of #if defined(SUPPORT_INET4) */
     448#endif  /* of #if defined(_IP4_CFG) */
    426449
    427450        ether_ifnet.ic = ic;
     451
     452        /* 乱数生成を初期化する。*/
     453        net_srand(0);
    428454
    429455        while (true) {
    430456                syscall(wai_sem(ic->semid_rxb_ready));
    431457                if ((input = IF_ETHER_NIC_READ(ic)) != NULL) {
    432                         NET_COUNT_ETHER(net_count_ether.in_octets, input->len);
     458                        NET_COUNT_ETHER(net_count_ether.in_octets,  input->len);
    433459                        NET_COUNT_MIB(if_stats.ifInOctets, input->len + 8);
    434460                        NET_COUNT_ETHER(net_count_ether.in_packets, 1);
     
    436462                        proto = ntohs(eth->type);
    437463
     464                        /* 乱数生成を初期化する。*/
     465                        if (rcount == 0) {
     466
     467#ifdef ETHER_CFG_COLLECT_ADDR
     468                                memcpy(ether_collect_addr.lladdr, eth->shost,
     469                                sizeof(ether_collect_addr.lladdr));
     470#endif  /* of #ifdef ETHER_CFG_COLLECT_ADDR */
     471
     472                                net_srand(0);
     473                                }
     474                        rcount ++;
     475
     476
    438477#ifdef SUPPORT_MIB
    439478                        if ((*eth->dhost & ETHER_MCAST_ADDR) == 0) {
     
    445484#endif  /* of #ifdef SUPPORT_MIB */
    446485
    447 #if defined(SUPPORT_INET4) && defined(ETHER_CFG_ACCEPT_ALL)
     486#if defined(_IP4_CFG) && defined(ETHER_CFG_ACCEPT_ALL)
    448487
    449488                        if ((*eth->dhost & ETHER_MCAST_ADDR) && *eth->dhost != 0xff) {
     
    464503                                }
    465504
    466 #endif  /* of #if defined(SUPPORT_INET4) && defined(ETHER_CFG_ACCEPT_ALL) */
     505#endif  /* of #if defined(_IP4_CFG) && defined(ETHER_CFG_ACCEPT_ALL) */
    467506
    468507                        switch(proto) {
    469508
    470 #if defined(SUPPORT_INET4)
     509#if defined(_IP4_CFG)
    471510
    472511                        case ETHER_TYPE_IP:             /* IP   */
     
    478517                                break;
    479518
    480 #endif  /* of #if defined(SUPPORT_INET4) */
    481 
    482 #if defined(SUPPORT_INET6)
     519#endif  /* of #if defined(_IP4_CFG) */
     520
     521#if defined(_IP6_CFG)
    483522
    484523                        case ETHER_TYPE_IPV6:           /* IPv6 */
     
    486525                                break;
    487526
    488 #endif  /* of #if defined(SUPPORT_INET6) */
     527#endif  /* of #if defined(_IP6_CFG) */
    489528
    490529                        default:
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/ethernet.cfg

    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 *
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/ethernet.h

    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 *
     
    9898#endif  /* of #ifndef IF_ETHER_NIC_HDR_ALIGN */
    9999
     100#if defined(__RX)
     101
     102#pragma pack
     103typedef struct t_ether_header {
     104
     105#if IF_ETHER_NIC_HDR_ALIGN != 0
     106
     107        uint8_t         align[IF_ETHER_NIC_HDR_ALIGN];  /* アライン調整 */
     108
     109#endif  /* of #if IF_ETHER_NIC_HDR_ALIGN != 0 */
     110
     111        uint8_t         dhost[ETHER_ADDR_LEN];
     112        uint8_t         shost[ETHER_ADDR_LEN];
     113        uint16_t        type;
     114        } T_ETHER_HDR;
     115#pragma packoption
     116
     117#elif defined(TOPPERS_S810_CLG3_85)     /* of #if defined(__RX) */
     118
     119typedef struct t_ether_header {
     120
     121#if IF_ETHER_NIC_HDR_ALIGN != 0
     122
     123        uint8_t         align[IF_ETHER_NIC_HDR_ALIGN];  /* アライン調整 */
     124
     125#endif  /* of #if IF_ETHER_NIC_HDR_ALIGN != 0 */
     126
     127        uint8_t         dhost[ETHER_ADDR_LEN];
     128        uint8_t         shost[ETHER_ADDR_LEN];
     129        uint16_t        type;
     130        } T_ETHER_HDR;
     131
     132#else   /* of #if defined(__RX) */
     133
    100134typedef struct t_ether_header {
    101135
     
    111145        } __attribute__((packed, aligned(2)))T_ETHER_HDR;
    112146
     147#endif  /* of #if defined(__RX) */
     148
    113149#define GET_ETHER_HDR(nbuf)             ((T_ETHER_HDR*)((nbuf)->buf))
    114150
     
    140176#define IF_HDR_ALIGN            2                       /* ヘッダのアライン単位                           */
    141177#define IF_MTU                  1500                    /* インタフェースの MTU                         */
     178#define IF_MIN_LEN              ETHER_MIN_LEN           /* インターフェースフレームの最短長             */
    142179
    143180#define IF_OUTPUT(o,d,g,t)      ether_output(o,d,g,t)   /* インタフェースの出力関数                 */
     
    148185                                                        /* ソフトウェア情報から MAC アドレスを取り出す     */
    149186#define IF_GET_IFNET()          ether_get_ifnet()       /* ネットワークインタフェース構造体を返す。         */
    150 #define IF_TYPE                 IFT_ETHER               /* インターフェースの型                           */
     187#define IF_TYPE                 IFT_ETHER               /* インタフェースの型                            */
     188#define IF_SRAND()              ether_srand()   /* インタフェースの乱数初期値                        */
    151189
    152190/* IPv4 関係 */
    153191
    154 #define IF_PROTO_IP             ETHER_TYPE_IP           /* インタフェースの IP プロトコル指定          */
     192#define IF_PROTO_IP             ETHER_TYPE_IP           /* インタフェースの IPv4 プロトコル指定                */
    155193#define IF_PROTO_ARP            ETHER_TYPE_ARP          /* インタフェースの ARP プロトコル指定         */
    156194
     
    160198#define IF_MADDR_INIT           { { { 0, 0, 0, 0, 0, 0 } }, { { 0, 0, 0, 0, 0, 0 } } }
    161199                                                        /* インタフェースのマルチキャストアドレス配列の初期化    */
    162 #define IF_PROTO_IPV6           ETHER_TYPE_IPV6         /* インタフェースの IP プロトコル指定                  */
     200#define IF_PROTO_IPV6           ETHER_TYPE_IPV6         /* インタフェースの IPv6 プロトコル指定                        */
    163201#define IF_ADDMULTI(s)          IF_ETHER_NIC_ADDMULTI(s)
    164202                                                        /* マルチキャストアドレスの登録                               */
     
    215253        T_IF_ADDR               ifaddr;                 /* ネットワークインタフェースのアドレス   */
    216254        uint16_t                timer;                  /* 送信タイムアウト                     */
    217         T_IF_ETHER_NIC_SOFTC    *sc;    /* ディバイス依存のソフトウェア情報     */
     255        T_IF_ETHER_NIC_SOFTC    *sc;                    /* ディバイス依存のソフトウェア情報     */
    218256        ID                      semid_txb_ready;        /* 送信セマフォ                               */
    219257        ID                      semid_rxb_ready;        /* 受信セマフォ                               */
    220258
    221 #ifdef SUPPORT_INET6
     259#ifdef _IP6_CFG
    222260
    223261        T_IF_ADDR       maddrs[MAX_IF_MADDR_CNT];       /* マルチキャストアドレスリスト       */
    224262
    225 #endif  /* of #ifdef SUPPORT_INET6 */
     263#endif  /* of #ifdef _IP6_CFG */
    226264        };
    227265
     
    231269#define IF_FLAG_LINK_UP                 0x10U
    232270
    233 #ifdef SUPPORT_INET6
     271/*
     272 *  変数
     273 */
     274
     275#ifdef ETHER_CFG_COLLECT_ADDR
     276
     277T_ETHER_ADDR ether_collect_addr;
     278
     279#endif  /* of #ifdef ETHER_CFG_COLLECT_ADDR */
     280
     281/*
     282 *  関数
     283 */
     284
     285#ifdef _IP6_CFG
    234286
    235287/* 前方参照 */
     
    243295#endif  /* of #ifndef T_IN6_ADDR_DEFINED */
    244296
    245 /*
    246  *  関数
    247  */
    248 
    249 extern ER ether_in6_resolve_multicast(T_ETHER_ADDR *ifaddr, T_IN6_ADDR *maddr);
    250 
    251 #endif  /* of #ifdef SUPPORT_INET6 */
    252 
    253 /*
    254  *  関数
    255  */
     297extern ER ether_in6_resolve_multicast(T_ETHER_ADDR *ifaddr, const T_IN6_ADDR *maddr);
     298
     299#endif  /* of #ifdef _IP6_CFG */
    256300
    257301extern T_IFNET *ether_get_ifnet (void);
    258 extern ER ether_output (T_NET_BUF *data, void *dst, T_IF_ADDR *gw, TMO tmout);
     302extern ER ether_output (T_NET_BUF *data, const void *dst, T_IF_ADDR *gw, TMO tmout);
    259303extern ER ether_raw_output (T_NET_BUF *data, TMO tmout);
     304extern uint32_t ether_srand (void);
    260305
    261306/** Function prototype for netif status- or link-callback functions. */
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/if.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 *
     
    8686
    8787#include <net/if.h>
     88#include <net/if_ppp.h>
     89#include <net/if_loop.h>
    8890#include <net/ethernet.h>
    8991#include <net/if_arp.h>
    9092#include <net/net.h>
     93#include <net/net_endian.h>
    9194#include <net/net_timer.h>
     95
     96#include <netinet/in.h>
     97#include <netinet/in_var.h>
    9298
    9399#include <netinet6/in6.h>
    94100#include <netinet6/in6_var.h>
    95101
    96 #include <net/if6_var.h>
     102#include <net/if_var.h>
    97103
    98104#ifdef SUPPORT_ETHER
     
    133139        }
    134140
    135 #ifdef SUPPORT_INET6
     141#endif /* of #ifdef SUPPORT_ETHER */
     142
     143#ifdef _IP6_CFG
    136144
    137145/*
     
    142150if_addmulti (T_IFNET *ifp, void *maddr, uint8_t type)
    143151{
     152#if MAX_IF_MADDR_CNT > 0
     153
    144154        T_IF_ADDR       llmaddr;
    145155        ER              error = E_OK;
     
    152162
    153163                /* IPv6 マルチキャストアドレスを登録する。*/
    154                 ifp->in_maddrs[ix] = *(T_IN6_ADDR*)maddr;
     164                ifp->in6_maddrs[ix] = *(T_IN6_ADDR*)maddr;
    155165
    156166                /* インタフェースのアドレスに変換し、登録する。*/
     
    162172
    163173        return IF_ADDMULTI(ifp->ic);
     174
     175#else   /* of #if MAX_IF_MADDR_CNT > 0 */
     176
     177        return E_OK;
     178
     179#endif  /* of #if MAX_IF_MADDR_CNT > 0 */
    164180        }
    165181
    166 #endif  /* of #ifdef SUPPORT_INET6 */
    167 
    168 #endif /* of #ifdef SUPPORT_ETHER */
     182#endif  /* of #ifdef _IP6_CFG */
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/if.h

    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 *
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/if6_var.h

    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 *
     
    6868#define _IF6_VAR_H_
    6969
    70 #ifdef SUPPORT_INET6
    71 
    7270/*
    7371 *  ネットワークインタフェース構造体
    7472 */
    7573
     74#if defined(_IP6_CFG)
     75
     76#if defined(_IP4_CFG)
     77
    7678struct t_ifnet {
    7779        T_IF_SOFTC      *ic;            /* ネットワークインタフェースのソフトウェア情報       */
    78         T_IN6_IFADDR    in_ifaddrs[NUM_IN6_IFADDR_ENTRY];
     80        T_IN6_IFADDR    in6_ifaddrs[NUM_IN6_IFADDR_ENTRY];
    7981                                        /* IPv6 アドレス情報                          */
    80         T_IN6_ADDR      in_maddrs [MAX_IN6_MADDR_CNT];
     82        T_IN6_ADDR      in6_maddrs [MAX_IN6_MADDR_CNT];
    8183                                        /* マルチキャスト IPv6 アドレス                    */
     84        T_IN4_IFADDR    in4_ifaddr;     /* IPv4 アドレス情報                          */
     85        ether_status_callback_fn link_callback;
    8286        uint8_t         flags;          /* フラグ                                  */
    8387        };
     88
     89#else   /* of #if defined(_IP4_CFG) */
     90
     91struct t_ifnet {
     92        T_IF_SOFTC      *ic;            /* ネットワークインタフェースのソフトウェア情報       */
     93        T_IN6_IFADDR    in6_ifaddrs[NUM_IN6_IFADDR_ENTRY];
     94                                        /* IPv6 アドレス情報                          */
     95        T_IN6_ADDR      in6_maddrs [MAX_IN6_MADDR_CNT];
     96                                        /* マルチキャスト IPv6 アドレス                    */
     97        ether_status_callback_fn link_callback;
     98        uint8_t         flags;          /* フラグ                                  */
     99        };
     100
     101#endif  /* of #if defined(_IP4_CFG) */
     102
     103#else   /* of #if defined(_IP6_CFG) */
     104
     105#if defined(_IP4_CFG)
     106
     107struct t_ifnet {
     108        T_IF_SOFTC      *ic;            /* ネットワークインタフェースのソフトウェア情報       */
     109        T_IN4_IFADDR    in4_ifaddr;     /* IPv4 アドレス情報                          */
     110        ether_status_callback_fn link_callback;
     111        uint8_t         flags;          /* フラグ                                  */
     112        };
     113
     114#endif  /* of #if defined(_IP4_CFG) */
     115
     116#endif  /* of #if defined(_IP6_CFG) */
    84117
    85118#ifndef T_IFNET_DEFINED
     
    90123
    91124#endif  /* of #ifndef T_IFNET_DEFINED */
     125
     126#if defined(_IP6_CFG)
    92127
    93128/*
     
    103138extern ER if_addmulti (T_IFNET *ifp, void *maddr, uint8_t type);
    104139
    105 #endif  /* of #ifdef SUPPORT_INET6 */
     140#endif  /* of #if defined(_IP6_CFG) */
    106141
    107142#endif  /* of #ifndef _IF6_VAR_H_ */
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/if_arp.h

    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 *
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/if_llc.h

    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 *
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/if_loop.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 *
     
    9191#include <net/if_loop.h>
    9292#include <net/net.h>
     93#include <net/net_endian.h>
    9394#include <net/net_buf.h>
    9495#include <net/net_count.h>
     
    9899#include <netinet/ip.h>
    99100#include <netinet/ip_var.h>
    100 #include <netinet/ip6.h>
    101 #include <netinet6/ip6_var.h>
    102101#include <netinet/tcp.h>
    103102#include <netinet/udp.h>
    104103
    105104#include <net/if_var.h>
    106 #include <net/if6_var.h>
    107105
    108106#ifdef SUPPORT_LOOP
     
    124122/* ネットワークインタフェース構造体 */
    125123
    126 #if defined(SUPPORT_INET4)
     124#if defined(_IP6_CFG)
     125
     126static T_IFNET loop_ifnet = {
     127        NULL,                   /* ネットワークインタフェースのソフトウェア情報       */
     128        {},                     /* IPv6 アドレス情報                          */
     129        {},                     /* マルチキャスト IPv6 アドレス                    */
     130        };
     131
     132#elif defined(_IP4_CFG) /* of #if defined(_IP6_CFG) */
    127133
    128134static T_IFNET loop_ifnet = {
     
    134140        };
    135141
    136 #endif  /* of #if defined(SUPPORT_INET4) */
    137 
    138 #if defined(SUPPORT_INET6)
    139 
    140 static T_IFNET loop_ifnet = {
    141         NULL,                   /* ネットワークインタフェースのソフトウェア情報       */
    142         {},                     /* IPv6 アドレス情報                          */
    143         {},                     /* マルチキャスト IPv6 アドレス                    */
    144         };
    145 
    146 #endif  /* of #if defined(SUPPORT_INET6) */
     142#endif  /* of #if defined(_IP6_CFG) */
    147143
    148144/*
     
    213209                        NET_COUNT_LOOP(net_count_loop.in_packets, 1);
    214210
    215 #if defined(SUPPORT_INET4)
     211#if defined(_IP4_CFG)
    216212
    217213                        /* IPv4 入力関数を呼び出す */
     
    219215                                ip_input(input);
    220216
    221 #endif  /* of #if defined(SUPPORT_INET4) */
    222 
    223 #if defined(SUPPORT_INET6)
     217#endif  /* of #if defined(_IP4_CFG) */
     218
     219#if defined(_IP6_CFG)
    224220
    225221                        /* IPv6 入力関数を呼び出す */
     
    227223                                ip6_input(input);
    228224
    229 #endif  /* of #if defined(SUPPORT_INET6) */
     225#endif  /* of #if defined(_IP6_CFG) */
    230226
    231227                        }
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/if_loop.cfg

    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 *
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/if_loop.h

    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 *
     
    9191#define IF_SET_PROTO(b,p)                               /* インタフェースのプロトコル設定関数    */
    9292#define IF_GET_IFNET()          loop_get_ifnet()        /* ネットワークインタフェース構造体を返す。         */
     93#define IF_SRAND()              (0)                     /* インターフェースの乱数初期値                       */
    9394
    9495/* IPv4 関係 */
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/if_ppp.h

    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 *
     
    5959
    6060/*
     61 *  PPP アドレスの定義(ダミー)
     62 */
     63
     64typedef struct t_ppp_addr {
     65        uint8_t         lladdr[0];
     66        } T_PPP_ADDR;
     67
     68/*
    6169 *  インタフェースの選択マクロ
    6270 */
    6371
    64 #define T_IF_HDR                T_PPP_HDR       /* インタフェースのヘッダ                  */
    65 #define IF_HDR_ALIGN            2               /* ヘッダのアライン単位                   */
    66 #define IF_MTU                  DEF_PPP_MTU     /* インタフェースの MTU                 */
    67                                                 /* インタフェースの IPv4 アドレス           */
    68 #define IF_PROTO_IP             PPP_IP          /* インタフェースの IP プロトコル指定  */
     72#define T_IF_HDR                T_PPP_HDR               /* インタフェースのヘッダ          */
     73#define T_IF_ADDR               T_PPP_ADDR              /* インタフェースのアドレス                 */
     74#define IF_HDR_ALIGN            2                       /* ヘッダのアライン単位                   */
     75#define IF_MTU                  DEF_PPP_MTU             /* インタフェースの MTU                 */
    6976
    7077#define IF_OUTPUT(o,d,g,t)      ppp_output(o,t)         /* インタフェースの出力関数         */
    7178#define IF_RAW_OUTPUT(o,t)      ppp_output(o,t)         /* インタフェースの出力関数、アドレス解決無し*/
     79#define IF_SET_PROTO(b,p)       (*GET_PPP_HDR(b) = htons(p))
    7280                                                        /* インタフェースのプロトコル設定関数    */
    73 #define IF_SET_PROTO(b,p)       (*GET_PPP_HDR(b) = htons(p))
    74 #define IF_GET_IFNET()          ppp_get_ifnet()         /* ネットワークインタフェース構造体を返す。         */
     81#define IF_SOFTC_TO_IFADDR(s)   ((T_IF_ADDR*)(s)->ifaddr.lladdr)
     82                                                        /* ソフトウェア情報から PPP アドレスを取り出す     */
     83#define IF_GET_IFNET()          ppp_get_ifnet()         /* ネットワークインタフェース構造体を返す。*/
     84#define IF_SRAND()              (0)                     /* インターフェースの乱数初期値                       */
     85
     86/* IPv4 関係 */
     87
     88#define IF_PROTO_IP             PPP_IP                  /* インタフェースの IPv4 プロトコル指定        */
     89
     90/* IPv6 関係 */
     91
     92#define MAX_IF_MADDR_CNT        0                       /* インタフェースのマルチキャストアドレス配列の最大サイズ*/
     93#define IF_PROTO_IPV6           PPP_IPV6                /* インタフェースの IPv6 プロトコル指定        */
     94#define IF_IN6_NEED_CACHE(i)    (false)                 /* 近隣探索キャッシュを使用する。      */
     95#define IF_IN6_IFID(i,a)        get_rand_ifid(i,a)      /* インタフェース識別子の設定                */
     96#define IF_IN6_RESOLVE_MULTICAST(i,m)   {}              /* インタフェースのマルチキャストアドレスへの変換              */
    7597
    7698/*
     
    120142 */
    121143
    122 struct t_if_softc { };
     144struct t_if_softc {
     145        T_IF_ADDR       ifaddr;         /* ネットワークインタフェースのアドレス   */
     146        };
    123147
    124148/*
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/if_types.h

    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 *
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/if_var.h

    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 *
     
    6868#define _IF_VAR_H_
    6969
    70 #if defined(SUPPORT_INET4)
    71 
    72 /*
    73  *  ネットワークインタフェース構造体
    74  */
    75 
    76 struct t_ifnet {
    77         T_IF_SOFTC      *ic;            /* ネットワークインタフェースのソフトウェア情報       */
    78         T_IN4_IFADDR    in_ifaddr;      /* IPv4 アドレス情報                          */
    79         ether_status_callback_fn link_callback;
    80         uint8_t         flags;          /* フラグ                                  */
    81         };
    82 
    83 #ifndef T_IFNET_DEFINED
    84 
    85 typedef struct t_ifnet T_IFNET;
    86 
    87 #define T_IFNET_DEFINED
    88 
    89 #endif  /* of #ifndef T_IFNET_DEFINED */
    90 
    91 #endif  /* of #if defined(SUPPORT_INET4) */
     70#include <net/if6_var.h>
    9271
    9372#ifdef SUPPORT_MIB
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/net.cfg

    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 *
     
    4141
    4242CRE_TSK(NET_TIMER_TASK, {
    43                 TA_NULL,
     43                TA_HLNG,
    4444                0,
    4545                net_timer_task,
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/net.h

    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 *
     
    6969
    7070/*
    71  *  バイトオーダの定義
    72  */
    73 
    74 #define _NET_CFG_LITTLE_ENDIAN  1234
    75 #define _NET_CFG_BIG_ENDIAN     4321
    76 
    77 #ifdef TARGET_KERNEL_ASP
    78 
    79 #if defined(SIL_ENDIAN_LITTLE)
    80 
    81 #define _NET_CFG_BYTE_ORDER     _NET_CFG_LITTLE_ENDIAN
    82 
    83 #elif defined(SIL_ENDIAN_BIG)
    84 
    85 #define _NET_CFG_BYTE_ORDER     _NET_CFG_BIG_ENDIAN
    86 
    87 #else   /* of #if defined(SIL_ENDIAN_BIG) */
    88 
    89 #error "SIL_ENDIAN expected."
    90 
    91 #endif  /* of #if defined(SIL_ENDIAN_BIG) */
    92 
    93 #endif  /* of #ifdef TARGET_KERNEL_ASP */
    94 
    95 #ifdef TARGET_KERNEL_JSP
    96 
    97 #if SIL_ENDIAN == SIL_ENDIAN_LITTLE
    98 
    99 #define _NET_CFG_BYTE_ORDER     _NET_CFG_LITTLE_ENDIAN
    100 
    101 #elif SIL_ENDIAN == SIL_ENDIAN_BIG      /* of #if SIL_ENDIAN == SIL_ENDIAN_LITTLE */
    102 
    103 #define _NET_CFG_BYTE_ORDER     _NET_CFG_BIG_ENDIAN
    104 
    105 #else   /* of #if SIL_ENDIAN == SIL_ENDIAN_LITTLE */
    106 
    107 #error "SIL_ENDIAN expected."
    108 
    109 #endif  /* of #if SIL_ENDIAN == SIL_ENDIAN_LITTLE */
    110 
    111 #endif  /* of #ifdef TARGET_KERNEL_JSP */
    112 
    113 /*
    114  *  バイトオーダ変換の定義
    115  */
    116 
    117 #if _NET_CFG_BYTE_ORDER == _NET_CFG_BIG_ENDIAN
    118 
    119 #define ntohs(n)                ((uint16_t)n)
    120 #define htons(h)                ((uint16_t)h)
    121 #define ntohl(n)                ((uint32_t)n)
    122 #define htonl(h)                ((uint32_t)h)
    123 
    124 #define NTOHS(n)
    125 #define HTONS(h)
    126 #define NTOHL(n)
    127 #define HTONL(h)
    128 
    129 /*
    130  *  注意: IPヘッダ以降は、4 バイト境界にアラインされている事を
    131  *        前提としているが、4 バイト境界でアクセスする
    132  *        プロセッサで、ネットワーク側のデータが、4 バイト境界にアライン
    133  *        されていない場合は、ntoahl、ahtonl、nahcmpl を使用すること。
    134  */
    135 
    136 #define ntoahl(h,n)             memcpy((uint8_t*)&(h),(n),4)
    137 #define ahtonl(n,h)             memcpy((n),(uint8_t*)&(h),4)
    138 
    139 #define nahcmpl(n,h)            memcmp((n),(uint8_t*)&(h),4)
    140 
    141 #elif _NET_CFG_BYTE_ORDER == _NET_CFG_LITTLE_ENDIAN
    142 
    143 #ifndef NET_REV_ENDIAN_HWORD
    144 
    145 #define NET_REV_ENDIAN_HWORD(d) ((uint16_t)((((uint16_t)(d)&0xff)<<8)|(((uint16_t)(d)>>8)&0xff)))
    146 
    147 #endif  /* of #ifndef NET_REV_ENDIAN_HWORD */
    148 
    149 #ifndef NET_REV_ENDIAN_WORD
    150 
    151 #define NET_REV_ENDIAN_WORD(d)  ((uint32_t)((((uint32_t)(d)&0xff)<<24)|(((uint32_t)(d)&0xff00)<<8)| \
    152                                             (((uint32_t)(d)>>8)&0xff00)|(((uint32_t)(d)>>24)&0xff)))
    153 
    154 #endif  /* of #ifndef NET_REV_ENDIAN_WORD */
    155 
    156 #define ntohs(n)                NET_REV_ENDIAN_HWORD(n)
    157 #define htons(h)                NET_REV_ENDIAN_HWORD(h)
    158 #define ntohl(n)                NET_REV_ENDIAN_WORD(n)
    159 #define htonl(h)                NET_REV_ENDIAN_WORD(h)
    160 
    161 #define NTOHS(n)                ((n)=NET_REV_ENDIAN_HWORD(n))
    162 #define HTONS(h)                ((h)=NET_REV_ENDIAN_HWORD(h))
    163 #define NTOHL(n)                ((n)=NET_REV_ENDIAN_WORD(n))
    164 #define HTONL(h)                ((h)=NET_REV_ENDIAN_WORD(h))
    165 
    166 /*
    167  *  注意: IPヘッダ以降は、4 バイト境界にアラインされている事を
    168  *        前提としているが、4 バイト境界でアクセスする
    169  *        プロセッサで、ネットワーク側のデータが、4 バイト境界にアライン
    170  *        されていない場合は、ntoahl、ahtonl、nahcmpl を使用すること。
    171  */
    172 
    173 #ifndef _MACRO_ONLY
    174 
    175 extern void rev_memcpy_word (uint8_t *dst, uint8_t *src);
    176 extern int  rev_memcmp_word (uint8_t *data1, uint8_t *data2);
    177 
    178 #endif  /* of #ifndef _MACRO_ONLY */
    179 
    180 #define ntoahl(h,n)             rev_memcpy_word((uint8_t*)&(h),(n))
    181 #define ahtonl(n,h)             rev_memcpy_word((n),(uint8_t*)&(h))
    182 #define nahcmpl(n,h)            rev_memcmp_word((n),(uint8_t*)&(h))
    183 
    184 #else   /* #if _NET_CFG_BYTE_ORDER == _NET_CFG_BIG_ENDIAN */
    185 
    186 #error "_NET_CFG_BYTE_ORDER expected."
    187 
    188 #endif  /* #if _NET_CFG_BYTE_ORDER == _NET_CFG_BIG_ENDIAN */
    189 
    190 /*
    19171 *  プロトコルを識別するフラグに関する定義
    19272 *
     
    19979#define PROTO_FLG_PPP_LCP       ULONG_C(0x00000008)     /* ppp_lcp.c    */
    20080#define PROTO_FLG_PPP_IPCP      ULONG_C(0x00000010)     /* ppp_ipcp.c   */
    201 #define PROTO_FLG_PPP_CCP       ULONG_C(0x00000020)     /* ppp_ccp.c    */
    202 #define PROTO_FLG_PPP_PAP       ULONG_C(0x00000040)     /* ppp_upap.c   */
    203 #define PROTO_FLG_PPP_MODEM     ULONG_C(0x00000080)     /* ppp_modem.c  */
    204 #define PROTO_FLG_PPP           ULONG_C(0x00000100)     /* ppp.c        */
     81#define PROTO_FLG_PPP_IPV6CP    ULONG_C(0x00000020)     /* ppp_ipv6cp.c */
     82#define PROTO_FLG_PPP_CCP       ULONG_C(0x00000040)     /* ppp_ccp.c    */
     83#define PROTO_FLG_PPP_PAP       ULONG_C(0x00000080)     /* ppp_upap.c   */
     84#define PROTO_FLG_PPP_MODEM     ULONG_C(0x00000100)     /* ppp_modem.c  */
     85#define PROTO_FLG_PPP           ULONG_C(0x00000200)     /* ppp.c        */
    20586
    20687#define PROTO_FLG_ETHER_NIC     ULONG_C(0x00000001)     /* if_??.c      */
     
    21697#define PROTO_FLG_IP4           ULONG_C(0x00010000)     /* ip_*.c       */
    21798#define PROTO_FLG_ICMP4         ULONG_C(0x00040000)     /* ip_icmp.c    */
     99#define PROTO_FLG_IGMP          ULONG_C(0x00080000)     /* ip_igmp.c    */
    218100
    219101#define PROTO_FLG_IP6           ULONG_C(0x00100000)     /* ip6_*.c      */
     
    236118#define AT_INET6                UINT_C(0x20)            /* IPv6 アドレス    */
    237119
     120/*
     121 *  IPv4 UDPオプションの定義
     122 */
     123
     124#define IP_MULTICAST_IF    32
     125#define IP_MULTICAST_TTL   33
     126#define IP_MULTICAST_LOOP  34
     127#define IP_ADD_MEMBERSHIP  35
     128#define IP_DROP_MEMBERSHIP 36
     129#define IP_MSFILTER        41
     130
    238131#if !defined(TOPPERS_MACRO_ONLY) && !defined(_MACRO_ONLY)
    239132
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_asp.cfg

    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 *
     
    5050                TA_TFIFO,
    5151                NUM_MPF_NET_BUF_CSEG,
    52                 sizeof(T_NET_BUF_CSEG)
     52                sizeof(T_NET_BUF_CSEG),
     53                NULL,
     54                NULL
    5355                });
    5456#endif  /* of #if defined(NUM_MPF_NET_BUF_CSEG) && NUM_MPF_NET_BUF_CSEG > 0 */
     
    5759CRE_MPF(MPF_NET_BUF_64, {
    5860                TA_TFIFO, NUM_MPF_NET_BUF_64,
    59                 sizeof(T_NET_BUF_64)
     61                sizeof(T_NET_BUF_64),
     62                NULL,
     63                NULL
    6064                });
    6165#endif  /* of #if defined(NUM_MPF_NET_BUF_64) && NUM_MPF_NET_BUF_64 > 0 */
     
    6569                TA_TFIFO,
    6670                NUM_MPF_NET_BUF_128,
    67                 sizeof(T_NET_BUF_128)
     71                sizeof(T_NET_BUF_128),
     72                NULL,
     73                NULL
    6874                });
    6975#endif  /* of #if defined(NUM_MPF_NET_BUF_128) && NUM_MPF_NET_BUF_128 > 0 */
     
    7379                TA_TFIFO,
    7480                NUM_MPF_NET_BUF_256,
    75                 sizeof(T_NET_BUF_256)
     81                sizeof(T_NET_BUF_256),
     82                NULL,
     83                NULL
    7684                });
    7785#endif  /* of #if defined(NUM_MPF_NET_BUF_256) && NUM_MPF_NET_BUF_256 > 0 */
     
    8189                TA_TFIFO,
    8290                NUM_MPF_NET_BUF_512,
    83                 sizeof(T_NET_BUF_512)
     91                sizeof(T_NET_BUF_512),
     92                NULL,
     93                NULL
    8494                });
    8595#endif  /* of #if defined(NUM_MPF_NET_BUF_512) && NUM_MPF_NET_BUF_512 > 0 */
     
    8999                TA_TFIFO,
    90100                NUM_MPF_NET_BUF_IP_MSS,
    91                 sizeof(T_NET_BUF_IP_MSS)
     101                sizeof(T_NET_BUF_IP_MSS),
     102                NULL,
     103                NULL
    92104                });
    93105#endif  /* of #if defined(NUM_MPF_NET_BUF_IP_MSS) && NUM_MPF_NET_BUF_IP_MSS > 0 */
     
    97109                TA_TFIFO,
    98110                NUM_MPF_NET_BUF_1024,
    99                 sizeof(T_NET_BUF_1024)
     111                sizeof(T_NET_BUF_1024),
     112                NULL,
     113                NULL
    100114                });
    101115#endif  /* of #if defined(NUM_MPF_NET_BUF_1024) && NUM_MPF_NET_BUF_1024 > 0 */
     
    105119                TA_TFIFO,
    106120                NUM_MPF_NET_BUF_IPV6_MMTU,
    107                 sizeof(T_NET_BUF_IPV6_MMTU)
     121                sizeof(T_NET_BUF_IPV6_MMTU),
     122                NULL,
     123                NULL
    108124                });
    109125#endif  /* of #if defined(NUM_MPF_NET_BUF_IPV6_MMTU) && NUM_MPF_NET_BUF_IPV6_MMTU > 0 */
     
    113129                TA_TFIFO,
    114130                NUM_MPF_NET_BUF_IF_PDU,
    115                 sizeof(T_NET_BUF_IF_PDU)
     131                sizeof(T_NET_BUF_IF_PDU),
     132                NULL,
     133                NULL
    116134                });
    117135#endif  /* of #if defined(NUM_MPF_NET_BUF_IF_PDU) && NUM_MPF_NET_BUF_IF_PDU > 0 */
    118136
     137#if defined(NUM_MPF_NET_BUF6_REASSM) && NUM_MPF_NET_BUF6_REASSM > 0
     138
     139CRE_MPF(MPF_NET_BUF_REASSM, {
     140                TA_TFIFO,
     141                NUM_MPF_NET_BUF6_REASSM,
     142                sizeof(T_NET_BUF6_REASSM),
     143                NULL,
     144                NULL
     145                });
     146
     147#else /* of #if defined(NUM_MPF_NET_BUF6_REASSM) && NUM_MPF_NET_BUF6_REASSM > 0 */
     148
    119149#if defined(NUM_MPF_NET_BUF4_REASSM) && NUM_MPF_NET_BUF4_REASSM > 0
     150
    120151CRE_MPF(MPF_NET_BUF_REASSM, {
    121152                TA_TFIFO,
    122153                NUM_MPF_NET_BUF4_REASSM,
    123                 sizeof(T_NET_BUF4_REASSM)
     154                sizeof(T_NET_BUF4_REASSM),
     155                NULL,
     156                NULL
    124157                });
    125158#endif  /* of #if defined(NUM_MPF_NET_BUF4_REASSM) && NUM_MPF_NET_BUF4_REASSM > 0 */
    126159
    127 #if defined(NUM_MPF_NET_BUF6_REASSM) && NUM_MPF_NET_BUF6_REASSM > 0
    128 CRE_MPF(MPF_NET_BUF_REASSM, {
    129                 TA_TFIFO,
    130                 NUM_MPF_NET_BUF6_REASSM,
    131                 sizeof(T_NET_BUF6_REASSM)
    132                 });
    133160#endif  /* of #if defined(NUM_MPF_NET_BUF6_REASSM) && NUM_MPF_NET_BUF6_REASSM > 0 */
    134161
     
    137164                TA_TFIFO,
    138165                NUM_MPF_NET_BUF6_65536,
    139                 sizeof(T_NET_BUF6_65536)
     166                sizeof(T_NET_BUF6_65536),
     167                NULL,
     168                NULL
    140169                });
    141170#endif  /* of #if defined(NUM_MPF_NET_BUF6_65536) && NUM_MPF_NET_BUF6_65536 > 0 */
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_buf.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 *
     
    5757#include <net/ethernet.h>
    5858#include <net/net.h>
     59#include <net/net_endian.h>
    5960#include <net/net_buf.h>
    6061#include <net/net_count.h>
     
    6263#include <netinet/in.h>
    6364#include <netinet/in_var.h>
    64 #include <netinet6/in6.h>
    6565#include <netinet/ip.h>
    6666#include <netinet/ip_var.h>
    67 #include <netinet/ip6.h>
    68 #include <netinet6/ip6_var.h>
    6967#include <netinet/tcp.h>
    70 #include <netinet/tcp_timer.h>
    7168#include <netinet/tcp_var.h>
    7269
     
    9895
    9996#if defined(NUM_MPF_NET_BUF6_REASSM) && NUM_MPF_NET_BUF6_REASSM > 0
     97
    10098        {
    10199                MPF_NET_BUF_REASSM,
     
    109107
    110108                },
    111 #endif  /* of #if defined(NUM_MPF_NET_BUF6_REASSM) && NUM_MPF_NET_BUF6_REASSM > 0 */
     109
     110#else   /* of #if defined(NUM_MPF_NET_BUF6_REASSM) && NUM_MPF_NET_BUF6_REASSM > 0 */
    112111
    113112#if defined(NUM_MPF_NET_BUF4_REASSM) && NUM_MPF_NET_BUF4_REASSM > 0
     113
    114114        {
    115115                MPF_NET_BUF_REASSM,
     
    123123
    124124                },
     125
    125126#endif  /* of #if defined(NUM_MPF_NET_BUF4_REASSM) && NUM_MPF_NET_BUF4_REASSM > 0 */
     127
     128#endif  /* of #if defined(NUM_MPF_NET_BUF6_REASSM) && NUM_MPF_NET_BUF6_REASSM > 0 */
    126129
    127130#if defined(NUM_MPF_NET_BUF_IF_PDU) && NUM_MPF_NET_BUF_IF_PDU > 0
     
    223226#endif  /* of #if defined(NUM_MPF_NET_BUF_128) && NUM_MPF_NET_BUF_128 > 0 */
    224227
    225 #if defined(SUPPORT_INET4)
     228#if defined(_IP4_CFG)
    226229
    227230#if defined(NUM_MPF_NET_BUF_64) && NUM_MPF_NET_BUF_64 > 0
     
    239242#endif  /* of #if defined(NUM_MPF_NET_BUF_64) && NUM_MPF_NET_BUF_64 > 0 */
    240243
    241 #endif  /* of #if defined(SUPPORT_INET4) */
     244#endif  /* of #if defined(_IP4_CFG) */
    242245
    243246#if defined(NUM_MPF_NET_BUF_CSEG) && NUM_MPF_NET_BUF_CSEG > 0
     
    308311                        (*buf)->len   = (uint16_t)minlen;
    309312                        (*buf)->flags = 0;
     313
     314#if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF
    310315                        NET_COUNT_NET_BUF(net_buf_table[ix].allocs, 1);
     316                        net_buf_table[ix].busies ++;
     317#endif
    311318                        return error;
    312319                        }
     
    316323                }
    317324
    318         syslog(LOG_WARNING, "[NET BUF] busy, index=%d, len=%4d.", (uint16_t)req_ix, minlen);
     325        syslog(LOG_WARNING, "[BUF] busy, up   index:%d,%d[%4d], len:%4d.",
     326                            (uint16_t)req_ix, ix, net_buf_table[req_ix].size, minlen);
    319327        *buf = NULL;
    320328        NET_COUNT_NET_BUF(net_buf_table[req_ix].errors, 1);
     
    346354                        (*buf)->len   = net_buf_table[ix].size;
    347355                        (*buf)->flags = 0;
     356
     357#if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF
    348358                        NET_COUNT_NET_BUF(net_buf_table[ix].allocs, 1);
     359                        net_buf_table[ix].busies ++;
     360#endif
    349361                        return error;
    350362                        }
     
    354366                }
    355367
    356         syslog(LOG_WARNING, "[NET BUF] busy, index=%d, len=%4d.", (uint16_t)req_ix, maxlen);
     368        syslog(LOG_WARNING, "[BUF] busy, down index:%d,%d[%4d], len:%4d.",
     369                            (uint16_t)req_ix, ix, net_buf_table[req_ix].size, minlen);
    357370        *buf = NULL;
    358371        NET_COUNT_NET_BUF(net_buf_table[req_ix].errors, 1);
     
    380393                }
    381394
     395#if defined(SUPPORT_TCP) && defined(TCP_CFG_SWBUF_CSAVE)
     396
    382397        /* TCP で予約したネットワークバッファを取り出す。*/
    383398        if ((nbatr & NBA_RESERVE_TCP) != 0) {
     
    386401                        }
    387402                }
     403
     404#endif  /* of #if defined(SUPPORT_TCP) && defined(TCP_CFG_SWBUF_CSAVE) */
    388405
    389406        if ((nbatr & NBA_SEARCH_DESCENT) != 0)
     
    423440        else {
    424441
     442#if defined(SUPPORT_TCP) && defined(TCP_CFG_SWBUF_CSAVE)
     443
    425444                /* TCP で、ネットワークバッファを予約する。*/
    426445                if (TCP_PUSH_RES_NBUF(buf) == NULL)
    427446                        return E_OK;
    428447
     448#endif  /* of #if defined(SUPPORT_TCP) && defined(TCP_CFG_SWBUF_CSAVE) */
     449
    429450                /* 固定メモリプールに返す。*/
    430                 if ((error = rel_mpf((ID)net_buf_table[buf->idix].index, buf)) != E_OK)
     451
     452#if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF
     453                net_buf_table[buf->idix].busies --;
     454#endif
     455                if ((error = rel_mpf((ID)net_buf_table[buf->idix].index, buf)) != E_OK) {
    431456                        syslog(LOG_WARNING, "[NET BUF] %s, ID=%d.", itron_strerror(error), buf->idix);
     457                        }
    432458                }
    433459        return error;
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_buf.h

    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        uint8_t         halign[4 - IF_HDR_ALIGN];
    6262#endif
    63         uint8_t         buf[4]; /* バッファ本体               */
     63        uint8_t         buf[IF_MIN_LEN];        /* バッファ本体 */
    6464        };
    6565
     
    7171
    7272#endif  /* of #ifndef T_NET_BUF_DEFINED */
     73
    7374/*
    7475 *  64 オクテット
     
    159160 *  ネットワークインタフェースの最大 PDU サイズ
    160161 */
     162
     163#if defined(IF_PDU_SIZE)
    161164
    162165typedef struct t_net_buf_if_pdu {
     
    177180        } T_NET_BUF_IF_PDU;
    178181
     182#endif  /* of #if defined(IF_PDU_SIZE) */
     183
    179184/*
    180185 *  ネットワークバッファ表
     
    189194
    190195        ulong_t         prepares;
     196        ulong_t         busies;
    191197        ulong_t         requests;
    192198        ulong_t         allocs;
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_count.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 *
     
    120120
    121121#include <net/net.h>
     122#include <net/net_endian.h>
    122123#include <net/net_count.h>
    123124
     
    142143#endif  /* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_LCP */
    143144
     145#if NET_COUNT_ENABLE & PROTO_FLG_PPP_IPV6CP
     146
     147T_NET_COUNT_VAL net_count_ppp_ipv6cp_in_octets;
     148T_NET_COUNT_VAL net_count_ppp_ipv6cp_in_packets;
     149
     150#endif  /* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_IPV6CP */
     151
    144152#if NET_COUNT_ENABLE & PROTO_FLG_PPP_IPCP
    145153
     
    190198#endif  /* of #ifdef SUPPORT_ETHER */
    191199
    192 #if defined(SUPPORT_INET4)
     200#if defined(_IP4_CFG)
    193201
    194202#if NET_COUNT_ENABLE & PROTO_FLG_ARP
     
    210218#endif  /* of #if NET_COUNT_ENABLE & PROTO_FLG_ICMP4 */
    211219
    212 #endif  /* of #if defined(SUPPORT_INET4) */
    213 
    214 #if defined(SUPPORT_INET6)
     220#if NET_COUNT_ENABLE & PROTO_FLG_IGMP
     221
     222T_NET_COUNT     net_count_igmp;
     223
     224#endif  /* of #if NET_COUNT_ENABLE & PROTO_FLG_ICMP4 */
     225
     226#endif  /* of #if defined(_IP4_CFG) */
     227
     228#if defined(_IP6_CFG)
    215229
    216230#if NET_COUNT_ENABLE & PROTO_FLG_IP6
     
    232246#endif  /* of #if NET_COUNT_ENABLE & PROTO_FLG_ND6 */
    233247
    234 #endif  /* of #if defined(SUPPORT_INET6) */
     248#endif  /* of #if defined(_IP6_CFG) */
    235249
    236250#ifdef SUPPORT_TCP
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_count.h

    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 *
     
    155155#endif  /* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_LCP */
    156156
     157/* PPP IPV6CP */
     158
     159#if NET_COUNT_ENABLE & PROTO_FLG_PPP_IPV6CP
     160
     161#define NET_COUNT_PPP_IPV6CP(v,c)       ((v)+=(c))
     162
     163#ifndef _MACRO_ONLY
     164
     165extern T_NET_COUNT_VAL net_count_ppp_ipv6cp_in_octets;
     166extern T_NET_COUNT_VAL net_count_ppp_ipv6cp_in_packets;
     167
     168#endif  /* of #ifndef _MACRO_ONLY */
     169
     170#else   /* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_IPV6CP */
     171
     172#define NET_COUNT_PPP_IPV6CP(v,c)
     173
     174#endif  /* of #if NET_COUNT_ENABLE & PROTO_FLG_PPP_IPV6CP */
     175
    157176/* PPP IPCP */
    158177
     
    302321#endif  /* of #if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF */
    303322
    304 #if defined(SUPPORT_INET4)
     323#if defined(_IP4_CFG)
    305324
    306325/* ARP */
     
    380399#endif  /* of #if NET_COUNT_ENABLE & PROTO_FLG_ICMP4 */
    381400
    382 #endif  /* of #if defined(SUPPORT_INET4) */
    383 
    384 #if defined(SUPPORT_INET6)
     401/* IGMP */
     402
     403#if NET_COUNT_ENABLE & PROTO_FLG_IGMP
     404
     405#define NET_COUNT_IGMP(v,c)     ((v)+=(c))
     406
     407#ifndef _MACRO_ONLY
     408
     409extern T_NET_COUNT      net_count_igmp;
     410
     411#endif  /* of #ifndef _MACRO_ONLY */
     412
     413#else   /* of #if NET_COUNT_ENABLE & PROTO_FLG_IGMP */
     414
     415#define NET_COUNT_IGMP(v,c)
     416
     417#endif  /* of #if NET_COUNT_ENABLE & PROTO_FLG_IGMP */
     418
     419#endif  /* of #if defined(_IP4_CFG) */
     420
     421#if defined(_IP6_CFG)
    385422
    386423/* IPv6 */
     
    472509#endif  /* of #if NET_COUNT_ENABLE & PROTO_FLG_ND6 */
    473510
    474 #endif  /* of #if defined(SUPPORT_INET6) */
     511#endif  /* of #if defined(_IP6_CFG) */
    475512
    476513#ifdef SUPPORT_TCP
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_jsp.cfg

    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 *
     
    127127#endif  /* of #if defined(NUM_MPF_NET_BUF_IF_PDU) && NUM_MPF_NET_BUF_IF_PDU > 0 */
    128128
     129#if defined(NUM_MPF_NET_BUF6_REASSM) && NUM_MPF_NET_BUF6_REASSM > 0
     130
     131CRE_MPF(MPF_NET_BUF_REASSM, {
     132                TA_TFIFO,
     133                NUM_MPF_NET_BUF6_REASSM,
     134                sizeof(T_NET_BUF6_REASSM),
     135                NULL
     136                });
     137
     138#else   /* of #if defined(NUM_MPF_NET_BUF6_REASSM) && NUM_MPF_NET_BUF6_REASSM > 0 */
     139
    129140#if defined(NUM_MPF_NET_BUF4_REASSM) && NUM_MPF_NET_BUF4_REASSM > 0
     141
    130142CRE_MPF(MPF_NET_BUF_REASSM, {
    131143                TA_TFIFO,
     
    134146                NULL
    135147                });
     148
    136149#endif  /* of #if defined(NUM_MPF_NET_BUF4_REASSM) && NUM_MPF_NET_BUF4_REASSM > 0 */
    137150
    138 #if defined(NUM_MPF_NET_BUF6_REASSM) && NUM_MPF_NET_BUF6_REASSM > 0
    139 CRE_MPF(MPF_NET_BUF_REASSM, {
    140                 TA_TFIFO,
    141                 NUM_MPF_NET_BUF6_REASSM,
    142                 sizeof(T_NET_BUF6_REASSM),
    143                 NULL
    144                 });
    145151#endif  /* of #if defined(NUM_MPF_NET_BUF6_REASSM) && NUM_MPF_NET_BUF6_REASSM > 0 */
    146152
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_rename.h

    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 *
     
    4141/* net/ethernet.c */
    4242
     43#define ether_input_task        _tinet_ether_input_task
     44#define ether_get_ifnet         _tinet_ether_get_ifnet
     45#define ether_in6_resolve_multicast     \
     46                                _tinet_ether_in6_resolve_multicast
     47#define ether_srand             _tinet_ether_srand
     48#define ether_output            _tinet_ether_output
     49#define ether_raw_output        _tinet_ether_raw_output
     50#define ether_output_task       _tinet_ether_output_task
     51
    4352#define ether_broad_cast_addr   _tinet_ether_broad_cast_addr
    4453#define ether_ipv4_addr_local   _tinet_ether_ipv4_addr_local
     
    4655                                _tinet_ether_ipv4_addr_local_mask
    4756
    48 #define ether_raw_output        _tinet_ether_raw_output
    49 #define ether_output            _tinet_ether_output
    5057#define ether_in6_ifaddr        _tinet_ether_in6_ifaddr
    5158#define ether_in6_ifaddr_list   _tinet_ether_in6_ifaddr_list
    52 #define ether_in6_resolve_multicast     \
    53                                 _tinet_ether_in6_resolve_multicast
    54 #define ether_input_task        _tinet_ether_input_task
    55 #define ether_get_ifnet         _tinet_ether_get_ifnet
    56 #define ether_output_task       _tinet_ether_output_task
    5759
    5860/* net/if.c */
     
    9395/* route_cfg.c */
    9496
    95 #define routing_tbl             _tinet_routing_tbl
     97#define routing6_tbl            _tinet_routing6_tbl
     98#define routing4_tbl            _tinet_routing4_tbl
    9699
    97100#ifdef SUPPORT_PPP
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_subr.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 *
     
    8888#include <tinet_config.h>
    8989
     90#include <net/if.h>
     91#include <net/if_loop.h>
     92#include <net/if_ppp.h>
     93#include <net/ethernet.h>
    9094#include <net/net.h>
     95#include <net/net_endian.h>
    9196
    9297/*
     
    103108net_rand (void)
    104109{
    105         next = (next * 1103515245 + 12345) % (ULONG_C(0x7fffffff) + 1);
     110        next = (next * 99991 + 12345) & ULONG_C(0x7fffffff);
    106111        return next;
    107112        }
     
    114119net_srand (uint32_t seed)
    115120{
    116         next += seed;
     121        SYSTIM now;
     122
     123        syscall(get_tim(&now));
     124        next += now + seed + IF_SRAND();
    117125        }
    118126
     
    186194
    187195/*
    188  *  rev_memcpy_word -- 反転メモリコピー(4 バイト)
     196 *  rev_memcpy_hword -- 反転メモリコピー(2 バイト)
    189197 *
    190198 *    バイト単位にアクセスする事により、
     
    193201
    194202void
    195 rev_memcpy_word (uint8_t *dst, uint8_t *src)
    196 {
    197         *(dst    ) = *(src + 3);
    198         *(dst + 1) = *(src + 2);
    199         *(dst + 2) = *(src + 1);
    200         *(dst + 3) = *(src    );
    201         }
    202 
    203 /*
    204  *  rev_memcmp_word -- 反転メモリ比較(4 バイト)
     203rev_memcpy_hword (void *dst, void *src)
     204{
     205        *((uint8_t*)dst    ) = *((uint8_t*)src + 1);
     206        *((uint8_t*)dst + 1) = *((uint8_t*)src    );
     207        }
     208
     209/*
     210 *  rev_memcpy_word -- 反転メモリコピー(4 バイト)
    205211 *
    206212 *    バイト単位にアクセスする事により、
     
    208214 */
    209215
     216void
     217rev_memcpy_word (void *dst, void *src)
     218{
     219        *((uint8_t*)dst    ) = *((uint8_t*)src + 3);
     220        *((uint8_t*)dst + 1) = *((uint8_t*)src + 2);
     221        *((uint8_t*)dst + 2) = *((uint8_t*)src + 1);
     222        *((uint8_t*)dst + 3) = *((uint8_t*)src    );
     223        }
     224
     225/*
     226 *  rev_memcmp_word -- 反転メモリ比較(4 バイト)
     227 *
     228 *    バイト単位にアクセスする事により、
     229 *    境界へのアラインの問題を解決する。
     230 */
     231
    210232int_t
    211 rev_memcmp_word (uint8_t *data1, uint8_t *data2)
     233rev_memcmp_word (void *data1, void *data2)
    212234{
    213235        int_t   ix, diff;
    214236
    215         for (ix = 4; ix -- > 0; ) {
    216                 diff = *(data1 + ix) -  *(data2 + (3 - ix));
     237        for (ix = sizeof(uint32_t); ix -- > 0; ) {
     238                diff = *((uint8_t*)data1 + ix) -  *((uint8_t*)data2 + (3 - ix));
    217239                if (diff != 0)
    218240                        return diff;
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_timer.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 *
     
    9090#include <net/ethernet.h>
    9191#include <net/net.h>
     92#include <net/net_endian.h>
    9293#include <net/net_buf.h>
    9394#include <net/net_timer.h>
    9495
    9596#include <netinet/in.h>
     97#include <netinet/in_var.h>
    9698#include <netinet/ip.h>
    9799#include <netinet/ip_var.h>
    98 #include <netinet/ip6.h>
    99 #include <netinet6/ip6_var.h>
    100 #include <netinet/tcp_timer.h>
    101100
    102101/*
     
    162161"\n"
    163162"TINET %d.%d.%d (" __DATE__ ", " __TIME__ ")\n"
    164 "Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering\n"
     163"Copyright (C) 2001-2012 by Dep. of Computer Science and Engineering\n"
    165164"                    Tomakomai National College of Technology, JAPAN\n";
    166165
     
    181180
    182181        /* IP を初期化する。*/
    183         IP_INIT();
     182
     183#if defined(_IP6_CFG)
     184        ip6_init();
     185#endif
     186
     187#if defined(_IP4_CFG)
     188        ip_init();
     189#endif
    184190
    185191#ifdef SUPPORT_TCP
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_timer.h

    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 *
     
    7474 */
    7575
    76 #define SYSTIM_HZ               ULONG_C(1000*1000)      /* [ms]                                 */
     76#define SYSTIM_HZ               ULONG_C(1000000)        /* [us]                                 */
    7777
    7878/*
     
    8080 */
    8181
    82 #define NET_TIMER_CYCLE         ULONG_C(100)    /* [ms]、fast timeout 使用時の動作周期   */
     82#define NET_TIMER_CYCLE         ULONG_C(100000) /* [us]、fast timeout 使用時の動作周期   */
    8383                                                /* タイマの周波数                      */
    8484#define NET_TIMER_HZ            (SYSTIM_HZ/NET_TIMER_CYCLE)
    8585
    86 #ifdef SUPPORT_INET6
     86#ifdef _IP6_CFG
    8787#define NUM_NET_CALLOUT         12              /* タイムアウト呼出し数、10 以上     */
    8888#else
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/net_var.h

    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 *
  • 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                        }
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp.cfg

    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 *
     
    5656        });
    5757
    58 CRE_DTQ(DTQ_PPP_OUTPUT,  { TA_TFIFO, NUM_DTQ_PPP_OUTPUT,  NULL });
     58CRE_DTQ(DTQ_PPP_OUTPUT,   { TA_TFIFO, NUM_DTQ_PPP_OUTPUT,  NULL });
    5959
    60 CRE_SEM(SEM_MODEM_READY, { TA_TPRI, 0, 1 });
    61 CRE_SEM(SEM_IPCP_READY,  { TA_TPRI, 0, 1 });
     60CRE_SEM(SEM_MODEM_READY,  { TA_TPRI, 0, 1 });
     61
     62#if defined(_IP6_CFG)
     63CRE_SEM(SEM_IPV6CP_READY, { TA_TPRI, 0, 1 });
     64#endif
     65
     66#if defined(_IP4_CFG)
     67CRE_SEM(SEM_IPCP_READY,   { TA_TPRI, 0, 1 });
     68#endif
    6269
    6370#ifdef PPP_IDLE_TIMEOUT
    64 CRE_SEM(SEM_IDLE_TIMEOUT,{ TA_TPRI, 1, 1 });
     71CRE_SEM(SEM_IDLE_TIMEOUT, { TA_TPRI, 1, 1 });
    6572#endif  /* of #ifdef PPP_IDLE_TIMEOUT */
    6673
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp.h

    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 *
     
    7474 */
    7575
    76 #define PPP_IP          UINT_C(0x0021)          /* IP   */
     76#define PPP_IP          UINT_C(0x0021)          /* IPv4         */
     77#define PPP_IPV6        UINT_C(0x0057)          /* IPv6         */
    7778
    78 #define PPP_IPCP        UINT_C(0x8021)          /* IPCP */
    79 #define PPP_CCP         UINT_C(0x80fd)          /* CCP */
     79#define PPP_IPCP        UINT_C(0x8021)          /* IPCP         */
     80#define PPP_IPV6CP      UINT_C(0x8057)          /* IPV6CP       */
     81#define PPP_CCP         UINT_C(0x80fd)          /* CCP          */
    8082
    81 #define PPP_LCP         UINT_C(0xc021)          /* LCP  */
    82 #define PPP_PAP         UINT_C(0xc023)          /* PAP  */
    83 #define PPP_LQR         UINT_C(0xc025)          /* LQR  */
    84 #define PPP_CHAP        UINT_C(0xc223)          /* CHAP */
     83#define PPP_LCP         UINT_C(0xc021)          /* LCP          */
     84#define PPP_PAP         UINT_C(0xc023)          /* PAP          */
     85#define PPP_LQR         UINT_C(0xc025)          /* LQR          */
     86#define PPP_CHAP        UINT_C(0xc223)          /* CHAP         */
    8587
    8688#define GET_PPP_HDR(nbuf)       ((T_PPP_HDR*)((nbuf)->buf))
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_auth.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 *
     
    100100#include <net/if_ppp.h>
    101101#include <net/net.h>
     102#include <net/net_endian.h>
    102103#include <net/net_buf.h>
    103104#include <net/ppp.h>
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_auth.h

    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 *
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_ccp.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 *
     
    9393#include <net/if_ppp.h>
    9494#include <net/net_buf.h>
    95 #include <net/net_debug.h>
    9695#include <net/net_count.h>
    9796#include <net/ppp.h>
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_ccp.h

    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 *
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_fsm.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 *
     
    8686#include <net/if_ppp.h>
    8787#include <net/net.h>
     88#include <net/net_endian.h>
    8889#include <net/net_timer.h>
    8990#include <net/net_buf.h>
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_fsm.h

    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 *
     
    9696        int8_t          retrans;        /* Configure-Request または、               */
    9797                                        /* Terminate-Request の再送回数              */
    98         } __attribute__((packed, aligned(2)))T_PPP_FSM;
     98        } T_PPP_FSM;
    9999
    100100#define T_PPP_FSM_DEFINED
     
    124124                                        /* 不明な CP を受信したときの処理    */
    125125        bool_t  (*extcode)(T_PPP_FSM *, uint8_t, uint8_t, T_NET_BUF *);
    126         } __attribute__((packed, aligned(2)))T_PPP_FSM_CALLBACKS;
     126        } T_PPP_FSM_CALLBACKS;
    127127
    128128/*
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_hdlc.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 *
     
    6565#include <net/if_ppp.h>
    6666#include <net/net.h>
     67#include <net/net_endian.h>
    6768#include <net/net_buf.h>
    6869#include <net/net_count.h>
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_hdlc.h

    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 *
  • 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
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_ipcp.h

    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 *
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_lcp.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 *
     
    8686#include <net/if_ppp.h>
    8787#include <net/net.h>
     88#include <net/net_endian.h>
    8889#include <net/net_var.h>
    8990#include <net/net_buf.h>
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_lcp.h

    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 *
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_modem.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 *
     
    4747#include <net/if_ppp.h>
    4848#include <net/net.h>
     49#include <net/net_endian.h>
    4950#include <net/net_buf.h>
    5051#include <net/net_count.h>
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_modem.h

    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 *
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_upap.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 *
     
    8787#include <net/if_ppp.h>
    8888#include <net/net.h>
     89#include <net/net_endian.h>
    8990#include <net/net_buf.h>
    9091#include <net/net_timer.h>
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_upap.h

    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 *
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/ppp_var.h

    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 *
  • EcnlProtoTool/trunk/asp3_dcre/tinet/net/route.h

    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 *
Note: See TracChangeset for help on using the changeset viewer.