// SPDX-License-Identifier: GPL-2.0-or-later /* * * Copyright (C) Jonathan Naylor G4KLX ([email protected]) * * Most of this code is based on the SDL diagrams published in the 7th ARRL * Computer Networking Conference papers. The diagrams have mistakes in them, * but are mostly correct. Before you modify the code could you read the SDL * diagrams as the code is not obvious and probably very easy to break. */ #include <linux/errno.h> #include <linux/filter.h> #include <linux/types.h> #include <linux/socket.h> #include <linux/in.h> #include <linux/kernel.h> #include <linux/timer.h> #include <linux/string.h> #include <linux/sockios.h> #include <linux/net.h> #include <net/ax25.h> #include <linux/inet.h> #include <linux/netdevice.h> #include <linux/skbuff.h> #include <net/sock.h> #include <net/tcp_states.h> #include <linux/fcntl.h> #include <linux/mm.h> #include <linux/interrupt.h> #include <net/rose.h> /* * State machine for state 1, Awaiting Call Accepted State. * The handling of the timer(s) is in file rose_timer.c. * Handling of state 0 and connection release is in af_rose.c. */ static int rose_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 rose_timer.c * Handling of state 0 and connection release is in af_rose.c. */ static int rose_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 rose_timer.c * Handling of state 0 and connection release is in af_rose.c. */ static int rose_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 rose_timer.c * Handling of state 0 and connection release is in af_rose.c. */ static int rose_state4_machine(struct sock *sk, struct sk_buff *skb, int frametype) { … } /* * State machine for state 5, Awaiting Call Acceptance State. * The handling of the timer(s) is in file rose_timer.c * Handling of state 0 and connection release is in af_rose.c. */ static int rose_state5_machine(struct sock *sk, struct sk_buff *skb, int frametype) { … } /* Higher level upcall for a LAPB frame */ int rose_process_rx_frame(struct sock *sk, struct sk_buff *skb) { … }