linux/include/linux/atmdev.h

/* SPDX-License-Identifier: GPL-2.0 */
/* atmdev.h - ATM device driver declarations and various related items */
#ifndef LINUX_ATMDEV_H
#define LINUX_ATMDEV_H


#include <linux/wait.h> /* wait_queue_head_t */
#include <linux/time.h> /* struct timeval */
#include <linux/net.h>
#include <linux/bug.h>
#include <linux/skbuff.h> /* struct sk_buff */
#include <linux/uio.h>
#include <net/sock.h>
#include <linux/atomic.h>
#include <linux/refcount.h>
#include <uapi/linux/atmdev.h>

#ifdef CONFIG_PROC_FS
#include <linux/proc_fs.h>

extern struct proc_dir_entry *atm_proc_root;
#endif

#ifdef CONFIG_COMPAT
#include <linux/compat.h>
struct compat_atm_iobuf {};
#endif

struct k_atm_aal_stats {};


struct k_atm_dev_stats {};

struct device;

enum {};


#define ATM_VF2VS(flags)


enum {};


#define ATM_PHY_SIG_LOST
#define ATM_PHY_SIG_UNKNOWN
#define ATM_PHY_SIG_FOUND

#define ATM_ATMOPT_CLP

struct atm_vcc {};

static inline struct atm_vcc *atm_sk(struct sock *sk)
{}

static inline struct atm_vcc *ATM_SD(struct socket *sock)
{}

static inline struct sock *sk_atm(struct atm_vcc *vcc)
{}

struct atm_dev_addr {};

enum atm_addr_type_t {};

struct atm_dev {};

 
/* OF: send_Oam Flags */

#define ATM_OF_IMMED
#define ATM_OF_INRATE

struct atmdev_ops {};

struct atmphy_ops {};

struct atm_skb_data {} __packed;

#define VCC_HTABLE_SIZE

extern struct hlist_head vcc_hash[VCC_HTABLE_SIZE];
extern rwlock_t vcc_sklist_lock;

#define ATM_SKB(skb)

struct atm_dev *atm_dev_register(const char *type, struct device *parent,
				 const struct atmdev_ops *ops,
				 int number, /* -1 == pick first available */
				 unsigned long *flags);
struct atm_dev *atm_dev_lookup(int number);
void atm_dev_deregister(struct atm_dev *dev);

/* atm_dev_signal_change
 *
 * Propagate lower layer signal change in atm_dev->signal to netdevice.
 * The event will be sent via a notifier call chain.
 */
void atm_dev_signal_change(struct atm_dev *dev, char signal);

void vcc_insert_socket(struct sock *sk);

void atm_dev_release_vccs(struct atm_dev *dev);

static inline void atm_account_tx(struct atm_vcc *vcc, struct sk_buff *skb)
{}

static inline void atm_force_charge(struct atm_vcc *vcc,int truesize)
{}


static inline void atm_return(struct atm_vcc *vcc,int truesize)
{}


static inline int atm_may_send(struct atm_vcc *vcc,unsigned int size)
{}


static inline void atm_dev_hold(struct atm_dev *dev)
{}


static inline void atm_dev_put(struct atm_dev *dev)
{}


int atm_charge(struct atm_vcc *vcc,int truesize);
struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size,
    gfp_t gfp_flags);
int atm_pcr_goal(const struct atm_trafprm *tp);

void vcc_release_async(struct atm_vcc *vcc, int reply);

struct atm_ioctl {};

/**
 * register_atm_ioctl - register handler for ioctl operations
 *
 * Special (non-device) handlers of ioctl's should
 * register here. If you're a normal device, you should
 * set .ioctl in your atmdev_ops instead.
 */
void register_atm_ioctl(struct atm_ioctl *);

/**
 * deregister_atm_ioctl - remove the ioctl handler
 */
void deregister_atm_ioctl(struct atm_ioctl *);


/* register_atmdevice_notifier - register atm_dev notify events
 *
 * Clients like br2684 will register notify events
 * Currently we notify of signal found/lost
 */
int register_atmdevice_notifier(struct notifier_block *nb);
void unregister_atmdevice_notifier(struct notifier_block *nb);

#endif