File:  [ELWIX - Embedded LightWeight unIX -] / ansh / inc / utils.h
Revision 1.1.1.1.2.4: download - view: text, annotated - select for diffs - revision graph
Thu Oct 13 14:29:30 2011 UTC (12 years, 8 months ago) by misho
Branches: ansh1_0
Diff to: branchpoint 1.1.1.1: preferred, colored
new features::
- reordering instructions in clients
- add sequence number in ansh protocol
- detect lost packets

/*************************************************************************
 * (C) 2011 AITNET - Sofia/Bulgaria - <office@aitnet.org>
 *  by Michael Pounov <misho@elwix.org>
 *
 * $Author: misho $
 * $Id: utils.h,v 1.1.1.1.2.4 2011/10/13 14:29:30 misho Exp $
 *
 *************************************************************************/
#ifndef __UTILS_H
#define __UTILS_H


void Get1stEth(char *, int);
int PrepareL2(const char *, int *);
int PrepareL3(const struct sockaddr *, int *);

char icmpRecv(int, u_int * __restrict, u_short * __restrict, u_int * __restrict, u_char * __restrict, 
		int * __restrict, struct sockaddr *, socklen_t *);
int icmpSend(int, u_int, u_short, char, u_int, u_char *, int, struct sockaddr *, socklen_t);
char pktRecv(int, u_int * __restrict, u_int * __restrict, u_char * __restrict, int * __restrict, struct ether_header*);
int pktSend(int, u_int, char, u_int, u_char *, int, struct ether_addr*);

void *TOfunc(sched_task_t *);

u_char *cryptBuffer(u_char *, int, u_int);


#endif

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>