My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Macros | Functions | Variables
baremetal_socket_msu.c File Reference
#include "baremetal/baremetal_socket_msu.h"
#include "baremetal/baremetal_msu.h"
#include "local_msu.h"
#include "epollops.h"
#include "logging.h"
#include "msu_message.h"
#include "runtime_dfg.h"
#include "communication.h"
#include "msu_calls.h"
#include "unused_def.h"
#include <stdlib.h>

Go to the source code of this file.

Macros

#define MAX_RECV_BUF_LEN   64
 
#define BAREMETAL_EPOLL_TIMEOUT   1000
 
#define BAREMETAL_EPOLL_BATCH   1000
 
#define INIT_SYNTAX   "<PORT> <N_HOPS>"
 

Functions

static int read_and_forward (int fd, void UNUSED *v_state)
 
static int socket_handler_main_loop (struct local_msu *self)
 
static int bm_sock_receive (struct local_msu *self, struct msu_msg *data)
 
static int bm_sock_init (struct local_msu *self, struct msu_init_data *init_data)
 

Variables

static struct local_msustatic_self
 
static int static_n_hops
 
static int static_sock_fd
 
static int static_epoll_fd
 
static struct msu_msg_key self_key = {}
 
struct msu_type BAREMETAL_SOCK_MSU_TYPE
 

Macro Definition Documentation

#define BAREMETAL_EPOLL_BATCH   1000

Definition at line 51 of file baremetal_socket_msu.c.

#define BAREMETAL_EPOLL_TIMEOUT   1000

Definition at line 50 of file baremetal_socket_msu.c.

#define INIT_SYNTAX   "<PORT> <N_HOPS>"

Definition at line 74 of file baremetal_socket_msu.c.

#define MAX_RECV_BUF_LEN   64

Definition at line 14 of file baremetal_socket_msu.c.

Function Documentation

static int bm_sock_init ( struct local_msu self,
struct msu_init_data init_data 
)
static

Definition at line 76 of file baremetal_socket_msu.c.

static int bm_sock_receive ( struct local_msu self,
struct msu_msg data 
)
static

Definition at line 64 of file baremetal_socket_msu.c.

static int read_and_forward ( int  fd,
void UNUSED v_state 
)
static

Definition at line 21 of file baremetal_socket_msu.c.

static int socket_handler_main_loop ( struct local_msu self)
static

Definition at line 53 of file baremetal_socket_msu.c.

Variable Documentation

struct msu_type BAREMETAL_SOCK_MSU_TYPE
Initial value:
= {
.name = "baremetal_sock_msu",
.init = bm_sock_init,
.receive = bm_sock_receive
}
#define BAREMETAL_SOCK_MSU_TYPE_ID
static int bm_sock_init(struct local_msu *self, struct msu_init_data *init_data)
static int bm_sock_receive(struct local_msu *self, struct msu_msg *data)

Definition at line 116 of file baremetal_socket_msu.c.

struct msu_msg_key self_key = {}
static

Definition at line 62 of file baremetal_socket_msu.c.

int static_epoll_fd
static

Definition at line 19 of file baremetal_socket_msu.c.

int static_n_hops
static

Definition at line 17 of file baremetal_socket_msu.c.

struct local_msu* static_self
static

Definition at line 16 of file baremetal_socket_msu.c.

int static_sock_fd
static

Definition at line 18 of file baremetal_socket_msu.c.