Index: asp3_tinet_ecnl_rx/trunk/ntshell/src/socket_stub.c
===================================================================
--- asp3_tinet_ecnl_rx/trunk/ntshell/src/socket_stub.c	(revision 387)
+++ asp3_tinet_ecnl_rx/trunk/ntshell/src/socket_stub.c	(revision 400)
@@ -1,6 +1,6 @@
 /*
- *  TOPPERS ECHONET Lite Communication Middleware
+ *  TOPPERS PROJECT Home Network Working Group Software
  * 
- *  Copyright (C) 2017 Cores Co., Ltd. Japan
+ *  Copyright (C) 2017-2019 Cores Co., Ltd. Japan
  * 
  *  上記著作権者は，以下の(1)～(4)の条件を満たす場合に限り，本ソフトウェ
@@ -70,4 +70,5 @@
 
 #define SOCKET_TIMEOUT 2000000
+#define TCP_SOCKET_BUF_SIZE 512
 
 struct addrinfo {
@@ -363,10 +364,10 @@
 				return -ENOMEM;
 
-			socket->buf_size = 512 + 512;
+			socket->buf_size = TCP_SOCKET_BUF_SIZE + TCP_SOCKET_BUF_SIZE;
 			socket->buf = malloc(socket->buf_size);
 #ifdef _DEBUG
 			memset(socket->buf, 0, socket->buf_size);
 #endif
-			T_TCP_CCEP ccep = { 0, socket->buf, 512, &socket->buf[512], 512, (FP)socket_tcp_callback };
+			T_TCP_CCEP ccep = { 0, socket->buf, TCP_SOCKET_BUF_SIZE, &socket->buf[TCP_SOCKET_BUF_SIZE], TCP_SOCKET_BUF_SIZE, (FP)socket_tcp_callback };
 			ret = tcp_cre_cep(cepid, &ccep);
 			if (ret != E_OK) {
@@ -410,10 +411,10 @@
 				return -ENOMEM;
 
-			socket->buf_size = 512 + 512;
+			socket->buf_size = TCP_SOCKET_BUF_SIZE + TCP_SOCKET_BUF_SIZE;
 			socket->buf = malloc(socket->buf_size);
 #ifdef _DEBUG
 			memset(socket->buf, 0, socket->buf_size);
 #endif
-			T_TCP6_CCEP ccep = { 0, socket->buf, 512, &socket->buf[512], 512, (FP)socket_tcp6_callback };
+			T_TCP6_CCEP ccep = { 0, socket->buf, TCP_SOCKET_BUF_SIZE, &socket->buf[TCP_SOCKET_BUF_SIZE], TCP_SOCKET_BUF_SIZE, (FP)socket_tcp6_callback };
 			ret = tcp6_cre_cep(cepid, &ccep);
 			if (ret != E_OK) {
@@ -522,10 +523,10 @@
 				return -ENOMEM;
 
-			socket->buf_size = 512 + 512;
+			socket->buf_size = TCP_SOCKET_BUF_SIZE + TCP_SOCKET_BUF_SIZE;
 			socket->buf = malloc(socket->buf_size);
 #ifdef _DEBUG
 			memset(socket->buf, 0, socket->buf_size);
 #endif
-			T_TCP_CCEP ccep = { 0, socket->buf, 512, &socket->buf[512], 512, (FP)socket_tcp_callback };
+			T_TCP_CCEP ccep = { 0, socket->buf, TCP_SOCKET_BUF_SIZE, &socket->buf[TCP_SOCKET_BUF_SIZE], TCP_SOCKET_BUF_SIZE, (FP)socket_tcp_callback };
 			ret = tcp_cre_cep(cepid, &ccep);
 			if (ret != E_OK) {
@@ -560,10 +561,10 @@
 				return -ENOMEM;
 
-			socket->buf_size = 512 + 512;
+			socket->buf_size = TCP_SOCKET_BUF_SIZE + TCP_SOCKET_BUF_SIZE;
 			socket->buf = malloc(socket->buf_size);
 #ifdef _DEBUG
 			memset(socket->buf, 0, socket->buf_size);
 #endif
-			T_TCP6_CCEP ccep = { 0, socket->buf, 512, &socket->buf[512], 512, (FP)socket_tcp6_callback };
+			T_TCP6_CCEP ccep = { 0, socket->buf, TCP_SOCKET_BUF_SIZE, &socket->buf[TCP_SOCKET_BUF_SIZE], TCP_SOCKET_BUF_SIZE, (FP)socket_tcp6_callback };
 			ret = tcp6_cre_cep(cepid, &ccep);
 			if (ret != E_OK) {
@@ -629,10 +630,10 @@
 				return -ENOMEM;
 
-			socket->buf_size = 512 + 512;
+			socket->buf_size = TCP_SOCKET_BUF_SIZE + TCP_SOCKET_BUF_SIZE;
 			socket->buf = malloc(socket->buf_size);
 #ifdef _DEBUG
 			memset(socket->buf, 0, socket->buf_size);
 #endif
-			T_TCP_CCEP ccep = { 0, socket->buf, 512, &socket->buf[512], 512, (FP)socket_tcp_callback };
+			T_TCP_CCEP ccep = { 0, socket->buf, TCP_SOCKET_BUF_SIZE, &socket->buf[TCP_SOCKET_BUF_SIZE], TCP_SOCKET_BUF_SIZE, (FP)socket_tcp_callback };
 			ret = tcp_cre_cep(cepid, &ccep);
 			if (ret != E_OK) {
@@ -684,10 +685,10 @@
 				return -ENOMEM;
 
-			socket->buf_size = 512 + 512;
+			socket->buf_size = TCP_SOCKET_BUF_SIZE + TCP_SOCKET_BUF_SIZE;
 			socket->buf = malloc(socket->buf_size);
 #ifdef _DEBUG
 			memset(socket->buf, 0, socket->buf_size);
 #endif
-			T_TCP6_CCEP ccep = { 0, socket->buf, 512, &socket->buf[512], 512, (FP)socket_tcp6_callback };
+			T_TCP6_CCEP ccep = { 0, socket->buf, TCP_SOCKET_BUF_SIZE, &socket->buf[TCP_SOCKET_BUF_SIZE], TCP_SOCKET_BUF_SIZE, (FP)socket_tcp6_callback };
 			ret = tcp6_cre_cep(cepid, &ccep);
 			if (ret != E_OK) {
