Motr  M0
ping.h File Reference
#include "lib/bitmap.h"
#include "lib/types.h"
#include <stdio.h>
Include dependency graph for ping.h:

Go to the source code of this file.

Data Structures

struct  ping_ops
 
struct  ping_ctx
 

Macros

#define __MOTR_NET_BULK_MEM_PING_H__
 
#define PING_ERR(fmt, ...)   fprintf(stderr, fmt , ## __VA_ARGS__)
 

Enumerations

enum  { PING_PORT1 = 12345, PING_PORT2 = 27183, PART3_SERVER_ID = 141421 }
 

Functions

void ping_server (struct ping_ctx *ctx)
 
void ping_server_should_stop (struct ping_ctx *ctx)
 
int ping_client_init (struct ping_ctx *ctx, struct m0_net_end_point **server_ep)
 
int ping_client_fini (struct ping_ctx *ctx, struct m0_net_end_point *server_ep)
 
int ping_client_msg_send_recv (struct ping_ctx *ctx, struct m0_net_end_point *server_ep, const char *data)
 
int ping_client_passive_recv (struct ping_ctx *ctx, struct m0_net_end_point *server_ep)
 
int ping_client_passive_send (struct ping_ctx *ctx, struct m0_net_end_point *server_ep, const char *data)
 

Macro Definition Documentation

◆ __MOTR_NET_BULK_MEM_PING_H__

#define __MOTR_NET_BULK_MEM_PING_H__

Definition at line 26 of file ping.h.

◆ PING_ERR

#define PING_ERR (   fmt,
  ... 
)    fprintf(stderr, fmt , ## __VA_ARGS__)

Definition at line 80 of file ping.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
PING_PORT1 
PING_PORT2 
PART3_SERVER_ID 

Definition at line 69 of file ping.h.

Function Documentation

◆ ping_client_fini()

int ping_client_fini ( struct ping_ctx ctx,
struct m0_net_end_point server_ep 
)

Definition at line 1292 of file ping.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ping_client_init()

int ping_client_init ( struct ping_ctx ctx,
struct m0_net_end_point **  server_ep 
)

Definition at line 1261 of file ping.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ping_client_msg_send_recv()

int ping_client_msg_send_recv ( struct ping_ctx ctx,
struct m0_net_end_point server_ep,
const char *  data 
)

Test an RPC-like exchange, sending data in a message to the server and getting back a response.

Parameters
ctxclient context
server_ependpoint of the server
datadata to send, or NULL to send a default "ping"
Return values
0successful test
-errnofailed to send to server

Definition at line 1007 of file ping.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ping_client_passive_recv()

int ping_client_passive_recv ( struct ping_ctx ctx,
struct m0_net_end_point server_ep 
)

Definition at line 1088 of file ping.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ping_client_passive_send()

int ping_client_passive_send ( struct ping_ctx ctx,
struct m0_net_end_point server_ep,
const char *  data 
)

Definition at line 1172 of file ping.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ping_server()

void ping_server ( struct ping_ctx ctx)

Definition at line 907 of file ping.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ping_server_should_stop()

void ping_server_should_stop ( struct ping_ctx ctx)

Definition at line 990 of file ping.c.

Here is the call graph for this function:
Here is the caller graph for this function: