mtcp_set_uctx

NAME

mtcp_set_uctx − set private per-flow user-context data

SYNOPSIS

#include <mos_api.h>

int mtcp_set_uctx(mctx_t mctx, int sockid, void *uctx);

DESCRIPTION

mtcp_set_uctx() can be used to associate flow-specific monitoring data to a flow record in the application layer. The flow-specific data is stored with the socket that can referred to by the sockid argument. The private data can be stored as a void *. It is the responsibility of the user to free up the private data (if it is dynamically allocated from memory) when the flow record gets deleted from the stack (due to, e.g., connection termination).

The mtcp_set_uctx() call takes an additional argument named mctx that represents the per-core mTCP context in an application (see mtcp_create_context() for details).

AUTHORS

mOS development team <mtcp-user@list.ndsl.kaist.edu>

SEE ALSO

mtcp_socket(), mtcp_get_uctx(),

COLOPHON

This page is part of mOS release 0.3 docs section. A description of the project, and information about reporting bugs, can be found at http://mos.kaist.edu/.