libosmocore 1.9.0.196-9975
Osmocom core library
osmo_io_poll.c File Reference

New osmocom async I/O API. More...

#include "../config.h"
#include <errno.h>
#include <stdio.h>
#include <talloc.h>
#include <unistd.h>
#include <stdbool.h>
#include <sys/socket.h>
#include <osmocom/core/osmo_io.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/logging.h>
#include <osmocom/core/msgb.h>
#include <osmocom/core/select.h>
#include <osmocom/core/socket.h>
#include <osmocom/core/utils.h>
#include "osmo_io_internal.h"

Functions

static void iofd_poll_ofd_cb_recvmsg_sendmsg (struct osmo_fd *ofd, unsigned int what)
 
static int iofd_poll_ofd_cb_dispatch (struct osmo_fd *ofd, unsigned int what)
 
static int iofd_poll_register (struct osmo_io_fd *iofd)
 
static int iofd_poll_unregister (struct osmo_io_fd *iofd)
 
static int iofd_poll_close (struct osmo_io_fd *iofd)
 
static void iofd_poll_read_enable (struct osmo_io_fd *iofd)
 
static void iofd_poll_read_disable (struct osmo_io_fd *iofd)
 
static void iofd_poll_write_enable (struct osmo_io_fd *iofd)
 
static void iofd_poll_write_disable (struct osmo_io_fd *iofd)
 
static void iofd_poll_notify_connected (struct osmo_io_fd *iofd)
 

Variables

const struct iofd_backend_ops iofd_poll_ops
 

Detailed Description

New osmocom async I/O API.

(C) 2022 by Harald Welte lafor.nosp@m.ge@o.nosp@m.smoco.nosp@m.m.or.nosp@m.g (C) 2022-2023 by sysmocom - s.f.m.c. GmbH info@.nosp@m.sysm.nosp@m.ocom..nosp@m.de Author: Daniel Willmann dwill.nosp@m.mann.nosp@m.@sysm.nosp@m.ocom.nosp@m..de

All Rights Reserved.

SPDX-License-Identifier: GPL-2.0+

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Function Documentation

◆ iofd_poll_close()

static int iofd_poll_close ( struct osmo_io_fd iofd)
static

◆ iofd_poll_notify_connected()

static void iofd_poll_notify_connected ( struct osmo_io_fd iofd)
static

◆ iofd_poll_ofd_cb_dispatch()

static int iofd_poll_ofd_cb_dispatch ( struct osmo_fd ofd,
unsigned int  what 
)
static

◆ iofd_poll_ofd_cb_recvmsg_sendmsg()

◆ iofd_poll_read_disable()

static void iofd_poll_read_disable ( struct osmo_io_fd iofd)
static

◆ iofd_poll_read_enable()

static void iofd_poll_read_enable ( struct osmo_io_fd iofd)
static

◆ iofd_poll_register()

◆ iofd_poll_unregister()

static int iofd_poll_unregister ( struct osmo_io_fd iofd)
static

◆ iofd_poll_write_disable()

static void iofd_poll_write_disable ( struct osmo_io_fd iofd)
static

◆ iofd_poll_write_enable()

static void iofd_poll_write_enable ( struct osmo_io_fd iofd)
static

Variable Documentation

◆ iofd_poll_ops

const struct iofd_backend_ops iofd_poll_ops
Initial value:
= {
.register_fd = iofd_poll_register,
.unregister_fd = iofd_poll_unregister,
.close = iofd_poll_close,
.write_enable = iofd_poll_write_enable,
.write_disable = iofd_poll_write_disable,
.read_enable = iofd_poll_read_enable,
.read_disable = iofd_poll_read_disable,
.notify_connected = iofd_poll_notify_connected,
}
static int iofd_poll_unregister(struct osmo_io_fd *iofd)
Definition: osmo_io_poll.c:140
static void iofd_poll_read_enable(struct osmo_io_fd *iofd)
Definition: osmo_io_poll.c:160
static void iofd_poll_write_disable(struct osmo_io_fd *iofd)
Definition: osmo_io_poll.c:175
static void iofd_poll_write_enable(struct osmo_io_fd *iofd)
Definition: osmo_io_poll.c:170
static void iofd_poll_notify_connected(struct osmo_io_fd *iofd)
Definition: osmo_io_poll.c:180
static int iofd_poll_register(struct osmo_io_fd *iofd)
Definition: osmo_io_poll.c:126
static void iofd_poll_read_disable(struct osmo_io_fd *iofd)
Definition: osmo_io_poll.c:165
static int iofd_poll_close(struct osmo_io_fd *iofd)
Definition: osmo_io_poll.c:152

Referenced by __attribute__(), and iofd_poll_ofd_cb_recvmsg_sendmsg().