Index: uKadecot/trunk/ecnl_ssp/echonet.c
===================================================================
--- uKadecot/trunk/ecnl_ssp/echonet.c	(revision 263)
+++ uKadecot/trunk/ecnl_ssp/echonet.c	(revision 265)
@@ -329,6 +329,5 @@
 	if (a_ret) {
 		ECN_DBG_PUT("ecn_add_edt(): _ecn_fbs_add_data_ex(*, ecn_prp{epc:0x%02X}, %u) result = %d:%s",
-			a_ecn_prp.epc, sizeof(a_ecn_prp),
-			a_ret, itron_strerror(a_ret));
+			a_ecn_prp.epc, sizeof(a_ecn_prp), a_ret, itron_strerror(a_ret));
 		goto lb_except;
 	}
@@ -338,6 +337,5 @@
 		if (a_ret) {
 			ECN_DBG_PUT("ecn_add_edt(): _ecn_fbs_add_data_ex(*, ecn_prp{epc:0x%02X} edt, %u) result = %d:%s",
-				a_ecn_prp.epc, fa_pdc,
-				a_ret, itron_strerror(a_ret));
+				a_ecn_prp.epc, fa_pdc, a_ret, itron_strerror(a_ret));
 			goto lb_except;
 		}
@@ -409,5 +407,5 @@
 
 	p_esv = &pk_esv->hdr;
