Added a protocol of TFTP.

This commit is contained in:
Jim Jun
2015-02-23 13:12:34 +09:00
parent 461b1b16b1
commit 97857ce12c
4 changed files with 930 additions and 0 deletions

19
Internet/TFTP/netutil.h Normal file
View File

@ -0,0 +1,19 @@
#ifndef __NETUTIL_H__
#define __NETUTIL_H__
#include <stdint.h>
#define SYSTEM_LITTLE_ENDIAN
int8_t* inet_ntoa(uint32_t addr);
int8_t* inet_ntoa_pad(uint32_t addr);
uint32_t inet_addr(uint8_t* addr);
uint16_t swaps(uint16_t i);
uint32_t swapl(uint32_t l);
uint16_t htons(uint16_t hostshort);
uint32_t htonl(uint32_t hostlong);
uint32_t ntohs(uint16_t netshort);
uint32_t ntohl(uint32_t netlong);
#endif