Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of libMiMic by
Diff: core/uip/NyLPC_uip.h
- Revision:
- 69:8c5f220441f5
- Parent:
- 63:157ee3202edb
--- a/core/uip/NyLPC_uip.h Thu May 22 12:59:50 2014 +0000 +++ b/core/uip/NyLPC_uip.h Thu May 29 14:29:15 2014 +0000 @@ -256,12 +256,21 @@ /** * IPヘッダの長さを返す。 */ -#define NyLPC_TIPv4Header_getHeaderLength(i_iph) ((i_iph->vhl & 0x0f)*4) +#define NyLPC_TIPv4Header_getHeaderLength(i_iph) (((i_iph)->vhl & 0x0f)*4) /** * IPパケット全体の長さを返す。 */ #define NyLPC_TIPv4Header_getPacketLength(i_iph) (NyLPC_ntohs((i_iph)->len16)) +/** + * IPヘッダを送信パケット用に設定する。 + * ipid16にはコールされるたびに新しい値を設定する。 + * ipcecksumには0を設定する。 + * この関数は、パケットサイズ,ローカルIP/リモートIPの設定はしない。 + */ +void NyLPC_TIPv4Header_writeTxIpHeader( + struct NyLPC_TIPv4Header* i_struct, + NyLPC_TUInt8 i_proto); /********************************************************************** * * struct NyLPC_TIPv6Header
