#ifndef _SPE_WEPCRACK_SPU_H
#define _SPE_WEPCRACK_SPU_H

/* These events are used by the mailbox transactions */
/* The lower 8 bits are reserved for the job ID */
#define EVENT_DONE  1<<8 
#define EVENT_CRACK 1<<9
#define EVENT_ERROR 1<<10

#define EVENT_START 1<<11
#define EVENT_STOP  1<<12
#define EVENT_CONT  1<<13

#define JOB_RUN  0
#define JOB_STOP 1


#include <stdint.h>
#include <sys/time.h>

struct wepcrack_job_struct {
        uint64_t job;          // the job id
        uint64_t keysize;      // in bytes, with IV prepended, (e.g. 8 or 16) 
        uint64_t start_key_hi; // iv + key, all zeros for 64b wep
        uint64_t start_key_lo; // iv + key
        uint64_t stop_key_hi;  // iv + key, all zeros for 64b wep
        uint64_t stop_key_lo;  // iv + key

		uint64_t curr_key_hi;  
        uint64_t curr_key_lo;
		
        uint64_t prga_to_match; 
        uint64_t status;
		struct timeval start;
} __attribute__ ((aligned (128)));

typedef struct wepcrack_job_struct wepcrack_job_t; 

#endif
