// SPDX-License-Identifier: GPL-2.0-or-later /* * X.25 Packet Layer release 002 * * This is ALPHA test software. This code may break your machine, * randomly fail to work with new releases, misbehave and/or generally * screw up. It might even work. * * This code REQUIRES 2.1.15 or higher * * History * X.25 001 Split from x25_subr.c * mar/20/00 Daniela Squassoni Disabling/enabling of facilities * negotiation. * apr/14/05 Shaun Pereira - Allow fast select with no restriction * on response. */ #define pr_fmt(fmt) … #include <linux/kernel.h> #include <linux/string.h> #include <linux/skbuff.h> #include <net/sock.h> #include <net/x25.h> /** * x25_parse_facilities - Parse facilities from skb into the facilities structs * * @skb: sk_buff to parse * @facilities: Regular facilities, updated as facilities are found * @dte_facs: ITU DTE facilities, updated as DTE facilities are found * @vc_fac_mask: mask is updated with all facilities found * * Return codes: * -1 - Parsing error, caller should drop call and clean up * 0 - Parse OK, this skb has no facilities * >0 - Parse OK, returns the length of the facilities header * */ int x25_parse_facilities(struct sk_buff *skb, struct x25_facilities *facilities, struct x25_dte_facilities *dte_facs, unsigned long *vc_fac_mask) { … } /* * Create a set of facilities. */ int x25_create_facilities(unsigned char *buffer, struct x25_facilities *facilities, struct x25_dte_facilities *dte_facs, unsigned long facil_mask) { … } /* * Try to reach a compromise on a set of facilities. * * The only real problem is with reverse charging. */ int x25_negotiate_facilities(struct sk_buff *skb, struct sock *sk, struct x25_facilities *new, struct x25_dte_facilities *dte) { … } /* * Limit values of certain facilities according to the capability of the * currently attached x25 link. */ void x25_limit_facilities(struct x25_facilities *facilities, struct x25_neigh *nb) { … }