// 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 Jonathan Naylor Started coding. * X.25 002 Jonathan Naylor Centralised disconnection code. * New timer architecture. * 2000-03-20 Daniela Squassoni Disabling/enabling of facilities * negotiation. * 2000-11-10 Henner Eisen Check and reset for out-of-sequence * i-frames. */ #define pr_fmt(fmt) … #include <linux/slab.h> #include <linux/errno.h> #include <linux/kernel.h> #include <linux/string.h> #include <linux/skbuff.h> #include <net/sock.h> #include <net/tcp_states.h> #include <net/x25.h> static int x25_queue_rx_frame(struct sock *sk, struct sk_buff *skb, int more) { … } /* * State machine for state 1, Awaiting Call Accepted State. * The handling of the timer(s) is in file x25_timer.c. * Handling of state 0 and connection release is in af_x25.c. */ static int x25_state1_machine(struct sock *sk, struct sk_buff *skb, int frametype) { … } /* * State machine for state 2, Awaiting Clear Confirmation State. * The handling of the timer(s) is in file x25_timer.c * Handling of state 0 and connection release is in af_x25.c. */ static int x25_state2_machine(struct sock *sk, struct sk_buff *skb, int frametype) { … } /* * State machine for state 3, Connected State. * The handling of the timer(s) is in file x25_timer.c * Handling of state 0 and connection release is in af_x25.c. */ static int x25_state3_machine(struct sock *sk, struct sk_buff *skb, int frametype, int ns, int nr, int q, int d, int m) { … } /* * State machine for state 4, Awaiting Reset Confirmation State. * The handling of the timer(s) is in file x25_timer.c * Handling of state 0 and connection release is in af_x25.c. */ static int x25_state4_machine(struct sock *sk, struct sk_buff *skb, int frametype) { … } /* * State machine for state 5, Call Accepted / Call Connected pending (X25_ACCPT_APPRV_FLAG). * The handling of the timer(s) is in file x25_timer.c * Handling of state 0 and connection release is in af_x25.c. */ static int x25_state5_machine(struct sock *sk, struct sk_buff *skb, int frametype) { … } /* Higher level upcall for a LAPB frame */ int x25_process_rx_frame(struct sock *sk, struct sk_buff *skb) { … } int x25_backlog_rcv(struct sock *sk, struct sk_buff *skb) { … }