[270] | 1 | /*
|
---|
| 2 | * TINET (TCP/IP Protocol Stack)
|
---|
| 3 | *
|
---|
| 4 | * Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
|
---|
| 5 | * Tomakomai National College of Technology, JAPAN
|
---|
| 6 | *
|
---|
| 7 | * ä¸è¨èä½æ¨©è
|
---|
| 8 | ã¯ï¼ä»¥ä¸ã® (1)ï½(4) ã®æ¡ä»¶ãï¼Free Software Foundation
|
---|
| 9 | * ã«ãã£ã¦å
|
---|
| 10 | ¬è¡¨ããã¦ãã GNU General Public License ã® Version 2 ã«è¨
|
---|
| 11 | * è¿°ããã¦ããæ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§ã¢ï¼æ¬ã½ããã¦ã§ã¢
|
---|
| 12 | * ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ã使ç¨ã»è¤è£½ã»æ¹å¤ã»åé
|
---|
| 13 | å¸ï¼ä»¥ä¸ï¼
|
---|
| 14 | * å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
|
---|
| 15 | * (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
|
---|
| 16 | * 権表示ï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
|
---|
| 17 | * ã¹ã³ã¼ãä¸ã«å«ã¾ãã¦ãããã¨ï¼
|
---|
| 18 | * (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
|
---|
| 19 | * ç¨ã§ããå½¢ã§åé
|
---|
| 20 | å¸ããå ´åã«ã¯ï¼åé
|
---|
| 21 | å¸ã«ä¼´ãããã¥ã¡ã³ãï¼å©ç¨
|
---|
| 22 | * è
|
---|
| 23 | ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
|
---|
| 24 | * ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
|
---|
| 25 | * (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
|
---|
| 26 | * ç¨ã§ããªãå½¢ã§åé
|
---|
| 27 | å¸ããå ´åã«ã¯ï¼æ¬¡ã®æ¡ä»¶ãæºãããã¨ï¼
|
---|
| 28 | * (a) åé
|
---|
| 29 | å¸ã«ä¼´ãããã¥ã¡ã³ãï¼å©ç¨è
|
---|
| 30 | ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
|
---|
| 31 | * ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
|
---|
| 32 | * (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
|
---|
| 33 | * 害ãããï¼ä¸è¨èä½æ¨©è
|
---|
| 34 | ããã³TOPPERSããã¸ã§ã¯ããå
|
---|
| 35 | 責ãããã¨ï¼
|
---|
| 36 | *
|
---|
| 37 | * æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
|
---|
| 38 | ã
|
---|
| 39 | * ãã³TOPPERSããã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ãã®é©ç¨å¯è½æ§ã
|
---|
| 40 | * å«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´
|
---|
| 41 | * æ¥çã¾ãã¯éæ¥çã«çãããããªãæ害ã«é¢ãã¦ãï¼ãã®è²¬ä»»ãè² ããªãï¼
|
---|
| 42 | *
|
---|
| 43 | * @(#) $Id: netapp_var.h 270 2017-02-09 04:03:47Z coas-nagasima $
|
---|
| 44 | */
|
---|
| 45 |
|
---|
| 46 | #ifndef _NETAPP_VAR_H_
|
---|
| 47 | #define _NETAPP_VAR_H_
|
---|
| 48 |
|
---|
| 49 | /*
|
---|
| 50 | * ãã¯ãå®ç¾©
|
---|
| 51 | */
|
---|
| 52 |
|
---|
| 53 | #if defined(SUPPORT_INET4)
|
---|
| 54 | #define T_IPEP T_IPV4EP
|
---|
| 55 | #endif
|
---|
| 56 |
|
---|
| 57 | #if defined(SUPPORT_INET6)
|
---|
| 58 | #define T_IPEP T_IPV6EP
|
---|
| 59 | #endif
|
---|
| 60 |
|
---|
| 61 | /*
|
---|
| 62 | * ãããã¯ã¼ã¯çµç±ã³ã³ã½ã¼ã«å
|
---|
| 63 | ¥åºå
|
---|
| 64 | */
|
---|
| 65 |
|
---|
| 66 | #ifdef USE_NET_CONS
|
---|
| 67 |
|
---|
| 68 | /* ãªãã¼ã */
|
---|
| 69 |
|
---|
| 70 | #define syslog net_syslog
|
---|
| 71 | #define serial_ctl_por net_serial_ctl_por
|
---|
| 72 |
|
---|
| 73 | /* é¢æ°ã·ãã¥ã¬ã¼ã·ã§ã³ãã¯ã */
|
---|
| 74 |
|
---|
| 75 | #define FLUSH_SND_BUFF() flush_snd_buff()
|
---|
| 76 | #define WAI_NET_CONS_PRINTF() syscall(wai_sem(SEM_NET_CONS_PRINTF))
|
---|
| 77 | #define SIG_NET_CONS_PRINTF() sig_sem(SEM_NET_CONS_PRINTF)
|
---|
| 78 |
|
---|
| 79 | #else /* of #ifdef USE_NET_CONS */
|
---|
| 80 |
|
---|
| 81 | /* é¢æ°ã·ãã¥ã¬ã¼ã·ã§ã³ãã¯ã */
|
---|
| 82 |
|
---|
| 83 | #define FLUSH_SND_BUFF()
|
---|
| 84 | #define WAI_NET_CONS_PRINTF()
|
---|
| 85 | #define SIG_NET_CONS_PRINTF()
|
---|
| 86 |
|
---|
| 87 | #endif /* of #ifdef USE_NET_CONS */
|
---|
| 88 |
|
---|
| 89 | /*
|
---|
| 90 | * é¢æ°
|
---|
| 91 | */
|
---|
| 92 |
|
---|
| 93 | extern const char *in_strtfn (FN fncd);
|
---|
| 94 | extern const char *itron_strerror (ER ercd);
|
---|
| 95 | extern ER net_syslog(uint_t prio, const char *format, ...) throw();
|
---|
| 96 | extern ER net_serial_ctl_por(ID portid, uint_t ioctl) throw();
|
---|
| 97 | extern void flush_snd_buff (void);
|
---|
| 98 | extern ER discon_net_cons (void);
|
---|
| 99 | extern void wup_net_cons (void);
|
---|
| 100 | extern ER alloc_tcp_rep (ID *repid, ID tskid, T_TCP_CREP *crep);
|
---|
| 101 | extern ER free_tcp_rep (ID repid, bool_t call_tcp_del_rep);
|
---|
| 102 | extern ER alloc_tcp_cep (ID *cepid, ID tskid, T_TCP_CCEP *ccep);
|
---|
| 103 | extern ER free_tcp_cep (ID cepid);
|
---|
| 104 | extern ER alloc_udp_cep (ID *cepid, ID tskid, T_UDP_CCEP *ccep);
|
---|
| 105 | extern ER free_udp_cep (ID cepid, bool_t call_udp_del_cep);
|
---|
| 106 |
|
---|
| 107 | #if defined(SUPPORT_INET4)
|
---|
| 108 |
|
---|
| 109 | #define TCP_CRE_REP(i,r) tcp_cre_rep(i,r)
|
---|
| 110 | #define TCP_CRE_CEP(i,c) tcp_cre_cep(i,c)
|
---|
| 111 | #define UDP_CRE_CEP(i,c) udp_cre_cep(i,c)
|
---|
| 112 | #define TCP_ACP_CEP(c,r,d,t) tcp_acp_cep(c,r,d,t)
|
---|
| 113 | #define TCP_CON_CEP(c,m,d,t) tcp_con_cep(c,m,d,t)
|
---|
| 114 |
|
---|
| 115 | #define UDP_SND_DAT(c,d,b,l,t) udp_snd_dat(c,d,b,l,t)
|
---|
| 116 | #define UDP_RCV_DAT(c,d,b,l,t) udp_rcv_dat(c,d,b,l,t)
|
---|
| 117 |
|
---|
| 118 | #define IP2STR(s,a) ip2str(s,a)
|
---|
| 119 |
|
---|
| 120 | #define GET_IPADDR(a,l) get_ipv4addr(a,l)
|
---|
| 121 | #define PING(a,t,l) ping4(a,t,l)
|
---|
| 122 |
|
---|
| 123 | extern void ping4 (T_IN4_ADDR *addr, uint_t tmo, uint_t len);
|
---|
| 124 | extern char *get_ipv4addr (T_IN4_ADDR *addr, char *line);
|
---|
| 125 |
|
---|
| 126 | #endif /* of #if defined(SUPPORT_INET4) */
|
---|
| 127 |
|
---|
| 128 | #if defined(SUPPORT_INET6)
|
---|
| 129 |
|
---|
| 130 | #define TCP_CRE_REP(i,r) tcp6_cre_rep(i,r)
|
---|
| 131 | #define TCP_CRE_CEP(i,c) tcp6_cre_cep(i,c)
|
---|
| 132 | #define UDP_CRE_CEP(i,c) udp6_cre_cep(i,c)
|
---|
| 133 | #define TCP_ACP_CEP(c,r,d,t) tcp6_acp_cep(c,r,d,t)
|
---|
| 134 | #define TCP_CON_CEP(c,m,d,t) tcp6_con_cep(c,m,d,t)
|
---|
| 135 |
|
---|
| 136 | #define UDP_SND_DAT(c,d,b,l,t) udp6_snd_dat(c,d,b,l,t)
|
---|
| 137 | #define UDP_RCV_DAT(c,d,b,l,t) udp6_rcv_dat(c,d,b,l,t)
|
---|
| 138 |
|
---|
| 139 | #define IP2STR(s,a) ipv62str(s,a)
|
---|
| 140 |
|
---|
| 141 | #define GET_IPADDR(a,l) get_ipv6addr(a,l)
|
---|
| 142 | #define PING(a,t,l) ping6(a,t,l)
|
---|
| 143 |
|
---|
| 144 | extern void ping6 (T_IN6_ADDR *addr, uint_t tmo, uint_t len);
|
---|
| 145 | extern char *get_ipv6addr (T_IN6_ADDR *addr, char *line);
|
---|
| 146 |
|
---|
| 147 | #endif /* of #if defined(SUPPORT_INET6) */
|
---|
| 148 |
|
---|
| 149 | #endif /* of #ifndef _NETAPP_VAR_H_ */
|
---|