str_to_gensio_accepter(3)

NAME
str_to_gensio_accepter - Create a gensio accepter from a string

SYNOPSIS
#include <gensio/gensio.h>

int str_to_gensio_accepter(const char *str,
    struct gensio_os_funcs *o,
    gensio_accepter_event cb,
    void *user_data,
    struct gensio_accepter **acc);

int str_to_gensio_accepter_child(struct gensio_accepter *child,
    const char *str,
    struct gensio_os_funcs *o,
    gensio_accepter_event cb,
    void *user_data,
    struct gensio_accepter **acc);

DESCRIPTION
str_to_gensio_accepter allocates a new gensio accepter stack based upon the given string str. The cb and user_data parameters set a function that will be called when events come in on the gensio accepter. user_data is unused by the gensio stack itself, it is there for the user and may be anything the user wishes. The new gensio accepter is returned in acc. It will be in the shutdown state.

RETURN VALUES
Zero is returned on success, or a gensio error on failure.

SEE ALSO
gensio_acc_set_callback(3), gensio_err(3), gensio(5)