/* SPDX-License-Identifier: GPL-2.0-or-later */ /* SCTP kernel implementation * (C) Copyright IBM Corp. 2001, 2004 * Copyright (c) 1999-2000 Cisco, Inc. * Copyright (c) 1999-2001 Motorola, Inc. * Copyright (c) 2001 Intel Corp. * Copyright (c) 2001 Nokia, Inc. * Copyright (c) 2001 La Monte H.P. Yarroll * * These are the definitions needed for the sctp_ulpevent type. The * sctp_ulpevent type is used to carry information from the state machine * upwards to the ULP. * * This file is part of the SCTP kernel implementation * * Please send any bug reports or fixes you make to the * email address(es): * lksctp developers <linux-sctp@vger.kernel.org> * * Written or modified by: * Jon Grimm <jgrimm@us.ibm.com> * La Monte H.P. Yarroll <piggy@acm.org> * Karl Knutson <karl@athena.chicago.il.us> * Sridhar Samudrala <sri@us.ibm.com>
*/
/* A structure to carry information to the ULP (e.g. Sockets API) */ /* Warning: This sits inside an skb.cb[] area. Be very careful of * growing this structure as it is at the maximum limit now. * * sctp_ulpevent is saved in sk->cb(48 bytes), whose last 4 bytes * have been taken by sock_skb_cb, So here it has to use 'packed' * to make sctp_ulpevent fit into the rest 44 bytes.
*/ struct sctp_ulpevent { struct sctp_association *asoc; struct sctp_chunk *chunk; unsignedint rmem_len; union {
__u32 mid;
__u16 ssn;
}; union {
__u32 ppid;
__u32 fsn;
};
__u32 tsn;
__u32 cumtsn;
__u16 stream;
__u16 flags;
__u16 msg_flags;
} __packed;
/* Is this event type enabled? */ staticinlinebool sctp_ulpevent_type_enabled(__u16 subscribe, __u16 sn_type)
{ if (sn_type > SCTP_SN_TYPE_MAX) returnfalse;
/* Given an event subscription, is this event enabled? */ staticinlinebool sctp_ulpevent_is_enabled(conststruct sctp_ulpevent *event,
__u16 subscribe)
{
__u16 sn_type;
if (!sctp_ulpevent_is_notification(event)) returntrue;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.