/*
 * ip.h
 *
 * Copyright 2004, Minoru Murashima. All rights reserved.
 * Distributed under the terms of the BSD License.
 */


#ifndef ip_h
#define ip_h


#include<types.h>
#include<net/net.h>
#include<netinet/in.h>
#include<sys/ip.h>


#ifndef ASM_FILE


enum{
	/* IP header TOP value. */
	IP_HEAD_TOS_ICMP=0x0,
	IP_SIZE_MAX = 1500,
};


/* µ¿»÷¥Ø¥Ã¥À¡£ */
typedef struct{
	uint32_t srcip;
	uint32_t dstip;
	uint8_t  tmp;
	uint8_t  prot;
	uint16_t len;
}PSEUDO_HEADER;


extern int transIp(SOCKET*, TRANS_BUF_INFO*, uint, uint16_t);
extern int receiveIp(IP_HEADER*);
extern void setIpTask(SOCKET*, IP_HEADER*);
extern int initIp();


#endif


#endif
