This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
stellar-stellar/test/decoders/socks/dummy.c

151 lines
2.6 KiB
C

#include "dummy.h"
#define UNUSED(x) (void)(x)
int direction;
void session_set_current_state(struct session *sess, enum session_state sess_state)
{
sess->sess_state = sess_state;
return;
}
enum session_state session_get_current_state(const struct session *sess)
{
return sess->sess_state;
}
void dummy_set_direction(int dir)
{
direction = dir;
}
struct logger *stellar_get_logger(struct stellar *st)
{
UNUSED(st);
return NULL;
}
enum flow_type session_get_flow_type(const struct session *sess)
{
UNUSED(sess);
return direction;
}
const struct packet *session_get0_current_packet(const struct session *sess)
{
UNUSED(sess);
return NULL;
}
const char *packet_get_payload(const struct packet *pkt)
{
UNUSED(pkt);
return NULL;
}
uint16_t packet_get_payload_len(const struct packet *pkt)
{
UNUSED(pkt);
return 0;
}
int session_mq_ignore_message(struct session *sess, int topic_id, int plugin_id)
{
UNUSED(sess);
UNUSED(topic_id);
UNUSED(plugin_id);
return 0;
}
int session_exdata_set(struct session *sess, int idx, void *ex_ptr)
{
UNUSED(sess);
UNUSED(idx);
UNUSED(ex_ptr);
return 0;
}
void *session_exdata_get(struct session *sess, int idx)
{
UNUSED(sess);
UNUSED(idx);
return NULL;
}
void stellar_session_plugin_dettach_current_session(struct session *sess)
{
UNUSED(sess);
}
int session_mq_publish_message(struct session *sess, int topic_id, void *msg)
{
UNUSED(sess);
UNUSED(topic_id);
UNUSED(msg);
return 0;
}
const char *session_get0_readable_addr(const struct session *sess)
{
UNUSED(sess);
return NULL;
}
int stellar_exdata_new_index(struct stellar *st, const char *name, stellar_exdata_free *free_func,void *arg)
{
UNUSED(st);
UNUSED(name);
UNUSED(free_func);
UNUSED(arg);
return 0;
}
int stellar_mq_create_topic(struct stellar *st, const char *topic_name, stellar_msg_free_cb_func *msg_free_cb, void *msg_free_arg)
{
UNUSED(st);
UNUSED(topic_name);
UNUSED(msg_free_cb);
UNUSED(msg_free_arg);
return 0;
}
int stellar_mq_get_topic_id(struct stellar *st, const char *topic_name)
{
UNUSED(st);
UNUSED(topic_name);
return 0;
}
int stellar_session_mq_subscribe(struct stellar *st, int topic_id, on_session_msg_cb_func *plugin_on_msg_cb, int plugin_id)
{
UNUSED(st);
UNUSED(topic_id);
UNUSED(plugin_on_msg_cb);
UNUSED(plugin_id);
return 0;
}
int stellar_session_plugin_register(struct stellar *st, session_ctx_new_func session_ctx_new, session_ctx_free_func session_ctx_free, void *plugin_env)
{
UNUSED(st);
UNUSED(session_ctx_new);
UNUSED(session_ctx_free);
UNUSED(plugin_env);
return 0;
}