Ignore:
Timestamp:
Feb 1, 2019, 9:57:09 PM (5 years ago)
Author:
coas-nagasima
Message:

TINETとSocket APIなどを更新

Location:
asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet
Files:
27 edited

Legend:

Unmodified
Added
Removed
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/Makefile.tinet

    r337 r364  
    9393               in_subr.o route_cfg.o
    9494TINET_CFG_COBJS := $(TINET_CFG_COBJS) tinet_cfg.o
     95TINET_CFG2_OUT_SRCS := $(TINET_CFG2_OUT_SRCS) tinet_cfg.h tinet_cfg.c
    9596
    9697#  IPv6
     
    328329
    329330        CFG_COBJS := $(CFG_COBJS) $(TINET_CFG_COBJS)
     331        CFG2_OUT_SRCS := $(CFG2_OUT_SRCS) $(TINET_CFG2_OUT_SRCS)
    330332
    331333        CLEAN_FILES := $(CLEAN_FILES) $(TINET_CFG_OUT) $(MAKE_TINET_LIB)
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/net/ethernet.h

    r359 r364  
    9898#endif  /* of #ifndef IF_ETHER_NIC_HDR_ALIGN */
    9999
    100 #if defined(__RX) || defined(_MSC_VER)
    101100#if defined(__RX)
    102101#pragma pack
    103 #else
     102#elif defined(_MSC_VER)
    104103#pragma pack(push, 1)
    105104#endif
     105
     106#if defined(__RX) || defined(_MSC_VER)
     107
    106108typedef struct t_ether_header {
    107109
     
    116118        uint16_t        type;
    117119        } T_ETHER_HDR;
    118 #if defined(__RX)
    119 #pragma packoption
    120 #else
    121 #pragma pack(pop)
    122 #endif
    123120
    124121#elif defined(TOPPERS_S810_CLG3_85)     /* of #if defined(__RX) */
     
    166163        uint8_t         lladdr[ETHER_ADDR_LEN];
    167164        } __attribute__((packed, aligned(2))) T_ETHER_ADDR;
     165
     166#if defined(__RX)
     167#pragma packoption
     168#elif defined(_MSC_VER)
     169#pragma pack(pop)
     170#endif
    168171
    169172/*
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/net/net_asp.cfg

    r337 r364  
    4141
    4242INCLUDE("net/net.cfg");
     43
     44#ifndef NOUSE_MPF_NET_BUF
    4345
    4446/*
     
    169171                });
    170172#endif  /* of #if defined(NUM_MPF_NET_BUF6_65536) && NUM_MPF_NET_BUF6_65536 > 0 */
     173
     174#endif
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/net/net_buf.c

    r337 r364  
    6868#include <netinet/tcp_var.h>
    6969
     70#ifndef NOUSE_MPF_NET_BUF
     71
    7072/*
    7173 *  関数
     
    226228#endif  /* of #if defined(NUM_MPF_NET_BUF_128) && NUM_MPF_NET_BUF_128 > 0 */
    227229
    228 #if defined(_IP4_CFG)
     230#if defined(_IP6_CFG)
     231
     232#if defined(NUM_MPF_NET_BUF_CSEG) && NUM_MPF_NET_BUF_CSEG > 0
     233        {
     234                MPF_NET_BUF_CSEG,
     235                IF_HDR_SIZE + IP_HDR_SIZE + TCP_HDR_SIZE,
     236
     237#if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF
     238
     239                NUM_MPF_NET_BUF_CSEG,
     240
     241#endif  /* of #if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF */
     242
     243                },
     244#endif  /* of #if defined(NUM_MPF_NET_BUF_CSEG) && NUM_MPF_NET_BUF_CSEG > 0 */
     245
     246#endif  /* of #if defined(_IP6_CFG) */
    229247
    230248#if defined(NUM_MPF_NET_BUF_64) && NUM_MPF_NET_BUF_64 > 0
     
    242260#endif  /* of #if defined(NUM_MPF_NET_BUF_64) && NUM_MPF_NET_BUF_64 > 0 */
    243261
    244 #endif  /* of #if defined(_IP4_CFG) */
     262#if defined(_IP4_CFG) && !defined(_IP6_CFG)
    245263
    246264#if defined(NUM_MPF_NET_BUF_CSEG) && NUM_MPF_NET_BUF_CSEG > 0
     
    257275                },
    258276#endif  /* of #if defined(NUM_MPF_NET_BUF_CSEG) && NUM_MPF_NET_BUF_CSEG > 0 */
     277
     278#endif  /* of #if defined(_IP4_CFG) && !defined(_IP6_CFG) */
    259279
    260280        };
     
    307327
    308328        while (1) {
    309                 if ((error = tget_mpf((ID)net_buf_table[ix].index, (void*)buf, ix == 0 ? tmout : TMO_POL)) == E_OK) {
     329                if ((error = tget_mpf((ID)net_buf_table[ix].index, (void **)buf, ix == 0 ? tmout : TMO_POL)) == E_OK) {
    310330                        (*buf)->idix  = (uint8_t)ix;
    311331                        (*buf)->len   = (uint16_t)minlen;
     
    318338                        return error;
    319339                        }
    320                 else if (ix == 0 || net_buf_table[ix].size > maxlen)
     340                ix --;
     341                if (ix < 0 || net_buf_table[ix].size > maxlen)
    321342                        break;
    322                 ix --;
    323343                }
    324344
     
    349369
    350370        while (1) {
    351                 if ((error = tget_mpf((ID)net_buf_table[ix].index, (void*)buf,
     371                if ((error = tget_mpf((ID)net_buf_table[ix].index, (void **)buf,
    352372                                      ix == sizeof(net_buf_table) / sizeof(T_NET_BUF_ENTRY) - 1 ? tmout : TMO_POL)) == E_OK) {
    353373                        (*buf)->idix  = (uint8_t)ix;
    354374                        (*buf)->len   = net_buf_table[ix].size;
    355375                        (*buf)->flags = 0;
     376#ifdef IF_ETHER_MULTI_NIC
     377                        (*buf)->conn_pos = 0;
     378#endif
    356379
    357380#if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF
     
    450473                /* 固定メモリプールに返す。*/
    451474
    452 #if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF
    453                 net_buf_table[buf->idix].busies --;
     475                int idix = buf->idix;
     476#if NET_COUNT_ENABLE & PROTO_FLG_NET_BUF
     477                net_buf_table[idix].busies --;
    454478#endif
    455                 if ((error = rel_mpf((ID)net_buf_table[buf->idix].index, buf)) != E_OK) {
    456                         syslog(LOG_WARNING, "[NET BUF] %s, ID=%d.", itron_strerror(error), buf->idix);
     479                if ((error = rel_mpf((ID)net_buf_table[idix].index, buf)) != E_OK) {
     480                        syslog(LOG_WARNING, "[NET BUF] %s, ID=%d.", itron_strerror(error), idix);
    457481                        }
    458482                }
     
    505529        return (uint_t)net_buf_table[0].size;
    506530        }
     531
     532#else
     533#include <stdlib.h>
     534
     535/*
     536 *  tget_net_buf_ex -- ネットワークバッファを獲得する(拡張機能)。
     537 */
     538
     539ER
     540tget_net_buf_ex (T_NET_BUF **buf, uint_t minlen, uint_t maxlen, ATR nbatr, TMO tmout)
     541{
     542        uint_t len = (minlen > maxlen) ? minlen : maxlen;
     543        *buf = (T_NET_BUF *)malloc(sizeof(T_NET_BUF) - sizeof(((T_NET_BUF *)0)->buf) + len);
     544        if (*buf == NULL)
     545                return E_NOMEM;
     546
     547        (*buf)->idix = 0;
     548        (*buf)->len = (uint16_t)len;
     549        (*buf)->flags = 0;
     550
     551        return E_OK;
     552        }
     553
     554/*
     555 *  tget_net_buf -- ネットワークバッファを獲得する(互換)。
     556 */
     557
     558ER
     559tget_net_buf (T_NET_BUF **buf, uint_t len, TMO tmout)
     560{
     561        return tget_net_buf_ex(buf, len, len, NBA_SEARCH_ASCENT, tmout);
     562        }
     563
     564
     565/*
     566 * rel_net_buf -- ネットワークバッファを返却する。
     567 */
     568
     569ER
     570rel_net_buf (T_NET_BUF *buf)
     571{
     572        free(buf);
     573
     574        return E_OK;
     575        }
     576
     577
     578/*
     579 * net_buf_max_siz -- ネットワークバッファの最大サイズを返す。
     580 */
     581
     582uint_t
     583net_buf_max_siz (void)
     584{
     585        return (uint_t)IF_PDU_SIZE;
     586        }
     587
     588#endif
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/net/net_rename.h

    r337 r364  
    7171#define tget_net_buf_ex         _tinet_tget_net_buf_ex
    7272#define tget_net_buf            _tinet_tget_net_buf
    73 #define rel_net_buf             _tinet_rel_net_buf
    74 #define rus_net_buf             _tinet_rus_net_buf
    75 #define net_buf_siz             _tinet_net_buf_siz
     73#define rel_net_buf                     _tinet_rel_net_buf
     74#define rus_net_buf                     _tinet_rus_net_buf
     75#define net_buf_siz                     _tinet_net_buf_siz
    7676#define net_buf_max_siz         _tinet_net_buf_max_siz
    7777#define nbuf_get_tbl            _tinet_nbuf_get_tbl
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netapp/Makefile.netapp

    r337 r364  
    183183                NETAPP_COBJS := $(NETAPP_COBJS) udp6_echo_cli.o
    184184                NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIRS)/udp6_echo_cli.cfg
    185        
     185
    186186                ifeq ($(SUPPORT_INET4),true)
    187187                        ifeq ($(USE_UDP4_ECHO_CLI),true)
     
    191191                        endif
    192192                endif
    193         else
     193                else
    194194                ifeq ($(SUPPORT_INET4),true)
    195195                        SUPPORT_UDP = true
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netapp/dbg_cons.c

    r337 r364  
    666666                    "IX Expire State      MAC Address       IP Address\n");
    667667
    668         /* expire の単位は [ms]。*/
     668        /* expire の単位は [us]。*/
    669669        get_tim(&now);
    670670        cache = nd6_get_cache();
     
    705705                    "IX Expire MAC Address       IP Address\n");
    706706
    707         /* expire の単位は [ms]。*/
     707        /* expire の単位は [us]。*/
    708708        cache = arp_get_cache();
    709709        for (ix = 0; ix < NUM_ARP_ENTRY; ix ++) {
     
    753753        WAI_NET_CONS_PRINTF();
    754754        get_tim(&now);
    755         cons_printf(portid, "ネットワーク統計情報\t経過時間[ms]\t%lu\t", now);
     755        cons_printf(portid, "ネットワーク統計情報\t経過時間[us]\t%lu\t", now);
    756756        if (now > (1000 * 3600 * 24))
    757757                cons_printf(portid, "%3lu日 %2lu時間 %2lu分 %2lu秒\n",
     
    938938                }
    939939
    940         cons_printf(portid, "\nネットワーク統計情報\t経過時間[ms]\t%lu\t", now);
     940        cons_printf(portid, "\nネットワーク統計情報\t経過時間[us]\t%lu\t", now);
    941941        if (now > (1000 * 3600 * 24))
    942942                cons_printf(portid, "%3lu日 %2lu時間 %2lu分 %2lu秒\n",
     
    10651065        WAI_NET_CONS_PRINTF();
    10661066        get_tim(&now);
    1067         cons_printf(portid, "ネットワークバッファ情報\t経過時間[ms]\t%u\n", now);
     1067        cons_printf(portid, "ネットワークバッファ情報\t経過時間[us]\t%u\n", now);
    10681068
    10691069#if NET_COUNT_ENABLE
     
    15771577        cons_printf(portid, " IP Address\n");
    15781578
    1579         /* expire の単位は [ms]。*/
     1579        /* expire の単位は [us]。*/
    15801580        get_tim(&now);
    15811581        dr = nd6_get_drl(&count);
     
    22982298
    22992299        cons_printf(portid, "ND:\n");
    2300         cons_printf(portid, "  TMO_ND6_RTR_SOL_DELAY:    %5d[ms]\n", TMO_ND6_RTR_SOL_DELAY);
    2301         cons_printf(portid, "  TMO_ND6_RTR_SOL_INTERVAL: %5d[ms]\n", TMO_ND6_RTR_SOL_INTERVAL);
     2300        cons_printf(portid, "  TMO_ND6_RTR_SOL_DELAY:    %5d[us]\n", TMO_ND6_RTR_SOL_DELAY);
     2301        cons_printf(portid, "  TMO_ND6_RTR_SOL_INTERVAL: %5d[us]\n", TMO_ND6_RTR_SOL_INTERVAL);
    23022302        cons_printf(portid, "  NUM_IP6_DAD_COUNT:        %5d\n",     NUM_IP6_DAD_COUNT);
    23032303        cons_printf(portid, "  NUM_ND6_CACHE_ENTRY:      %5d\n",     NUM_ND6_CACHE_ENTRY);
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netapp/dhcp4_cli.c

    r340 r364  
    20312031
    20322032                        /* 休止する。*/
    2033                         if (error == E_OK)
    2034                                 syslog(LOG_NOTICE, "[DHCP4C] lease released, go to sleep.");
     2033                        if (error == E_OK) {
     2034                                if (ct->fsm != DHCP4_FSM_SLEEP)
     2035                                        syslog(LOG_NOTICE, "[DHCP4C] lease released, go to sleep.");
     2036                        }
    20352037                        else {
    20362038                                syslog(LOG_NOTICE, "[DHCP4C] server not available, go to sleep, error: %s.", itron_strerror(error));
     
    21582160
    21592161                        /* 休止する。*/
    2160                         if (ct->error == E_OK)
    2161                                 syslog(LOG_NOTICE, "[DHCP4C] lease released, go to sleep.");
     2162                        if (ct->error == E_OK) {
     2163                                if (ct->fsm != DHCP4_FSM_SLEEP)
     2164                                        syslog(LOG_NOTICE, "[DHCP4C] lease released, go to sleep.");
     2165                        }
    21622166                        else {
    21632167                                syslog(LOG_NOTICE, "[DHCP4C] server not available, go to sleep, error: %s.", itron_strerror(ct->error));
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netapp/wwws.c

    r337 r364  
    708708        len += put_str(cepid, srbuf, response);
    709709        get_tim(&finish);
    710         syslog(LOG_NOTICE, "[WWWn:%02u SND] send: index.html, len: %4u, time: %lu [ms]",
     710        syslog(LOG_NOTICE, "[WWWn:%02u SND] send: index.html, len: %4u, time: %lu [us]",
    711711                           cepid, len, (finish - start) * 1000 / SYSTIM_HZ);
    712712        return E_OK;
     
    16091609
    16101610        get_tim(&finish);
    1611         syslog(LOG_NOTICE, "[WWWn:%02u SND]send: stat.html,  len: %4u, time: %lu [ms]",
     1611        syslog(LOG_NOTICE, "[WWWn:%02u SND]send: stat.html,  len: %4u, time: %lu [us]",
    16121612                           cepid, len, (finish - start) * 1000 / SYSTIM_HZ);
    16131613        return E_OK;
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netdev/if_btusb/if_btusb.c

    r337 r364  
    150150
    151151T_IF_SOFTC if_softc = {
    152         {0,},                                           /* ネットワークインタフェースのアドレス   */
     152        {{0,}},                                         /* ネットワークインタフェースのアドレス   */
    153153        0,                                                      /* 送信タイムアウト                     */
    154154        &btusb_softc,                           /* ディバイス依存のソフトウェア情報     */
     
    691691}
    692692
    693 static int usb_acl_out_active = 0;
    694 static int usb_command_active = 0;
    695 
    696 static int usb_can_send_packet_now(uint8_t packet_type)
    697 {
    698         switch (packet_type) {
    699         case HCI_COMMAND_DATA_PACKET:
    700                 return !usb_command_active;
    701         case HCI_ACL_DATA_PACKET:
    702                 return !usb_acl_out_active;
    703         default:
    704                 return 0;
    705         }
    706 }
    707 
    708693// single instance
    709694static const hci_transport_t hci_transport_usb =
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netinet/icmp6.h

    r337 r364  
    291291typedef struct t_router_advert_hdr {
    292292        T_ICMP6_HDR     hdr;
    293         uint32_t        reachable;              /* [ms] 到達可能時間  */
    294         uint32_t        retransmit;             /* [ms] 近隣要請送信間隔        */
     293        uint32_t        reachable;              /* [us] 到達可能時間  */
     294        uint32_t        retransmit;             /* [us] 近隣要請送信間隔        */
    295295        /* この後にオプションが続く */
    296296        } __attribute__((packed, aligned(2))) T_ROUTER_ADVERT_HDR;
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netinet/in4_subr.c

    r337 r364  
    287287
    288288        /* IP ヘッダを設定する。*/
    289         if ((error = in4_set_header(*nbuf, len, dstaddr, srcaddr, proto, ttl)) != E_OK)
     289        if ((error = in4_set_header(*nbuf, len, dstaddr, srcaddr, proto, ttl)) != E_OK) {
     290                syscall(rel_net_buf(*nbuf));
     291                *nbuf = NULL;
    290292                return error;
     293                }
    291294
    292295        /* 4 オクテット境界までパディングで埋める。*/
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netinet/in_itron.h

    r337 r364  
    6262#define TFN_TCP_ALL             (0)
    6363
    64 #define TEV_TCP_RCV_OOB         (-0x201)
     64#define TEV_TCP_RCV_OOB         (0x201)
    6565
    6666/* UDP 関係 */
     
    7575#define TFN_UDP_ALL             (0)
    7676
    77 #define TEV_UDP_RCV_DAT         (-0x221)
     77#define TEV_UDP_RCV_DAT         (0x221)
    7878
    7979/* 一般 */
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netinet/tcp_input.c

    r337 r364  
    13641364        NTOHS(tcph->dport);
    13651365
     1366        /* SDU 長 より 緊急ポインタが大きい場合 */
     1367        if (tcph->urp > tcph->sum)
     1368                goto drop;
     1369
    13661370find_cep:
    13671371
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netinet/tcp_output.c

    r337 r364  
    369369                tcph->flags |= TCP_FLG_URG;
    370370                }
    371         else
     371        else {
     372                tcph->urp = 0;
    372373                cep->snd_up  = cep->snd_una;
     374                }
    373375
    374376#endif  /* of #ifdef TCP_CFG_EXTENTIONS */
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netinet/tcp_usrreq.c

    r337 r364  
    897897
    898898        /* tcp_rcv_buf の割当て長をリセットする。*/
    899         cep->rcv_buf_len = 0;
     899        cep->rcv_buf_len -= len;
    900900
    901901        /* 通信端点のロックを解除する。*/
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netinet/udp_var.h

    r337 r364  
    101101typedef ER      (*t_udp_callback)(ID cepid, FN fncd, void *p_parblk);
    102102
     103typedef struct t_udp_rcv_dat_para {
     104        uint_t          len;
     105        T_NET_BUF       *input;
     106        uint_t          off;
     107        union {
     108                T_IPV4EP rep4;
     109                T_IPV6EP rep6;
     110        };
     111        } T_UDP_RCV_DAT_PARA;
     112
    103113/*
    104114 *  UDP 通信端点
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netinet/udpn_input.c

    r337 r364  
    7575{
    7676        T_UDP_HDR       *udph;
    77         uint_t          len;
     77        T_UDP_RCV_DAT_PARA para;
    7878
    7979        udph = (T_UDP_HDR *)(input->buf + off);
    80         len  = (uint_t)(ntohs(udph->ulen) - UDP_HDR_SIZE);
     80        para.len  = (uint_t)(ntohs(udph->ulen) - UDP_HDR_SIZE);
    8181
    8282        if (cep->rcv_tskid != TA_NULL) {        /* 非ノンブロッキングコールでペンディング中 */
     
    9898                /* データをバッファに移す。*/
    9999                memcpy(cep->rcv_data, GET_UDP_SDU(input, off),
    100                        (size_t)(len < cep->rcv_len ? len : cep->rcv_len));
     100                       (size_t)(para.len < cep->rcv_len ? para.len : cep->rcv_len));
    101101                syscall(rel_net_buf(input));
    102102
     
    104104
    105105#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
    106                         (*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_RCV_DAT, (void*)(uint32_t)len);
     106                        (*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_RCV_DAT, (void*)(uint32_t)para.len);
    107107#else
    108                         (*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_RCV_DAT, (void*)&len);
     108                        (*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_RCV_DAT, (void*)&para.len);
    109109#endif
    110110                else
     
    121121
    122122#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
    123                 (*cep->callback)(GET_UDP_CEPID(cep), TEV_UDP_RCV_DAT, (void*)(uint32_t)len);
     123                (*cep->callback)(GET_UDP_CEPID(cep), TEV_UDP_RCV_DAT, (void*)(uint32_t)para.len);
    124124#else
    125                 (*cep->callback)(GET_UDP_CEPID(cep), TEV_UDP_RCV_DAT, (void*)&len);
     125                para.input = input;
     126                para.off = off;
     127#if API_PROTO == API_PROTO_IPV4
     128                para.rep4.portno = ntohs(udph->sport);
     129                IN_COPY_TO_HOST(&para.rep4.ipaddr, input);
     130#else
     131                para.rep6.portno = ntohs(udph->sport);
     132                IN_COPY_TO_HOST(&para.rep6.ipaddr, input);
     133#endif
     134                (*cep->callback)(GET_UDP_CEPID(cep), TEV_UDP_RCV_DAT, (void*)&para.len);
    126135#endif
    127136                /*
     
    129138                 *  データを読み出さなかったことになるので、捨てる。
    130139                 */
    131                 if (cep->cb_netbuf != NULL)
    132                         syscall(rel_net_buf(cep->cb_netbuf));
     140                if (cep->cb_netbuf != NULL) {
     141                        if ((input->flags & NB_FLG_NOREL_IFOUT) == 0)
     142                                syscall(rel_net_buf(cep->cb_netbuf));
     143                        cep->cb_netbuf = NULL;
     144                        }
    133145                }
    134146        else {
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netinet/udpn_usrreq.c

    r337 r364  
    411411                return E_NOEXS;
    412412#if defined(SUPPORT_INET6)
    413 #endif
    414 #if defined(SUPPORT_INET4) && defined(SUPPORT_IGMP) && TNUM_UDP4_CEPID > 0
     413#elif defined(SUPPORT_INET4) && defined(SUPPORT_IGMP) && TNUM_UDP4_CEPID > 0
    415414        switch (optname) {
    416415        case IP_MULTICAST_LOOP:
     
    488487                return E_NOEXS;
    489488#if defined(SUPPORT_INET6)
    490 #endif
    491 #if defined(SUPPORT_INET4) && defined(SUPPORT_IGMP) && TNUM_UDP4_CEPID > 0
     489#elif defined(SUPPORT_INET4) && defined(SUPPORT_IGMP) && TNUM_UDP4_CEPID > 0
    492490        switch (optname) {
    493491        case IP_MULTICAST_LOOP:
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netinet/udpn_usrreq_nblk.c

    r337 r364  
    122122
    123123#ifdef TCP_CFG_NON_BLOCKING_COMPAT14
    124                         (*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_RCV_DAT, (void*)error);
     124                        (*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_CAN_CEP, (void*)error);
    125125#else
    126                         (*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_RCV_DAT, (void*)&error);
     126                        (*cep->callback)(GET_UDP_CEPID(cep), TFN_UDP_CAN_CEP, (void*)&error);
    127127#endif
    128128                else
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netinet6/in6_subr.c

    r337 r364  
    369369
    370370        /* IPv6 ヘッダを設定する。*/
    371         if ((error = in6_set_header(*nbuf, len, dstaddr, srcaddr, next, hlim)) != E_OK)
     371        if ((error = in6_set_header(*nbuf, len, dstaddr, srcaddr, next, hlim)) != E_OK) {
     372                syscall(rel_net_buf(*nbuf));
     373                *nbuf = NULL;
    372374                return error;
     375                }
    373376
    374377        /* 4 オクテット境界までパディングで埋める。*/
     
    662665 *  in6_rtredirect -- ルーティング表にエントリを登録する。
    663666 *
    664  *    注意: 引数 tmo の単位は [ms]。
     667 *    注意: 引数 tmo の単位は [us]。
    665668 */
    666669
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netinet6/in6_var.h

    r337 r364  
    184184         * vltime と pltime は、追加/変更してからの相対時間
    185185         */
    186         uint32_t        vltime;         /* 有効時間 [ms]                    */
    187         uint32_t        pltime;         /* 推奨有効時間 [ms]          */
     186        uint32_t        vltime;         /* 有効時間 [us]                    */
     187        uint32_t        pltime;         /* 推奨有効時間 [us]          */
    188188        } __attribute__((packed, aligned(2)))T_IN6_ADDR_LIFETIME;
    189189
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netinet6/nd6.c

    r337 r364  
    353353                        if (nd6_cache[mix].hold != NULL) {
    354354                                syscall(rel_net_buf(nd6_cache[mix].hold));
     355                                nd6_cache[mix].hold = NULL;
    355356                                }
    356357                        fix = mix;
     
    562563                        if (ln->hold != NULL) {
    563564                                syscall(rel_net_buf(ln->hold));
     565                                ln->hold = NULL;
    564566                                }
    565567
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netinet6/nd6.h

    r337 r364  
    8181        T_NET_BUF       *hold;
    8282        TMO             tmout;
    83         SYSTIM          expire;         /* [ms] 有効時間が切れる時刻      */
     83        SYSTIM          expire;         /* [us] 有効時間が切れる時刻      */
    8484        T_IF_ADDR       ifaddr;
    8585        uint8_t         state;
     
    183183typedef struct t_def_router {
    184184        T_IN6_ADDR      addr;
    185         SYSTIM          expire;         /* [ms] 有効時間が切れる時刻      */
    186         uint32_t        lifetime;       /* [ms] 有効時間                    */
     185        SYSTIM          expire;         /* [us] 有効時間が切れる時刻      */
     186        uint32_t        lifetime;       /* [us] 有効時間                    */
    187187        uint16_t        plistmap;       /* プレフィックスマップ           */
    188188        uint8_t         flags;          /* ルータ通知のフラグ            */
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/netinet6/nd6_rtr.c

    r337 r364  
    999999                return;
    10001000
    1001         /* ルータ要請ヘッダを設定する。*/
    1002         rsh = GET_ROUTER_SOLICIT_HDR(output, IF_IP6_ROUTER_SOLICIT_HDR_OFFSET);
    1003         rsh->hdr.type       = ND_ROUTER_SOLICIT;
    1004         rsh->hdr.code       = 0;
    1005         rsh->nd_rs_reserved = 0;
     1001        /* ルータ要請ヘッダを設定する。*/
     1002        rsh = GET_ROUTER_SOLICIT_HDR(output, IF_IP6_ROUTER_SOLICIT_HDR_OFFSET);
     1003        rsh->hdr.type       = ND_ROUTER_SOLICIT;
     1004        rsh->hdr.code       = 0;
     1005        rsh->nd_rs_reserved = 0;
    10061006
    10071007        /* チェックサムを計算する。*/
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/tcpip_sym.def

    r337 r364  
    1515TMO_UDP_OUTPUT
    1616TMO_ICMP_OUTPUT
     17TMO_IGMP_OUTPUT
    1718TMO_ND6_NS_OUTPUT
    1819TMO_ND6_NA_OUTPUT
  • asp3_tinet_ecnl_rx/trunk/asp3_dcre/tinet/tinet_asp.cfg

    r337 r364  
    7373INCLUDE("netinet/if_ether.cfg");
    7474INCLUDE("netinet/ip.cfg");
     75INCLUDE("netinet/ip_igmp.cfg");
    7576INCLUDE("netinet/tcp.cfg");
    7677INCLUDE("netinet/udp.cfg");
Note: See TracChangeset for help on using the changeset viewer.