<commit_before>#ifndef LIBTRADING_FIX_SESSION_H
#define LIBTRADING_FIX_SESSION_H

#include "libtrading/proto/fix_message.h"

#include "libtrading/buffer.h"

#include <stdbool.h>

#define RECV_BUFFER_SIZE	4096UL
#define FIX_TX_HEAD_BUFFER_SIZE	FIX_MAX_HEAD_LEN
#define FIX_TX_BODY_BUFFER_SIZE	FIX_MAX_BODY_LEN

struct fix_message;

enum fix_version {
	FIXT_1_1,
	FIX_4_4,
	FIX_4_3,
	FIX_4_2,
	FIX_4_1,
	FIX_4_0,
};

struct fix_dialect {
	enum fix_version	version;
	enum fix_type		(*tag_type)(int tag);
};

extern struct fix_dialect	fix_dialects[];

struct fix_session_cfg {
	char			sender_comp_id[32];
	char			target_comp_id[32];
	char			password[32];
	int			heartbtint;
	struct fix_dialect	*dialect;
	int			sockfd;
};

struct fix_session {
	struct fix_dialect		*dialect;
	int				sockfd;
	bool				active;
	const char			*password;
	const char			*begin_string;
	const char			*sender_comp_id;
	const char			*target_comp_id;

	unsigned long			in_msg_seq_num;
	unsigned long			out_msg_seq_num;
<commit_msg>FIX: fix_version enumeration ordering<commit_after>#ifndef LIBTRADING_FIX_SESSION_H
#define LIBTRADING_FIX_SESSION_H

#include "libtrading/proto/fix_message.h"

#include "libtrading/buffer.h"

#include <stdbool.h>

#define RECV_BUFFER_SIZE	4096UL
#define FIX_TX_HEAD_BUFFER_SIZE	FIX_MAX_HEAD_LEN
#define FIX_TX_BODY_BUFFER_SIZE	FIX_MAX_BODY_LEN

struct fix_message;

enum fix_version {
	FIX_4_0,
	FIX_4_1,
	FIX_4_2,
	FIX_4_3,
	FIX_4_4,
	FIX_5_0,
	FIXT_1_1,
};

struct fix_dialect {
	enum fix_version	version;
	enum fix_type		(*tag_type)(int tag);
};

extern struct fix_dialect	fix_dialects[];

struct fix_session_cfg {
	char			sender_comp_id[32];
	char			target_comp_id[32];
	char			password[32];
	int			heartbtint;
	struct fix_dialect	*dialect;
	int			sockfd;
};

struct fix_session {
	struct fix_dialect		*dialect;
	int				sockfd;
	bool				active;
	const char			*password;
	const char			*begin_string;
	const char			*sender_comp_id;
	const char			*target_comp_id;

	unsigned long			in_msg_seq_num;
	unsigned long			out_msg_seq_num;

{'fraction_non_alphanumeric': 0.07669616519174041, 'fraction_numerical': 0.02261553588987217, 'mean_word_length': 5.204268292682927, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6800290', 'n_tokens_mistral': 942, 'n_tokens_neox': 876, 'n_words': 172}