-	p_snod = _ecn_eno_fnd(((T_ECN_FST_BLK *)pk_esv)->hdr.sender);
+	p_snod = _ecn_eno_fnd(((T_ECN_FST_BLK *)pk_esv)->hdr.sender.id);
 	if (p_snod != NULL) {
 		p_sobj = p_snod->profile;
@@ -433,5 +431,5 @@
 
 	p_esv = &pk_esv->hdr;
-	p_snod = _ecn_eno_fnd(((T_ECN_FST_BLK *)pk_esv)->hdr.sender);
+	p_snod = _ecn_eno_fnd(((T_ECN_FST_BLK *)pk_esv)->hdr.sender.id);
 	if (p_snod != NULL) {
 		/* ノードプロファイルの場合 */
@@ -503,6 +501,4 @@
 	if (!p_pdc)
 		return E_PAR;
-	if (!p_edt)
-		return E_PAR;
 	if (!pk_itr->pk_esv)
 		return E_PAR;
@@ -510,6 +506,5 @@
 	if (pk_itr->is_eof)
 		return E_BOVR; /* データ終了 */
-	if (	pk_itr->count <= pk_itr->got_ct
-	&&	pk_itr->next_blk_ct < 1) {
+	if (pk_itr->count <= pk_itr->got_ct && pk_itr->next_blk_ct < 1) {
 		pk_itr->is_eof = 1;			/* 終端に達した時、非0 */
 		return E_BOVR; /* データ終了 */
@@ -523,5 +518,5 @@
 
 #ifdef ECN_ENA_ITR_NXT_CARP
-	ECN_CAP_PUT("ecn_itr_nxt() rd.cur=b%dp%d", pk_itr->cur.blk, pk_itr->cur.pos ECN_CAP_PUT(;
+	ECN_CAP_PUT("ecn_itr_nxt() rd.cur=b%dp%d", pk_itr->cur.blk, pk_itr->cur.pos);
 #endif
 	if (pk_itr->count <= pk_itr->got_ct && 0 < pk_itr->next_blk_ct) {
@@ -550,6 +545,5 @@
 		goto lb_except;
 	if (a_rd_len < sizeof(a_ecn_prp)) {
-		ECN_DBG_PUT("ecn_itr_nxt() ecn_prp read fault." 
-			" rd.cur=%d", pk_itr->cur);
+		ECN_DBG_PUT("ecn_itr_nxt() ecn_prp read fault. rd.cur=%d", pk_itr->cur);
 		pk_itr->is_eof = 1;			/* 終端に達した時、非0 */
 		a_ret = E_BOVR;	/* データ終了 */
@@ -560,21 +554,28 @@
 
 	if (0 < a_ecn_prp.pdc) {
-		/* 付随データを読み取る */
-		a_rd_len = 0;
-		a_ret = _ecn_fbs_get_data(a_fbs_id, p_edt, a_ecn_prp.pdc, &a_rd_len);
-		if (a_ret != E_OK)
-			goto lb_except;
-		if (a_rd_len < (ECN_FBS_SSIZE_T)a_ecn_prp.pdc) {
-			ECN_DBG_PUT("ecn_itr_nxt() edt read fault."
-				" rd.cur=%d,epc=0x%02X,pdc=%u", pk_itr->cur, a_ecn_prp.epc , a_ecn_prp.pdc);
-			pk_itr->is_eof = 1;			/* 終端に達した時、非0 */
-			a_ret = E_BOVR;	/* データ終了 */
-			goto lb_finally;
+		if (p_edt == NULL) {
+			a_ret = _ecn_fbs_seek_rpos(a_fbs_id, a_ecn_prp.pdc);
+			if (a_ret != E_OK)
+				goto lb_except;
 		}
+		else {
+			/* 付随データを読み取る */
+			a_rd_len = 0;
+			a_ret = _ecn_fbs_get_data(a_fbs_id, p_edt, a_ecn_prp.pdc, &a_rd_len);
+			if (a_ret != E_OK)
+				goto lb_except;
+			if (a_rd_len < (ECN_FBS_SSIZE_T)a_ecn_prp.pdc) {
+				ECN_DBG_PUT("ecn_itr_nxt() edt read fault. rd.cur=%d,epc=0x%02X,pdc=%u",
+					pk_itr->cur, a_ecn_prp.epc , a_ecn_prp.pdc);
+				pk_itr->is_eof = 1;			/* 終端に達した時、非0 */
+				a_ret = E_BOVR;	/* データ終了 */
+				goto lb_finally;
+			}
+		}
 	}
 	pk_itr->got_ct++;
 
 #ifdef ECN_ENA_ITR_NXT_CARP
-	ECN_CAP_PUT("ecn_itr_nxt() read: ct=%d/%d", pk_itr->got_ct, pk_itr->count ECN_CAP_PUT(;
+	ECN_CAP_PUT("ecn_itr_nxt() read: ct=%d/%d", pk_itr->got_ct, pk_itr->count);
 #endif
 
Index: uKadecot/trunk/ecnl_ssp/echonet_agent.c
===================================================================
--- uKadecot/trunk/ecnl_ssp/echonet_agent.c	(revision 263)
+++ uKadecot/trunk/ecnl_ssp/echonet_agent.c	(revision 265)
@@ -434,5 +434,5 @@
 			memset(result, 0, sizeof(*result));
 			node = &result->node;
-			node->enodId = ((T_ECN_FST_BLK *)esv)->hdr.sender;
+			node->enodId = ((T_ECN_FST_BLK *)esv)->hdr.sender.id;
 			node->base.eobjId = tmax_eobjid + 1 + (((intptr_t)result - (intptr_t)agent->blockes) / sizeof(agent->blockes[0]));
 			node->base.inib.enodid = 0;
@@ -570,5 +570,5 @@
 	}
 
-	ret = psnd_dtq(res.ptr->hdr.target_mbxid, (intptr_t)res.ptr);
+	ret = psnd_dtq(res.ptr->hdr.target.mbxid, (intptr_t)res.ptr);
 	if (ret != E_OK) {
 		_ecn_fbs_del(res);
@@ -634,5 +634,5 @@
 	}
 
-	ret = psnd_dtq(res.ptr->hdr.target_mbxid, (intptr_t)res.ptr);
+	ret = psnd_dtq(res.ptr->hdr.target.mbxid, (intptr_t)res.ptr);
 	if (ret != E_OK) {
 		_ecn_fbs_del(res);
Index: uKadecot/trunk/ecnl_ssp/echonet_fbs.h
===================================================================
--- uKadecot/trunk/ecnl_ssp/echonet_fbs.h	(revision 263)
+++ uKadecot/trunk/ecnl_ssp/echonet_fbs.h	(revision 265)
@@ -111,15 +111,15 @@
 	uint16_t	type;			/* メッセージタイプ */
 	union{
-		ECN_ENOD_ID sender;		/* 送信元ノードID（ECHONET電文） */
-		ID sender_mbxid;		/* 送信元メールボックスID（内部メッセージ） */
-	};
+		ECN_ENOD_ID id;			/* 送信元ノードID（ECHONET電文） */
+		ID mbxid;				/* 送信元メールボックスID（内部メッセージ） */
+	}sender;
 	union{
-		ECN_ENOD_ID target;		/* 送信先ノードID（ECHONET電文） */
-		ID target_mbxid;		/* 送信先メールボックスID（内部メッセージ） */
-	};
+		ECN_ENOD_ID id;			/* 送信先ノードID（ECHONET電文） */
+		ID mbxid;				/* 送信先メールボックスID（内部メッセージ） */
+	}target;
 	union{
-		ECN_ENOD_ID reply;		/* 返信先ノードID（ECHONET電文） */
-		ID reply_mbxid;			/* 返信先メールボックスID（内部メッセージ） */
-	};
+		ECN_ENOD_ID id;			/* 返信先ノードID（ECHONET電文） */
+		ID mbxid;				/* 返信先メールボックスID（内部メッセージ） */
+	}reply;
 
 	int			rd;				/*	読み取りヘッド情報	*/
Index: uKadecot/trunk/ecnl_ssp/echonet_task.c
===================================================================
--- uKadecot/trunk/ecnl_ssp/echonet_task.c	(revision 263)
+++ uKadecot/trunk/ecnl_ssp/echonet_task.c	(revision 265)
@@ -87,5 +87,5 @@
 	intptr_t msg = (intptr_t)fa_rsp_fbs.ptr;
 	ID mbxid = ecn_udp_mailboxid;
-	ECN_ENOD_ID target = fa_rsp_fbs.ptr->hdr.target;
+	ECN_ENOD_ID target = fa_rsp_fbs.ptr->hdr.target.id;
 #ifdef ECN_DBG_PUT_ENA
 	intptr_t a_fbs_sub1 = (intptr_t)fa_rsp_fbs.ptr->lnk.p_sub[0];
@@ -412,10 +412,10 @@
 	}
 	if (fa_deoj == 0) {
-		ECN_DBG_PUT("%s", "マルチキャスト");
+		ECN_DBG_PUT("マルチキャスト");
 		/* fa_deoj == 0 : マルチキャスト */
 		((T_EDATA *)a_fbs_id.ptr)->hdr.edata.deoj.eojx1 = EOJ_X1_PROFILE;
 		((T_EDATA *)a_fbs_id.ptr)->hdr.edata.deoj.eojx2 = EOJ_X2_NODE_PROFILE;
 		((T_EDATA *)a_fbs_id.ptr)->hdr.edata.deoj.eojx3 = 0x01;
-		a_fbs_id.ptr->hdr.target = ENOD_MULTICAST_ID;
+		a_fbs_id.ptr->hdr.target.id = ENOD_MULTICAST_ID;
 	}
 	else if (fa_deoj <= tmax_eobjid) {
@@ -427,10 +427,10 @@
 
 		/* テーブルから検索 */
-		a_fbs_id.ptr->hdr.target = ENOD_NOT_MATCH_ID;
+		a_fbs_id.ptr->hdr.target.id = ENOD_NOT_MATCH_ID;
 		a_enodid = (a_eobj->enodid == 0) ? fa_deoj : a_eobj->enodid;
 		a_enod = &eobjinib_table[a_enodid - 1];
 		if ((a_enod->eobjatr == EOBJ_LOCAL_NODE)
 			|| ((a_enod->eobjatr == EOBJ_ASYNC_REMOTE_NODE) && (fa_esv == ESV_GET))) {
-			a_fbs_id.ptr->hdr.target = ENOD_LOCAL_ID;
+			a_fbs_id.ptr->hdr.target.id = ENOD_LOCAL_ID;
 		}
 		else{
@@ -440,9 +440,9 @@
 					continue;
 
-				a_fbs_id.ptr->hdr.target = (ECN_ENOD_ID)(i + ENOD_REMOTE_ID - 1);
+				a_fbs_id.ptr->hdr.target.id = (ECN_ENOD_ID)(i + ENOD_REMOTE_ID - 1);
 				break;
 			}
 		}
-		if (a_fbs_id.ptr->hdr.target == ENOD_NOT_MATCH_ID) {
+		if (a_fbs_id.ptr->hdr.target.id == ENOD_NOT_MATCH_ID) {
 			goto lb_except;
 			ECN_DBG_PUT("deoj = %02X %02X %02x : enod not match",
@@ -470,5 +470,5 @@
 			memcpy(&((T_EDATA *)a_fbs_id.ptr)->hdr.edata.deoj, &eoj,
 				sizeof(((T_EDATA *)a_fbs_id.ptr)->hdr.edata.deoj));
-			a_fbs_id.ptr->hdr.target = enodid;
+			a_fbs_id.ptr->hdr.target.id = enodid;
 		}
 		else {
@@ -491,11 +491,11 @@
 #endif
 	a_fbs_id.ptr->hdr.type = ECN_MSG_ECHONET;
-	a_fbs_id.ptr->hdr.sender = ENOD_API_ID;
+	a_fbs_id.ptr->hdr.sender.id = ENOD_API_ID;
 	if (fa_esv == ESV_INFC)
-		a_fbs_id.ptr->hdr.reply = a_fbs_id.ptr->hdr.target;
+		a_fbs_id.ptr->hdr.reply.id = a_fbs_id.ptr->hdr.target.id;
 	else if (fa_esv == ESV_INF_REQ)
-		a_fbs_id.ptr->hdr.reply = ENOD_MULTICAST_ID;
+		a_fbs_id.ptr->hdr.reply.id = ENOD_MULTICAST_ID;
 	else
-		a_fbs_id.ptr->hdr.reply = ENOD_API_ID;
+		a_fbs_id.ptr->hdr.reply.id = ENOD_API_ID;
 
 	/* 正常終了 */
@@ -603,7 +603,7 @@
 
 			a_fbs.ptr->hdr.type = ECN_MSG_ECHONET;
-			a_fbs.ptr->hdr.sender = ENOD_LOCAL_ID;
-			a_fbs.ptr->hdr.target = ENOD_MULTICAST_ID;
-			a_fbs.ptr->hdr.reply = ENOD_LOCAL_ID;
+			a_fbs.ptr->hdr.sender.id = ENOD_LOCAL_ID;
+			a_fbs.ptr->hdr.target.id = ENOD_MULTICAST_ID;
+			a_fbs.ptr->hdr.reply.id = ENOD_LOCAL_ID;
 			((T_EDATA *)a_fbs.ptr)->hdr.ecn_prp.pdc = 1;	/* 件数 */
 			/* 件数を格納 */
@@ -711,4 +711,43 @@
 }
 
+/*
+ * 電文の構成要素数とサイズのチェックを行う
+ */
+static bool_t _ecn_tsk_check_format(T_EDATA *edata, int len)
+{
+	ER ret;
+	T_ENUM_EPC enm;
+	int opc;
+	uint8_t epc;
+	uint8_t pdc;
+
+	len -= sizeof(T_ECN_HDR) + sizeof(T_ECN_EDATA_BODY);
+
+	ret = ecn_itr_ini(&enm, edata);
+	if (ret != E_OK) {
+		return false;
+	}
+	opc = enm.count;
+	for (;;) {
+		ret = ecn_itr_nxt(&enm, &epc, &pdc, NULL);
+		if (enm.is_eof)
+			break;
+		if (ret == E_BOVR){
+			if (opc != 0)
+				return false;
+			opc = enm.count;
+			len -= 1;
+			continue;
+		}
+		if (ret != E_OK)
+			break;
+
+		opc--;
+		len -= sizeof(T_ECN_PRP) + pdc;
+	}
+
+	return (opc == 0) && (len == 0);
+}
+
 static int _ecn_tsk_ecn_msg_main(ECN_FBS_ID fa_fbs_id, const EOBJINIB *p_obj, ATR eobjatr,
 	const EOBJINIB *p_sobj, ATR sobjatr);
@@ -739,12 +778,40 @@
 	if (p_esv->ecn_hdr.ehd1 != ECN_EDH1_ECHONET_LITE
 	||	p_esv->ecn_hdr.ehd2 != ECN_EDH2_FORMAT_1) {
-		syslog(LOG_WARNING, "_ecn_tsk_ecn_msg() format fault: 0x%02X,0x%02X", p_esv->ecn_hdr.ehd1, p_esv->ecn_hdr.ehd2);
+		ECN_DBG_PUT("_ecn_tsk_ecn_msg() format fault: 0x%02X,0x%02X", p_esv->ecn_hdr.ehd1, p_esv->ecn_hdr.ehd2);
 		return;
 	}
 
+	if (p_esv->edata.deoj.eojx3 > 0x7F) {
+		ECN_DBG_PUT("_ecn_tsk_ecn_msg() format fault: deoj %06X",
+			p_esv->edata.deoj.eojx1 << 16 | p_esv->edata.deoj.eojx2 << 8 | p_esv->edata.deoj.eojx3);
+		return;
+	}
+
+	if ((p_esv->edata.seoj.eojx3 > 0x7F) || (p_esv->edata.seoj.eojx3 == 0x00)) {
+		ECN_DBG_PUT("_ecn_tsk_ecn_msg() format fault: seoj %06X",
+			p_esv->edata.seoj.eojx1 << 16 | p_esv->edata.seoj.eojx2 << 8 | p_esv->edata.seoj.eojx3);
+		return;
+	}
+
+	if ((p_esv->edata.esv & 0xC0) != 0x40) {
+		ECN_DBG_PUT("_ecn_tsk_ecn_msg() format fault: esv 0x%02X", p_esv->edata.esv);
+		return;
+	}
+
+	if (p_esv->edata.opc == 0x00) {
+		ECN_DBG_PUT("_ecn_tsk_ecn_msg() format fault: opc 0x%02X", p_esv->edata.opc);
+		return;
+	}
+
+	/* 電文の構成要素数とサイズのチェックを行う */
+	if (!_ecn_tsk_check_format((T_EDATA *)fa_fbs_id.ptr, fa_fbs_id.ptr->hdr.length)) {
+		ECN_DBG_PUT("_ecn_tsk_ecn_msg() format fault");
+		return;
+	}
+
 	/* 送信宛からノードを検索 */
-	p_nod = _ecn_eno_fnd(fa_fbs_id.ptr->hdr.target);
+	p_nod = _ecn_eno_fnd(fa_fbs_id.ptr->hdr.target.id);
 	/* 送信元からノードを検索 */
-	sender = fa_fbs_id.ptr->hdr.sender;
+	sender = fa_fbs_id.ptr->hdr.sender.id;
 	p_snod = _ecn_eno_fnd(sender);
 	if (p_snod != NULL) {
@@ -782,5 +849,5 @@
 				a_prc = true;
 			}
-			/* 0x74 プロパティ値通知（応答要）の場合処理したことにする */
+			/* 0x74 プロパティ値通知（応答要）の場合の場合は電文破棄 */
 			else if (p_esv->edata.esv == ESV_INFC) {
 				a_prc = true;
@@ -815,4 +882,9 @@
 				a_prc = true;
 			}
+
+			/* 機器オブジェクトが見つからず、0x74 プロパティ値通知（応答要）の場合は電文破棄 */
+			if (!a_prc && (p_esv->edata.esv == ESV_INFC)) {
+				a_prc = true;
+			}
 		}
 	}
@@ -832,5 +904,5 @@
 		ECN_CAP_PUT("redirect ecn_svc_mailboxid → ecn_api_mailboxid (esv:0x%02X)",
 			p_esv->edata.esv);
-		fa_fbs_id.ptr->hdr.target = ENOD_API_ID;
+		fa_fbs_id.ptr->hdr.target.id = ENOD_API_ID;
 		a_ret = psnd_dtq(ecn_api_mailboxid, (intptr_t)fa_fbs_id.ptr);
 		if (a_ret != E_OK) {
@@ -899,5 +971,5 @@
 			break;
 		}
-		fa_fbs_id.ptr->hdr.reply = ENOD_MULTICAST_ID;
+		fa_fbs_id.ptr->hdr.reply.id = ENOD_MULTICAST_ID;
 		_ecn_tsk_eoj_get(p_obj, eobjatr, false, (EPC_RULE_GET|EPC_RULE_ANNO), fa_fbs_id, ESV_INF, ESV_INF_SNA); /* 0x73; 0x53 */
 		result = 0;
@@ -919,9 +991,12 @@
 	case ESV_INFC:
 		if (!p_sobj)
-			_ecn_tsk_eoj_res(fa_fbs_id, ESV_INFC_RES, ESV_INFC_RES); /* 0x74; 0 */
+			/* 送信元が未知の他ノードであった場合、応答を返す */
+			_ecn_tsk_eoj_res(fa_fbs_id, ESV_INFC_RES, ESV_INFC_RES); /* 0x7A; 0x7A */
 		else if (fromapp)
+			/* アプリケーションからの要求の場合、プロパティ値通知（応答要）を送信する */
 			_ecn_tsk_eoj_get(p_sobj, sobjatr, true, (EPC_RULE_GET|EPC_RULE_ANNO), fa_fbs_id, ESV_INFC, ESV_NOP); /* 0x74; 0 */
 		else
-			_ecn_tsk_eoj_set(p_sobj, sobjatr, fromapp, true, fa_fbs_id, ESV_INFC_RES, ESV_INFC_RES, &a_fbs_anno); /* 0x7A; 0 */
+			/* 送信元が既知の他ノードであった場合、プロパティ値を更新し応答を返す */
+			_ecn_tsk_eoj_set(p_sobj, sobjatr, fromapp, true, fa_fbs_id, ESV_INFC_RES, ESV_INFC_RES, &a_fbs_anno); /* 0x7A; 0x7A */
 		result = 0;
 		break;
@@ -1030,6 +1105,5 @@
 	}
 	ECN_DBG_PUT("_ecn_tsk_eoj_get_property(0x%02X-0x%02X-0x%02X, epc:0x%02X) not found.",
-		fp_obj->eojx1, fp_obj->eojx2, fp_obj->eojx3,
-		fa_epc);
+		fp_obj->eojx1, fp_obj->eojx2, fp_obj->eojx3, fa_epc);
 
 	return NULL;
@@ -1044,6 +1118,5 @@
 		return -1;
 
-	ECN_DBG_PUT("_ecn_tsk_eoj_set_edt(epc:0x%02X) call eprpset()",
-		fp_prp->eprpcd);
+	ECN_DBG_PUT("_ecn_tsk_eoj_set_edt(epc:0x%02X) call eprpset()", fp_prp->eprpcd);
 
 	return fp_prp->eprpset(fp_prp, fp_src, fa_srcsz, fa_anno);
@@ -1058,6 +1131,5 @@
 		return -1;
 
-	ECN_DBG_PUT("_ecn_tsk_eoj_get_edt(epc:0x%02X) call eprpget()",
-		fp_prp->eprpcd);
+	ECN_DBG_PUT("_ecn_tsk_eoj_get_edt(epc:0x%02X) call eprpget()", fp_prp->eprpcd);
 
 	return fp_prp->eprpget(fp_prp, fp_dst, fp_prp->eprpsz);
@@ -1428,7 +1500,7 @@
 {
 	fa_rsp_fbs.ptr->hdr.type = ECN_MSG_ECHONET;
-	fa_rsp_fbs.ptr->hdr.sender = ENOD_LOCAL_ID;
-	fa_rsp_fbs.ptr->hdr.target = fp_req_ptr->hdr.reply;
-	fa_rsp_fbs.ptr->hdr.reply = ENOD_LOCAL_ID;
+	fa_rsp_fbs.ptr->hdr.sender.id = ENOD_LOCAL_ID;
+	fa_rsp_fbs.ptr->hdr.target.id = fp_req_ptr->hdr.reply.id;
+	fa_rsp_fbs.ptr->hdr.reply.id = ENOD_LOCAL_ID;
 }
 
@@ -1597,4 +1669,9 @@
 		/* 設定処理失敗 */
 		((T_EDATA *)a_fbs_res.ptr)->hdr.edata.esv = fa_sna_esv;
+
+		/* 不可応答の場合は個別送信する */
+		if (a_fbs_res.ptr->hdr.target.id == ENOD_MULTICAST_ID) {
+			a_fbs_res.ptr->hdr.target.id = fa_fbs_id.ptr->hdr.sender.id;
+		}
 	}
 	/* 応答送信 */
@@ -1928,7 +2005,7 @@
 	/* 要求電文設定 */
 	a_fbs_id.ptr->hdr.type = ECN_MSG_USER_BREAK;
-	a_fbs_id.ptr->hdr.sender = ENOD_API_ID;
-	a_fbs_id.ptr->hdr.target = ENOD_API_ID;
-	a_fbs_id.ptr->hdr.reply = ENOD_API_ID;
+	a_fbs_id.ptr->hdr.sender.id = ENOD_API_ID;
+	a_fbs_id.ptr->hdr.target.id = ENOD_API_ID;
+	a_fbs_id.ptr->hdr.reply.id = ENOD_API_ID;
 
 	if (0 < fa_size && p_dat) {
@@ -1976,7 +2053,7 @@
 
 	req.ptr->hdr.type = ECN_MSG_INTERNAL;
-	req.ptr->hdr.sender_mbxid = sender;
-	req.ptr->hdr.target_mbxid = ecn_svc_mailboxid;
-	req.ptr->hdr.reply_mbxid = sender;
+	req.ptr->hdr.sender.mbxid = sender;
+	req.ptr->hdr.target.mbxid = ecn_svc_mailboxid;
+	req.ptr->hdr.reply.mbxid = sender;
 
 	*pk_req = req;
@@ -2005,7 +2082,7 @@
 
 	res.ptr->hdr.type = ECN_MSG_INTERNAL;
-	res.ptr->hdr.sender_mbxid = ecn_svc_mailboxid;
-	res.ptr->hdr.target_mbxid = req.ptr->hdr.reply_mbxid;
-	res.ptr->hdr.reply_mbxid = ecn_svc_mailboxid;
+	res.ptr->hdr.sender.mbxid = ecn_svc_mailboxid;
+	res.ptr->hdr.target.mbxid = req.ptr->hdr.reply.mbxid;
+	res.ptr->hdr.reply.mbxid = ecn_svc_mailboxid;
 
 	*pk_res = res;
Index: uKadecot/trunk/ecnl_ssp/echonet_uip_task.c
===================================================================
--- uKadecot/trunk/ecnl_ssp/echonet_uip_task.c	(revision 263)
+++ uKadecot/trunk/ecnl_ssp/echonet_uip_task.c	(revision 265)
@@ -127,6 +127,6 @@
 	}
 	a_fbs_id.ptr->hdr.type = ECN_MSG_ECHONET;
-	a_fbs_id.ptr->hdr.target = ENOD_LOCAL_ID;
-	a_fbs_id.ptr->hdr.sender = ENOD_NOT_MATCH_ID;
+	a_fbs_id.ptr->hdr.target.id = ENOD_LOCAL_ID;
+	a_fbs_id.ptr->hdr.sender.id = ENOD_NOT_MATCH_ID;
 
 	/* IPアドレスからリモートECHONETノードへ変換 */
@@ -137,7 +137,7 @@
 	} else {
 		/* 送信元ECHONETノードを記録 */
-		a_fbs_id.ptr->hdr.sender = a_enod_id;
-	}
-	a_fbs_id.ptr->hdr.reply = a_fbs_id.ptr->hdr.sender;
+		a_fbs_id.ptr->hdr.sender.id = a_enod_id;
+	}
+	a_fbs_id.ptr->hdr.reply.id = a_fbs_id.ptr->hdr.sender.id;
 
 	/* echonet_taskに送る */
@@ -301,7 +301,7 @@
 
 	req.ptr->hdr.type = ECN_MSG_INTERNAL;
-	req.ptr->hdr.sender_mbxid = sender;
-	req.ptr->hdr.target_mbxid = ecn_udp_mailboxid;
-	req.ptr->hdr.reply_mbxid = sender;
+	req.ptr->hdr.sender.mbxid = sender;
+	req.ptr->hdr.target.mbxid = ecn_udp_mailboxid;
+	req.ptr->hdr.reply.mbxid = sender;
 
 	*pk_req = req;
@@ -330,7 +330,7 @@
 
 	res.ptr->hdr.type = ECN_MSG_INTERNAL;
-	res.ptr->hdr.sender_mbxid = ecn_udp_mailboxid;
-	res.ptr->hdr.target_mbxid = req.ptr->hdr.reply_mbxid;
-	res.ptr->hdr.reply_mbxid = ecn_udp_mailboxid;
+	res.ptr->hdr.sender.mbxid = ecn_udp_mailboxid;
+	res.ptr->hdr.target.mbxid = req.ptr->hdr.reply.mbxid;
+	res.ptr->hdr.reply.mbxid = ecn_udp_mailboxid;
 
 	*pk_res = res;
@@ -395,5 +395,5 @@
 		}
 
-		a_ret = psnd_dtq(buf.ptr->hdr.target_mbxid, (intptr_t)buf.ptr);
+		a_ret = psnd_dtq(buf.ptr->hdr.target.mbxid, (intptr_t)buf.ptr);
 		if (a_ret != E_OK) {
 			_ecn_fbs_del(buf);
@@ -418,5 +418,5 @@
 	}
 
-	a_ret = psnd_dtq(buf.ptr->hdr.target_mbxid, (intptr_t)buf.ptr);
+	a_ret = psnd_dtq(buf.ptr->hdr.target.mbxid, (intptr_t)buf.ptr);
 	if (a_ret != E_OK) {
 		_ecn_fbs_del(buf);
@@ -441,5 +441,5 @@
 	a_dst.portno = 0;
 	/* 送信先IPアドレス */
-	a_ret = udp_get_ip(&a_dst, fbs_id.ptr->hdr.target);
+	a_ret = udp_get_ip(&a_dst, fbs_id.ptr->hdr.target.id);
 	if (!a_ret) {
 		ECN_DBG_PUT("[UDP TSK] echonet-node 0x%02X-0x%02X-0x%02X → udp dest(%s)",
