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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/net_cons.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 *
     
    6060#endif  /* of #ifdef TARGET_KERNEL_JSP */
    6161
    62 #include <tinet_defs.h>
    63 
    64 #include <net/if.h>
    65 #include <net/if_ppp.h>
    66 #include <net/if_loop.h>
    67 #include <net/ethernet.h>
    68 #include <net/net.h>
    69 #include <net/net_timer.h>
    70 
    7162#include <netinet/in.h>
    7263#include <netinet/in_itron.h>
     
    109100#define TELNET_OPT_IAC          (255)
    110101
     102#if defined(SUPPORT_INET6)
     103#define API_PROTO               '6'
     104#else
     105#define API_PROTO               '4'
     106#endif
     107
    111108/*
    112109 *  変数
     
    121118bool_t  wait_accept     = false;        /* 接続要求待ち中      */
    122119
     120#if defined(SUPPORT_INET6)
     121
     122T_IPV6EP        dst;
     123
     124#else   /* of #if defined(SUPPORT_INET6) */
     125
    123126#if defined(SUPPORT_INET4)
    124127
     
    126129
    127130#endif  /* of #if defined(SUPPORT_INET4) */
    128 
    129 #if defined(SUPPORT_INET6)
    130 
    131 T_IPV6EP        dst;
    132131
    133132#endif  /* of #if defined(SUPPORT_INET6) */
     
    156155                get_tim(&now);
    157156                if (*(ER*)p_parblk == E_OK) {
    158                         syslog(LOG_NOTICE, "[NCS:%02u CBN] connected:  %6lu, from: %s.%u",
    159                                            cepid, now / SYSTIM_HZ, IP2STR(NULL, &dst.ipaddr), dst.portno);
     157                        syslog(LOG_NOTICE, "[NCS%c:%02u CBN] conct: %7lu, from: %s.%u",
     158                                           API_PROTO, cepid, now / SYSTIM_HZ, IP2STR(NULL, &dst.ipaddr), dst.portno);
    160159                        connected = true;
    161160                        }
    162161                else
    163                         syslog(LOG_NOTICE, "[NCS:%02d CBN] error: %s", itron_strerror(*(ER*)p_parblk));
     162                        syslog(LOG_NOTICE, "[NCS%c:%02d CBN] error: %s",
     163                                           API_PROTO, itron_strerror(*(ER*)p_parblk));
    164164                snd_len = snd_off = rcv_len = rcv_off = 0;
    165165                wait_accept = false;
     
    193193                if (snd_off > 0) {
    194194                        if ((error = tcp_snd_buf(NET_CONS_CEPID, snd_off)) != E_OK && error != E_CLS)
    195                                 syslog(LOG_NOTICE, "[NCS:%02d SND] flush send error: %s",
    196                                                    NET_CONS_CEPID, itron_strerror(error));
     195                                syslog(LOG_NOTICE, "[NCS%c:%02d SND] flush send error: %s",
     196                                                   API_PROTO, NET_CONS_CEPID, itron_strerror(error));
    197197                        snd_len = snd_off = 0;
    198198                        }
     
    218218                        if ((error = tcp_snd_buf(NET_CONS_CEPID, snd_off)) != E_OK) {
    219219                                if (error != E_CLS)
    220                                         syslog(LOG_NOTICE, "[NCS:%02d SND] send buff error: %s",
    221                                                            NET_CONS_CEPID, itron_strerror(error));
     220                                        syslog(LOG_NOTICE, "[NCS%c:%02d SND] send buff error: %s",
     221                                                           API_PROTO, NET_CONS_CEPID, itron_strerror(error));
    222222                                syscall(sig_sem(SEM_NET_CONS_SEND));
    223223                                return;
     
    226226                        if ((snd_len = tcp_get_buf(NET_CONS_CEPID, (void*)&snd_buff, TMO_FEVR)) <= 0) {
    227227                                if (snd_len != E_CLS)
    228                                         syslog(LOG_NOTICE, "[NCS:%02d SND] get buff error: %s",
    229                                                            NET_CONS_CEPID, itron_strerror(snd_len));
     228                                        syslog(LOG_NOTICE, "[NCS%c:%02d SND] get buff error: %s",
     229                                                           API_PROTO, NET_CONS_CEPID, itron_strerror(snd_len));
    230230                                syscall(sig_sem(SEM_NET_CONS_SEND));
    231231                                return;
     
    253253                        if ((error = tcp_rel_buf(NET_CONS_CEPID, rcv_len)) != E_OK) {
    254254                                if (error != E_CLS)
    255                                         syslog(LOG_NOTICE, "[NCS:%02d RCV] release buff error: %s",
    256                                                            NET_CONS_CEPID, itron_strerror(error));
     255                                        syslog(LOG_NOTICE, "[NCS%c:%02d RCV] release buff error: %s",
     256                                                           API_PROTO, NET_CONS_CEPID, itron_strerror(error));
    257257                                discon_net_cons();
    258258                                return EOF;
     
    264264                        else if (rcv_len < 0) {
    265265                                if (rcv_len != E_CLS)
    266                                         syslog(LOG_NOTICE, "[NCS:%02d RCV] recieve buff error: %s",
    267                                                            NET_CONS_CEPID, itron_strerror(rcv_len));
     266                                        syslog(LOG_NOTICE, "[NCS%c:%02d RCV] recieve buff error: %s",
     267                                                           API_PROTO, NET_CONS_CEPID, itron_strerror(rcv_len));
    268268                                discon_net_cons();
    269269                                return EOF;
     
    284284{
    285285        T_SERIAL_RPOR   rpor;
    286         int_t           ch, req;
     286        int_t           ch;
    287287        char            uch;
    288288        ER              error;
     
    292292                error = TCP_ACP_CEP(NET_CONS_CEPID, NET_CONS_REPID, &dst, TMO_NBLK);
    293293#if 0
    294                 syslog(LOG_NOTICE, "[NCS:%02d ACP] status: %s",NET_CONS_CEPID, itron_strerror(error));
     294                syslog(LOG_NOTICE, "[NCS%c:%02d ACP] status: %s",
     295                                   API_PROTO, NET_CONS_CEPID, itron_strerror(error));
    295296#endif
    296297                if (error != E_WBLK)
     
    307308                                        case TELNET_OPT_DO:
    308309                                        case TELNET_OPT_DONT:
    309                                                 req = cons_getchar_raw();
     310                                                cons_getchar_raw();
    310311                                                break;
    311312                                        case TELNET_OPT_SB:
     
    354355                if (snd_off > 0) {
    355356                        if ((error = tcp_snd_buf(NET_CONS_CEPID, snd_off)) != E_OK && error != E_CLS)
    356                                 syslog(LOG_NOTICE, "[NCS:%02d SND] send buff error: %s",
    357                                                    NET_CONS_CEPID, itron_strerror(error));
     357                                syslog(LOG_NOTICE, "[NCS%c:%02d SND] send buff error: %s",
     358                                                   API_PROTO, NET_CONS_CEPID, itron_strerror(error));
    358359                        }
    359360                if ((error = tcp_sht_cep(NET_CONS_CEPID)) != E_OK)
    360                         syslog(LOG_NOTICE, "[NCS:%02d SHT] shutdown error: %s",
    361                                            NET_CONS_CEPID, itron_strerror(error));
     361                        syslog(LOG_NOTICE, "[NCS%c:%02d SHT] shutdown error: %s",
     362                                           API_PROTO, NET_CONS_CEPID, itron_strerror(error));
    362363                if ((error = tcp_cls_cep(NET_CONS_CEPID, TMO_FEVR)) != E_OK)
    363                         syslog(LOG_NOTICE, "[NCS:%02d CLS] close error: %s",
    364                                            NET_CONS_CEPID, itron_strerror(error));
     364                        syslog(LOG_NOTICE, "[NCS%c:%02d CLS] close error: %s",
     365                                           API_PROTO, NET_CONS_CEPID, itron_strerror(error));
    365366                connected = false;
    366367                syscall(sig_sem(SEM_NET_CONS_SEND));
    367368                get_tim(&now);
    368                 syslog(LOG_NOTICE, "[NCS:%02u SND] disconnected:%5lu, from: %s.%u",
    369                                    NET_CONS_CEPID, now / SYSTIM_HZ, IP2STR(NULL, &dst.ipaddr), dst.portno);
     369                syslog(LOG_NOTICE, "[NCS%c:%02u SND] discn: %7lu, from: %s.%u",
     370                                   API_PROTO, NET_CONS_CEPID, now / SYSTIM_HZ, IP2STR(NULL, &dst.ipaddr), dst.portno);
    370371                }
    371372        return error;
     
    499500                        case 'M':
    500501                                str = va_arg(ap, char*);
    501                                 put_macaddr(CONSOLE_PORTID, str, width);
     502                                put_macaddr(CONSOLE_PORTID, (uint8_t *)str, width);
    502503                                break;
    503504
Note: See TracChangeset for help on using the changeset viewer.