linux/net/dccp/qpolicy.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 *  net/dccp/qpolicy.c
 *
 *  Policy-based packet dequeueing interface for DCCP.
 *
 *  Copyright (c) 2008 Tomasz Grobelny <[email protected]>
 */
#include "dccp.h"

/*
 *	Simple Dequeueing Policy:
 *	If tx_qlen is different from 0, enqueue up to tx_qlen elements.
 */
static void qpolicy_simple_push(struct sock *sk, struct sk_buff *skb)
{}

static bool qpolicy_simple_full(struct sock *sk)
{}

static struct sk_buff *qpolicy_simple_top(struct sock *sk)
{}

/*
 *	Priority-based Dequeueing Policy:
 *	If tx_qlen is different from 0 and the queue has reached its upper bound
 *	of tx_qlen elements, replace older packets lowest-priority-first.
 */
static struct sk_buff *qpolicy_prio_best_skb(struct sock *sk)
{}

static struct sk_buff *qpolicy_prio_worst_skb(struct sock *sk)
{}

static bool qpolicy_prio_full(struct sock *sk)
{}

/**
 * struct dccp_qpolicy_operations  -  TX Packet Dequeueing Interface
 * @push: add a new @skb to the write queue
 * @full: indicates that no more packets will be admitted
 * @top:  peeks at whatever the queueing policy defines as its `top'
 * @params: parameter passed to policy operation
 */
struct dccp_qpolicy_operations {};

static struct dccp_qpolicy_operations qpol_table[DCCPQ_POLICY_MAX] =;

/*
 *	Externally visible interface
 */
void dccp_qpolicy_push(struct sock *sk, struct sk_buff *skb)
{}

bool dccp_qpolicy_full(struct sock *sk)
{}

void dccp_qpolicy_drop(struct sock *sk, struct sk_buff *skb)
{}

struct sk_buff *dccp_qpolicy_top(struct sock *sk)
{}

struct sk_buff *dccp_qpolicy_pop(struct sock *sk)
{}

bool dccp_qpolicy_param_ok(struct sock *sk, __be32 param)
{}