18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Declarations of X.25 Packet Layer type objects. 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * History 68c2ecf20Sopenharmony_ci * nov/17/96 Jonathan Naylor Initial version. 78c2ecf20Sopenharmony_ci * mar/20/00 Daniela Squassoni Disabling/enabling of facilities 88c2ecf20Sopenharmony_ci * negotiation. 98c2ecf20Sopenharmony_ci */ 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci#ifndef _X25_H 128c2ecf20Sopenharmony_ci#define _X25_H 138c2ecf20Sopenharmony_ci#include <linux/x25.h> 148c2ecf20Sopenharmony_ci#include <linux/slab.h> 158c2ecf20Sopenharmony_ci#include <linux/refcount.h> 168c2ecf20Sopenharmony_ci#include <net/sock.h> 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci#define X25_ADDR_LEN 16 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci#define X25_MAX_L2_LEN 18 /* 802.2 LLC */ 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci#define X25_STD_MIN_LEN 3 238c2ecf20Sopenharmony_ci#define X25_EXT_MIN_LEN 4 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci#define X25_GFI_SEQ_MASK 0x30 268c2ecf20Sopenharmony_ci#define X25_GFI_STDSEQ 0x10 278c2ecf20Sopenharmony_ci#define X25_GFI_EXTSEQ 0x20 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci#define X25_Q_BIT 0x80 308c2ecf20Sopenharmony_ci#define X25_D_BIT 0x40 318c2ecf20Sopenharmony_ci#define X25_STD_M_BIT 0x10 328c2ecf20Sopenharmony_ci#define X25_EXT_M_BIT 0x01 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci#define X25_CALL_REQUEST 0x0B 358c2ecf20Sopenharmony_ci#define X25_CALL_ACCEPTED 0x0F 368c2ecf20Sopenharmony_ci#define X25_CLEAR_REQUEST 0x13 378c2ecf20Sopenharmony_ci#define X25_CLEAR_CONFIRMATION 0x17 388c2ecf20Sopenharmony_ci#define X25_DATA 0x00 398c2ecf20Sopenharmony_ci#define X25_INTERRUPT 0x23 408c2ecf20Sopenharmony_ci#define X25_INTERRUPT_CONFIRMATION 0x27 418c2ecf20Sopenharmony_ci#define X25_RR 0x01 428c2ecf20Sopenharmony_ci#define X25_RNR 0x05 438c2ecf20Sopenharmony_ci#define X25_REJ 0x09 448c2ecf20Sopenharmony_ci#define X25_RESET_REQUEST 0x1B 458c2ecf20Sopenharmony_ci#define X25_RESET_CONFIRMATION 0x1F 468c2ecf20Sopenharmony_ci#define X25_REGISTRATION_REQUEST 0xF3 478c2ecf20Sopenharmony_ci#define X25_REGISTRATION_CONFIRMATION 0xF7 488c2ecf20Sopenharmony_ci#define X25_RESTART_REQUEST 0xFB 498c2ecf20Sopenharmony_ci#define X25_RESTART_CONFIRMATION 0xFF 508c2ecf20Sopenharmony_ci#define X25_DIAGNOSTIC 0xF1 518c2ecf20Sopenharmony_ci#define X25_ILLEGAL 0xFD 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_ci/* Define the various conditions that may exist */ 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ci#define X25_COND_ACK_PENDING 0x01 568c2ecf20Sopenharmony_ci#define X25_COND_OWN_RX_BUSY 0x02 578c2ecf20Sopenharmony_ci#define X25_COND_PEER_RX_BUSY 0x04 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_ci/* Define Link State constants. */ 608c2ecf20Sopenharmony_cienum { 618c2ecf20Sopenharmony_ci X25_STATE_0, /* Ready */ 628c2ecf20Sopenharmony_ci X25_STATE_1, /* Awaiting Call Accepted */ 638c2ecf20Sopenharmony_ci X25_STATE_2, /* Awaiting Clear Confirmation */ 648c2ecf20Sopenharmony_ci X25_STATE_3, /* Data Transfer */ 658c2ecf20Sopenharmony_ci X25_STATE_4, /* Awaiting Reset Confirmation */ 668c2ecf20Sopenharmony_ci X25_STATE_5 /* Call Accepted / Call Connected pending */ 678c2ecf20Sopenharmony_ci}; 688c2ecf20Sopenharmony_ci 698c2ecf20Sopenharmony_cienum { 708c2ecf20Sopenharmony_ci X25_LINK_STATE_0, 718c2ecf20Sopenharmony_ci X25_LINK_STATE_1, 728c2ecf20Sopenharmony_ci X25_LINK_STATE_2, 738c2ecf20Sopenharmony_ci X25_LINK_STATE_3 748c2ecf20Sopenharmony_ci}; 758c2ecf20Sopenharmony_ci 768c2ecf20Sopenharmony_ci#define X25_DEFAULT_T20 (180 * HZ) /* Default T20 value */ 778c2ecf20Sopenharmony_ci#define X25_DEFAULT_T21 (200 * HZ) /* Default T21 value */ 788c2ecf20Sopenharmony_ci#define X25_DEFAULT_T22 (180 * HZ) /* Default T22 value */ 798c2ecf20Sopenharmony_ci#define X25_DEFAULT_T23 (180 * HZ) /* Default T23 value */ 808c2ecf20Sopenharmony_ci#define X25_DEFAULT_T2 (3 * HZ) /* Default ack holdback value */ 818c2ecf20Sopenharmony_ci 828c2ecf20Sopenharmony_ci#define X25_DEFAULT_WINDOW_SIZE 2 /* Default Window Size */ 838c2ecf20Sopenharmony_ci#define X25_DEFAULT_PACKET_SIZE X25_PS128 /* Default Packet Size */ 848c2ecf20Sopenharmony_ci#define X25_DEFAULT_THROUGHPUT 0x0A /* Deafult Throughput */ 858c2ecf20Sopenharmony_ci#define X25_DEFAULT_REVERSE 0x00 /* Default Reverse Charging */ 868c2ecf20Sopenharmony_ci 878c2ecf20Sopenharmony_ci#define X25_SMODULUS 8 888c2ecf20Sopenharmony_ci#define X25_EMODULUS 128 898c2ecf20Sopenharmony_ci 908c2ecf20Sopenharmony_ci/* 918c2ecf20Sopenharmony_ci * X.25 Facilities constants. 928c2ecf20Sopenharmony_ci */ 938c2ecf20Sopenharmony_ci 948c2ecf20Sopenharmony_ci#define X25_FAC_CLASS_MASK 0xC0 958c2ecf20Sopenharmony_ci 968c2ecf20Sopenharmony_ci#define X25_FAC_CLASS_A 0x00 978c2ecf20Sopenharmony_ci#define X25_FAC_CLASS_B 0x40 988c2ecf20Sopenharmony_ci#define X25_FAC_CLASS_C 0x80 998c2ecf20Sopenharmony_ci#define X25_FAC_CLASS_D 0xC0 1008c2ecf20Sopenharmony_ci 1018c2ecf20Sopenharmony_ci#define X25_FAC_REVERSE 0x01 /* also fast select */ 1028c2ecf20Sopenharmony_ci#define X25_FAC_THROUGHPUT 0x02 1038c2ecf20Sopenharmony_ci#define X25_FAC_PACKET_SIZE 0x42 1048c2ecf20Sopenharmony_ci#define X25_FAC_WINDOW_SIZE 0x43 1058c2ecf20Sopenharmony_ci 1068c2ecf20Sopenharmony_ci#define X25_MAX_FAC_LEN 60 1078c2ecf20Sopenharmony_ci#define X25_MAX_CUD_LEN 128 1088c2ecf20Sopenharmony_ci 1098c2ecf20Sopenharmony_ci#define X25_FAC_CALLING_AE 0xCB 1108c2ecf20Sopenharmony_ci#define X25_FAC_CALLED_AE 0xC9 1118c2ecf20Sopenharmony_ci 1128c2ecf20Sopenharmony_ci#define X25_MARKER 0x00 1138c2ecf20Sopenharmony_ci#define X25_DTE_SERVICES 0x0F 1148c2ecf20Sopenharmony_ci#define X25_MAX_AE_LEN 40 /* Max num of semi-octets in AE - OSI Nw */ 1158c2ecf20Sopenharmony_ci#define X25_MAX_DTE_FACIL_LEN 21 /* Max length of DTE facility params */ 1168c2ecf20Sopenharmony_ci 1178c2ecf20Sopenharmony_ci/* Bitset in x25_sock->flags for misc flags */ 1188c2ecf20Sopenharmony_ci#define X25_Q_BIT_FLAG 0 1198c2ecf20Sopenharmony_ci#define X25_INTERRUPT_FLAG 1 1208c2ecf20Sopenharmony_ci#define X25_ACCPT_APPRV_FLAG 2 1218c2ecf20Sopenharmony_ci 1228c2ecf20Sopenharmony_ci/** 1238c2ecf20Sopenharmony_ci * struct x25_route - x25 routing entry 1248c2ecf20Sopenharmony_ci * @node - entry in x25_list_lock 1258c2ecf20Sopenharmony_ci * @address - Start of address range 1268c2ecf20Sopenharmony_ci * @sigdigits - Number of sig digits 1278c2ecf20Sopenharmony_ci * @dev - More than one for MLP 1288c2ecf20Sopenharmony_ci * @refcnt - reference counter 1298c2ecf20Sopenharmony_ci */ 1308c2ecf20Sopenharmony_cistruct x25_route { 1318c2ecf20Sopenharmony_ci struct list_head node; 1328c2ecf20Sopenharmony_ci struct x25_address address; 1338c2ecf20Sopenharmony_ci unsigned int sigdigits; 1348c2ecf20Sopenharmony_ci struct net_device *dev; 1358c2ecf20Sopenharmony_ci refcount_t refcnt; 1368c2ecf20Sopenharmony_ci}; 1378c2ecf20Sopenharmony_ci 1388c2ecf20Sopenharmony_cistruct x25_neigh { 1398c2ecf20Sopenharmony_ci struct list_head node; 1408c2ecf20Sopenharmony_ci struct net_device *dev; 1418c2ecf20Sopenharmony_ci unsigned int state; 1428c2ecf20Sopenharmony_ci unsigned int extended; 1438c2ecf20Sopenharmony_ci struct sk_buff_head queue; 1448c2ecf20Sopenharmony_ci unsigned long t20; 1458c2ecf20Sopenharmony_ci struct timer_list t20timer; 1468c2ecf20Sopenharmony_ci unsigned long global_facil_mask; 1478c2ecf20Sopenharmony_ci refcount_t refcnt; 1488c2ecf20Sopenharmony_ci}; 1498c2ecf20Sopenharmony_ci 1508c2ecf20Sopenharmony_cistruct x25_sock { 1518c2ecf20Sopenharmony_ci struct sock sk; 1528c2ecf20Sopenharmony_ci struct x25_address source_addr, dest_addr; 1538c2ecf20Sopenharmony_ci struct x25_neigh *neighbour; 1548c2ecf20Sopenharmony_ci unsigned int lci, cudmatchlength; 1558c2ecf20Sopenharmony_ci unsigned char state, condition; 1568c2ecf20Sopenharmony_ci unsigned short vs, vr, va, vl; 1578c2ecf20Sopenharmony_ci unsigned long t2, t21, t22, t23; 1588c2ecf20Sopenharmony_ci unsigned short fraglen; 1598c2ecf20Sopenharmony_ci unsigned long flags; 1608c2ecf20Sopenharmony_ci struct sk_buff_head ack_queue; 1618c2ecf20Sopenharmony_ci struct sk_buff_head fragment_queue; 1628c2ecf20Sopenharmony_ci struct sk_buff_head interrupt_in_queue; 1638c2ecf20Sopenharmony_ci struct sk_buff_head interrupt_out_queue; 1648c2ecf20Sopenharmony_ci struct timer_list timer; 1658c2ecf20Sopenharmony_ci struct x25_causediag causediag; 1668c2ecf20Sopenharmony_ci struct x25_facilities facilities; 1678c2ecf20Sopenharmony_ci struct x25_dte_facilities dte_facilities; 1688c2ecf20Sopenharmony_ci struct x25_calluserdata calluserdata; 1698c2ecf20Sopenharmony_ci unsigned long vc_facil_mask; /* inc_call facilities mask */ 1708c2ecf20Sopenharmony_ci}; 1718c2ecf20Sopenharmony_ci 1728c2ecf20Sopenharmony_cistruct x25_forward { 1738c2ecf20Sopenharmony_ci struct list_head node; 1748c2ecf20Sopenharmony_ci unsigned int lci; 1758c2ecf20Sopenharmony_ci struct net_device *dev1; 1768c2ecf20Sopenharmony_ci struct net_device *dev2; 1778c2ecf20Sopenharmony_ci atomic_t refcnt; 1788c2ecf20Sopenharmony_ci}; 1798c2ecf20Sopenharmony_ci 1808c2ecf20Sopenharmony_cistatic inline struct x25_sock *x25_sk(const struct sock *sk) 1818c2ecf20Sopenharmony_ci{ 1828c2ecf20Sopenharmony_ci return (struct x25_sock *)sk; 1838c2ecf20Sopenharmony_ci} 1848c2ecf20Sopenharmony_ci 1858c2ecf20Sopenharmony_ci/* af_x25.c */ 1868c2ecf20Sopenharmony_ciextern int sysctl_x25_restart_request_timeout; 1878c2ecf20Sopenharmony_ciextern int sysctl_x25_call_request_timeout; 1888c2ecf20Sopenharmony_ciextern int sysctl_x25_reset_request_timeout; 1898c2ecf20Sopenharmony_ciextern int sysctl_x25_clear_request_timeout; 1908c2ecf20Sopenharmony_ciextern int sysctl_x25_ack_holdback_timeout; 1918c2ecf20Sopenharmony_ciextern int sysctl_x25_forward; 1928c2ecf20Sopenharmony_ci 1938c2ecf20Sopenharmony_ciint x25_parse_address_block(struct sk_buff *skb, 1948c2ecf20Sopenharmony_ci struct x25_address *called_addr, 1958c2ecf20Sopenharmony_ci struct x25_address *calling_addr); 1968c2ecf20Sopenharmony_ci 1978c2ecf20Sopenharmony_ciint x25_addr_ntoa(unsigned char *, struct x25_address *, struct x25_address *); 1988c2ecf20Sopenharmony_ciint x25_addr_aton(unsigned char *, struct x25_address *, struct x25_address *); 1998c2ecf20Sopenharmony_cistruct sock *x25_find_socket(unsigned int, struct x25_neigh *); 2008c2ecf20Sopenharmony_civoid x25_destroy_socket_from_timer(struct sock *); 2018c2ecf20Sopenharmony_ciint x25_rx_call_request(struct sk_buff *, struct x25_neigh *, unsigned int); 2028c2ecf20Sopenharmony_civoid x25_kill_by_neigh(struct x25_neigh *); 2038c2ecf20Sopenharmony_ci 2048c2ecf20Sopenharmony_ci/* x25_dev.c */ 2058c2ecf20Sopenharmony_civoid x25_send_frame(struct sk_buff *, struct x25_neigh *); 2068c2ecf20Sopenharmony_ciint x25_lapb_receive_frame(struct sk_buff *, struct net_device *, 2078c2ecf20Sopenharmony_ci struct packet_type *, struct net_device *); 2088c2ecf20Sopenharmony_civoid x25_establish_link(struct x25_neigh *); 2098c2ecf20Sopenharmony_civoid x25_terminate_link(struct x25_neigh *); 2108c2ecf20Sopenharmony_ci 2118c2ecf20Sopenharmony_ci/* x25_facilities.c */ 2128c2ecf20Sopenharmony_ciint x25_parse_facilities(struct sk_buff *, struct x25_facilities *, 2138c2ecf20Sopenharmony_ci struct x25_dte_facilities *, unsigned long *); 2148c2ecf20Sopenharmony_ciint x25_create_facilities(unsigned char *, struct x25_facilities *, 2158c2ecf20Sopenharmony_ci struct x25_dte_facilities *, unsigned long); 2168c2ecf20Sopenharmony_ciint x25_negotiate_facilities(struct sk_buff *, struct sock *, 2178c2ecf20Sopenharmony_ci struct x25_facilities *, 2188c2ecf20Sopenharmony_ci struct x25_dte_facilities *); 2198c2ecf20Sopenharmony_civoid x25_limit_facilities(struct x25_facilities *, struct x25_neigh *); 2208c2ecf20Sopenharmony_ci 2218c2ecf20Sopenharmony_ci/* x25_forward.c */ 2228c2ecf20Sopenharmony_civoid x25_clear_forward_by_lci(unsigned int lci); 2238c2ecf20Sopenharmony_civoid x25_clear_forward_by_dev(struct net_device *); 2248c2ecf20Sopenharmony_ciint x25_forward_data(int, struct x25_neigh *, struct sk_buff *); 2258c2ecf20Sopenharmony_ciint x25_forward_call(struct x25_address *, struct x25_neigh *, struct sk_buff *, 2268c2ecf20Sopenharmony_ci int); 2278c2ecf20Sopenharmony_ci 2288c2ecf20Sopenharmony_ci/* x25_in.c */ 2298c2ecf20Sopenharmony_ciint x25_process_rx_frame(struct sock *, struct sk_buff *); 2308c2ecf20Sopenharmony_ciint x25_backlog_rcv(struct sock *, struct sk_buff *); 2318c2ecf20Sopenharmony_ci 2328c2ecf20Sopenharmony_ci/* x25_link.c */ 2338c2ecf20Sopenharmony_civoid x25_link_control(struct sk_buff *, struct x25_neigh *, unsigned short); 2348c2ecf20Sopenharmony_civoid x25_link_device_up(struct net_device *); 2358c2ecf20Sopenharmony_civoid x25_link_device_down(struct net_device *); 2368c2ecf20Sopenharmony_civoid x25_link_established(struct x25_neigh *); 2378c2ecf20Sopenharmony_civoid x25_link_terminated(struct x25_neigh *); 2388c2ecf20Sopenharmony_civoid x25_transmit_clear_request(struct x25_neigh *, unsigned int, 2398c2ecf20Sopenharmony_ci unsigned char); 2408c2ecf20Sopenharmony_civoid x25_transmit_link(struct sk_buff *, struct x25_neigh *); 2418c2ecf20Sopenharmony_ciint x25_subscr_ioctl(unsigned int, void __user *); 2428c2ecf20Sopenharmony_cistruct x25_neigh *x25_get_neigh(struct net_device *); 2438c2ecf20Sopenharmony_civoid x25_link_free(void); 2448c2ecf20Sopenharmony_ci 2458c2ecf20Sopenharmony_ci/* x25_neigh.c */ 2468c2ecf20Sopenharmony_cistatic __inline__ void x25_neigh_hold(struct x25_neigh *nb) 2478c2ecf20Sopenharmony_ci{ 2488c2ecf20Sopenharmony_ci refcount_inc(&nb->refcnt); 2498c2ecf20Sopenharmony_ci} 2508c2ecf20Sopenharmony_ci 2518c2ecf20Sopenharmony_cistatic __inline__ void x25_neigh_put(struct x25_neigh *nb) 2528c2ecf20Sopenharmony_ci{ 2538c2ecf20Sopenharmony_ci if (refcount_dec_and_test(&nb->refcnt)) 2548c2ecf20Sopenharmony_ci kfree(nb); 2558c2ecf20Sopenharmony_ci} 2568c2ecf20Sopenharmony_ci 2578c2ecf20Sopenharmony_ci/* x25_out.c */ 2588c2ecf20Sopenharmony_ciint x25_output(struct sock *, struct sk_buff *); 2598c2ecf20Sopenharmony_civoid x25_kick(struct sock *); 2608c2ecf20Sopenharmony_civoid x25_enquiry_response(struct sock *); 2618c2ecf20Sopenharmony_ci 2628c2ecf20Sopenharmony_ci/* x25_route.c */ 2638c2ecf20Sopenharmony_cistruct x25_route *x25_get_route(struct x25_address *addr); 2648c2ecf20Sopenharmony_cistruct net_device *x25_dev_get(char *); 2658c2ecf20Sopenharmony_civoid x25_route_device_down(struct net_device *dev); 2668c2ecf20Sopenharmony_ciint x25_route_ioctl(unsigned int, void __user *); 2678c2ecf20Sopenharmony_civoid x25_route_free(void); 2688c2ecf20Sopenharmony_ci 2698c2ecf20Sopenharmony_cistatic __inline__ void x25_route_hold(struct x25_route *rt) 2708c2ecf20Sopenharmony_ci{ 2718c2ecf20Sopenharmony_ci refcount_inc(&rt->refcnt); 2728c2ecf20Sopenharmony_ci} 2738c2ecf20Sopenharmony_ci 2748c2ecf20Sopenharmony_cistatic __inline__ void x25_route_put(struct x25_route *rt) 2758c2ecf20Sopenharmony_ci{ 2768c2ecf20Sopenharmony_ci if (refcount_dec_and_test(&rt->refcnt)) 2778c2ecf20Sopenharmony_ci kfree(rt); 2788c2ecf20Sopenharmony_ci} 2798c2ecf20Sopenharmony_ci 2808c2ecf20Sopenharmony_ci/* x25_subr.c */ 2818c2ecf20Sopenharmony_civoid x25_clear_queues(struct sock *); 2828c2ecf20Sopenharmony_civoid x25_frames_acked(struct sock *, unsigned short); 2838c2ecf20Sopenharmony_civoid x25_requeue_frames(struct sock *); 2848c2ecf20Sopenharmony_ciint x25_validate_nr(struct sock *, unsigned short); 2858c2ecf20Sopenharmony_civoid x25_write_internal(struct sock *, int); 2868c2ecf20Sopenharmony_ciint x25_decode(struct sock *, struct sk_buff *, int *, int *, int *, int *, 2878c2ecf20Sopenharmony_ci int *); 2888c2ecf20Sopenharmony_civoid x25_disconnect(struct sock *, int, unsigned char, unsigned char); 2898c2ecf20Sopenharmony_ci 2908c2ecf20Sopenharmony_ci/* x25_timer.c */ 2918c2ecf20Sopenharmony_civoid x25_init_timers(struct sock *sk); 2928c2ecf20Sopenharmony_civoid x25_start_heartbeat(struct sock *); 2938c2ecf20Sopenharmony_civoid x25_start_t2timer(struct sock *); 2948c2ecf20Sopenharmony_civoid x25_start_t21timer(struct sock *); 2958c2ecf20Sopenharmony_civoid x25_start_t22timer(struct sock *); 2968c2ecf20Sopenharmony_civoid x25_start_t23timer(struct sock *); 2978c2ecf20Sopenharmony_civoid x25_stop_heartbeat(struct sock *); 2988c2ecf20Sopenharmony_civoid x25_stop_timer(struct sock *); 2998c2ecf20Sopenharmony_ciunsigned long x25_display_timer(struct sock *); 3008c2ecf20Sopenharmony_civoid x25_check_rbuf(struct sock *); 3018c2ecf20Sopenharmony_ci 3028c2ecf20Sopenharmony_ci/* sysctl_net_x25.c */ 3038c2ecf20Sopenharmony_ci#ifdef CONFIG_SYSCTL 3048c2ecf20Sopenharmony_ciint x25_register_sysctl(void); 3058c2ecf20Sopenharmony_civoid x25_unregister_sysctl(void); 3068c2ecf20Sopenharmony_ci#else 3078c2ecf20Sopenharmony_cistatic inline int x25_register_sysctl(void) { return 0; }; 3088c2ecf20Sopenharmony_cistatic inline void x25_unregister_sysctl(void) {}; 3098c2ecf20Sopenharmony_ci#endif /* CONFIG_SYSCTL */ 3108c2ecf20Sopenharmony_ci 3118c2ecf20Sopenharmony_cistruct x25_skb_cb { 3128c2ecf20Sopenharmony_ci unsigned int flags; 3138c2ecf20Sopenharmony_ci}; 3148c2ecf20Sopenharmony_ci#define X25_SKB_CB(s) ((struct x25_skb_cb *) ((s)->cb)) 3158c2ecf20Sopenharmony_ci 3168c2ecf20Sopenharmony_ciextern struct hlist_head x25_list; 3178c2ecf20Sopenharmony_ciextern rwlock_t x25_list_lock; 3188c2ecf20Sopenharmony_ciextern struct list_head x25_route_list; 3198c2ecf20Sopenharmony_ciextern rwlock_t x25_route_list_lock; 3208c2ecf20Sopenharmony_ciextern struct list_head x25_forward_list; 3218c2ecf20Sopenharmony_ciextern rwlock_t x25_forward_list_lock; 3228c2ecf20Sopenharmony_ciextern struct list_head x25_neigh_list; 3238c2ecf20Sopenharmony_ciextern rwlock_t x25_neigh_list_lock; 3248c2ecf20Sopenharmony_ci 3258c2ecf20Sopenharmony_ciint x25_proc_init(void); 3268c2ecf20Sopenharmony_civoid x25_proc_exit(void); 3278c2ecf20Sopenharmony_ci#endif 328