/* Unified function for getting and setting netapi options.  */
static int _get_set(kernel_pid_t pid, uint16_t type, netopt_t opt, uint16_t context, void *data, size_t data_len)
/* Unified function for getting and setting netapi options.  */
static int _get_set(kernel_pid_t pid, uint16_t type, netopt_t opt, uint16_t context, void *data, size_t data_len)
{
    msg_t cmd;
    msg_t ack;
    gnrc_netapi_opt_t o;
    o.opt = opt;
    o.context = context;
    o.data = data;
    o.data_len = data_len;
    cmd.type = type;
    cmd.content.ptr = (void *)&o;
    msg_send_receive(&cmd, &ack, pid);
    return (int)ack.content.value;
}