#ifndef SPIKE_DCERPC_H
#define SPIKE_DCERPC_H

#include "spike.h"

#define BINDPACKET "0x0b"
#define REQUESTPACKET "0x00"
#define AUTH3PACKET "0x10"
#define FLAGS "0x03"
#define FIRSTFRAG 0x01
#define LASTFRAG 0x02
#define DCE_BIND_ACK 0x0c
#define DCE_FAULT 0x03
#define MAXDCEFRAGLENGTH 5840

/*5840 is real length as posed by MS*/

int
s_dce_bind(char * uuid,char * transfer_syntax,
	   unsigned int callid, unsigned int interfaceversionmajor,
	   unsigned int interfaceversionminor,
	   unsigned int syntaxversion);

int 
s_dce_string(unsigned char * mystring);

int
s_dce_call_header(int callid, int allochint, unsigned short opnum, int first, int last);

int
s_random_dce_string();

int 
s_dce_wordstring(unsigned char * mystring);

/*takes in a buffer and funnels all that data down to it*/
/*assumes bind has already been done*/
int
s_do_dce_call(unsigned short function_number,unsigned char * buffer, unsigned int length);


#endif
