#ifndef __FPS_H_ #define __FPS_H_ #ifdef __cplusplus extern "C" { #endif #include #include #include #define PACKET_BUFFER_SIZE 2048 #define FPS_ADDRESS_SPACE 0x11BA6834 #define MAX_FIELD_NAME 128 typedef void* n_packet; extern n_packet wrap_packet(void* buffer, size_t length); extern void unwrap_packet(n_packet buffer); extern n_packet process_packet(n_packet packet, const char* op_name); extern size_t read_packet_context_usize(n_packet packet, const char* field_name); extern uint8_t read_packet_context_u8(n_packet packet, const char* field_name); extern uint16_t read_packet_context_u16(n_packet packet, const char* field_name); extern uint32_t read_packet_context_u32(n_packet packet, const char* field_name); extern uint64_t read_packet_context_u64(n_packet packet, const char* field_name); extern size_t read_packet_context_field( n_packet packet, const char* field_name, void* field_buffer, size_t buffer_length); extern size_t read_packet_context_string( n_packet packet, const char* field_name, char* char_buffer, size_t buffer_length); extern size_t write_packet_context_usize(n_packet packet, const char* field_name, size_t val); extern uint8_t write_packet_context_u8(n_packet packet, const char* field_name, uint8_t val); extern uint16_t write_packet_context_u16(n_packet packet, const char* field_name, uint16_t val); extern uint32_t write_packet_context_u32(n_packet packet, const char* field_name, uint32_t val); extern uint64_t write_packet_context_u64(n_packet packet, const char* field_name, uint64_t val); extern size_t write_packet_context_field( n_packet packet, const char* field_name, const void* field_buffer, size_t buffer_length); extern size_t write_packet_context_string( n_packet packet, const char* field_name, const char* char_buffer, size_t buffer_length); #ifdef __cplusplus } #endif #endif //__FPS_H_