PATH:
usr
/
src
/
kernels
/
5.14.0-611.49.1.el9_7.x86_64
/
include
/
net
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _NET_DN_DEV_H #define _NET_DN_DEV_H #include <linux/netdevice.h> struct dn_dev; struct dn_ifaddr { struct dn_ifaddr __rcu *ifa_next; struct dn_dev *ifa_dev; __le16 ifa_local; __le16 ifa_address; __u32 ifa_flags; __u8 ifa_scope; char ifa_label[IFNAMSIZ]; struct rcu_head rcu; }; #define DN_DEV_S_RU 0 /* Run - working normally */ #define DN_DEV_S_CR 1 /* Circuit Rejected */ #define DN_DEV_S_DS 2 /* Data Link Start */ #define DN_DEV_S_RI 3 /* Routing Layer Initialize */ #define DN_DEV_S_RV 4 /* Routing Layer Verify */ #define DN_DEV_S_RC 5 /* Routing Layer Complete */ #define DN_DEV_S_OF 6 /* Off */ #define DN_DEV_S_HA 7 /* Halt */ /* * The dn_dev_parms structure contains the set of parameters * for each device (hence inclusion in the dn_dev structure) * and an array is used to store the default types of supported * device (in dn_dev.c). * * The type field matches the ARPHRD_ constants and is used in * searching the list for supported devices when new devices * come up. * * The mode field is used to find out if a device is broadcast, * multipoint, or pointopoint. Please note that DECnet thinks * different ways about devices to the rest of the kernel * so the normal IFF_xxx flags are invalid here. For devices * which can be any combination of the previously mentioned * attributes, you can set this on a per device basis by * installing an up() routine. * * The device state field, defines the initial state in which the * device will come up. In the dn_dev structure, it is the actual * state. * * Things have changed here. I've killed timer1 since it's a user space * issue for a user space routing deamon to sort out. The kernel does * not need to be bothered with it. * * Timers: * t2 - Rate limit timer, min time between routing and hello messages * t3 - Hello timer, send hello messages when it expires * * Callbacks: * up() - Called to initialize device, return value can veto use of * device with DECnet. * down() - Called to turn device off when it goes down * timer3() - Called once for each ifaddr when timer 3 goes off * * sysctl - Hook for sysctl things * */ struct dn_dev_parms { int type; /* ARPHRD_xxx */ int mode; /* Broadcast, Unicast, Mulitpoint */ #define DN_DEV_BCAST 1 #define DN_DEV_UCAST 2 #define DN_DEV_MPOINT 4 int state; /* Initial state */ int forwarding; /* 0=EndNode, 1=L1Router, 2=L2Router */ unsigned long t2; /* Default value of t2 */ unsigned long t3; /* Default value of t3 */ int priority; /* Priority to be a router */ char *name; /* Name for sysctl */ int (*up)(struct net_device *); void (*down)(struct net_device *); void (*timer3)(struct net_device *, struct dn_ifaddr *ifa); void *sysctl; }; struct dn_dev { struct dn_ifaddr __rcu *ifa_list; struct net_device *dev; struct dn_dev_parms parms; char use_long; struct timer_list timer; unsigned long t3; struct neigh_parms *neigh_parms; __u8 addr[ETH_ALEN]; struct neighbour *router; /* Default router on circuit */ struct neighbour *peer; /* Peer on pointopoint links */ unsigned long uptime; /* Time device went up in jiffies */ }; struct dn_short_packet { __u8 msgflg; __le16 dstnode; __le16 srcnode; __u8 forward; } __packed; struct dn_long_packet { __u8 msgflg; __u8 d_area; __u8 d_subarea; __u8 d_id[6]; __u8 s_area; __u8 s_subarea; __u8 s_id[6]; __u8 nl2; __u8 visit_ct; __u8 s_class; __u8 pt; } __packed; /*------------------------- DRP - Routing messages ---------------------*/ struct endnode_hello_message { __u8 msgflg; __u8 tiver[3]; __u8 id[6]; __u8 iinfo; __le16 blksize; __u8 area; __u8 seed[8]; __u8 neighbor[6]; __le16 timer; __u8 mpd; __u8 datalen; __u8 data[2]; } __packed; struct rtnode_hello_message { __u8 msgflg; __u8 tiver[3]; __u8 id[6]; __u8 iinfo; __le16 blksize; __u8 priority; __u8 area; __le16 timer; __u8 mpd; } __packed; void dn_dev_init(void); void dn_dev_cleanup(void); int dn_dev_ioctl(unsigned int cmd, void __user *arg); void dn_dev_devices_off(void); void dn_dev_devices_on(void); void dn_dev_init_pkt(struct sk_buff *skb); void dn_dev_veri_pkt(struct sk_buff *skb); void dn_dev_hello(struct sk_buff *skb); void dn_dev_up(struct net_device *); void dn_dev_down(struct net_device *); int dn_dev_set_default(struct net_device *dev, int force); struct net_device *dn_dev_get_default(void); int dn_dev_bind_default(__le16 *addr); int register_dnaddr_notifier(struct notifier_block *nb); int unregister_dnaddr_notifier(struct notifier_block *nb); static inline int dn_dev_islocal(struct net_device *dev, __le16 addr) { struct dn_dev *dn_db; struct dn_ifaddr *ifa; int res = 0; rcu_read_lock(); dn_db = rcu_dereference(dev->dn_ptr); if (dn_db == NULL) { printk(KERN_DEBUG "dn_dev_islocal: Called for non DECnet device\n"); goto out; } for (ifa = rcu_dereference(dn_db->ifa_list); ifa != NULL; ifa = rcu_dereference(ifa->ifa_next)) if ((addr ^ ifa->ifa_local) == 0) { res = 1; break; } out: rcu_read_unlock(); return res; } #endif /* _NET_DN_DEV_H */
[+]
..
[-] ipcomp.h
[edit]
[-] mac80211.h
[edit]
[-] switchdev.h
[edit]
[-] psample.h
[edit]
[-] xdp_sock.h
[edit]
[-] xdp.h
[edit]
[-] llc_c_ac.h
[edit]
[-] af_ieee802154.h
[edit]
[-] hwbm.h
[edit]
[-] netrom.h
[edit]
[-] af_rxrpc.h
[edit]
[-] xsk_buff_pool.h
[edit]
[-] bonding.h
[edit]
[+]
page_pool
[-] nl802154.h
[edit]
[-] fq_impl.h
[edit]
[-] dropreason-core.h
[edit]
[-] rsi_91x.h
[edit]
[+]
netfilter
[-] codel_impl.h
[edit]
[-] calipso.h
[edit]
[-] llc_sap.h
[edit]
[+]
caif
[-] xdp_priv.h
[edit]
[-] af_unix.h
[edit]
[-] rtnetlink.h
[edit]
[-] inet_common.h
[edit]
[-] if_inet6.h
[edit]
[-] ah.h
[edit]
[-] netevent.h
[edit]
[-] pkt_sched.h
[edit]
[-] route.h
[edit]
[-] ieee80211_radiotap.h
[edit]
[-] bond_options.h
[edit]
[-] l3mdev.h
[edit]
[-] devlink.h
[edit]
[-] fib_notifier.h
[edit]
[-] seg6.h
[edit]
[-] codel.h
[edit]
[-] act_api.h
[edit]
[-] inet6_hashtables.h
[edit]
[-] rstreason.h
[edit]
[-] ipconfig.h
[edit]
[-] pkt_cls.h
[edit]
[-] rawv6.h
[edit]
[-] ip.h
[edit]
[-] udplite.h
[edit]
[-] fq.h
[edit]
[-] dsa.h
[edit]
[-] gro.h
[edit]
[-] llc_c_ev.h
[edit]
[+]
netns
[-] timewait_sock.h
[edit]
[-] espintcp.h
[edit]
[-] llc_s_st.h
[edit]
[-] dst_metadata.h
[edit]
[-] wext.h
[edit]
[-] sock_reuseport.h
[edit]
[-] net_debug.h
[edit]
[+]
9p
[-] rtnh.h
[edit]
[-] tcp_states.h
[edit]
[-] inetpeer.h
[edit]
[-] flow_offload.h
[edit]
[-] x25.h
[edit]
[-] ieee802154_netdev.h
[edit]
[-] psnap.h
[edit]
[-] secure_seq.h
[edit]
[-] netlink.h
[edit]
[-] ipx.h
[edit]
[-] Space.h
[edit]
[-] eee.h
[edit]
[-] dn_dev.h
[edit]
[-] nsh.h
[edit]
[-] dsfield.h
[edit]
[-] mpls_iptunnel.h
[edit]
[-] datalink.h
[edit]
[-] llc_c_st.h
[edit]
[+]
nfc
[-] dst_cache.h
[edit]
[-] dn_route.h
[edit]
[-] mpls.h
[edit]
[-] xfrm.h
[edit]
[-] rose.h
[edit]
[-] vxlan.h
[edit]
[+]
bluetooth
[-] kcm.h
[edit]
[-] geneve.h
[edit]
[-] tun_proto.h
[edit]
[-] ipv6_frag.h
[edit]
[+]
mana
[-] fib_rules.h
[edit]
[-] udp_tunnel.h
[edit]
[-] rps.h
[edit]
[-] x25device.h
[edit]
[-] gue.h
[edit]
[-] busy_poll.h
[edit]
[-] tc_wrapper.h
[edit]
[-] ip6_route.h
[edit]
[-] icmp.h
[edit]
[-] bond_3ad.h
[edit]
[-] tls_prot.h
[edit]
[-] sock.h
[edit]
[-] ax88796.h
[edit]
[-] mrp.h
[edit]
[-] ip6_fib.h
[edit]
[-] red.h
[edit]
[-] ila.h
[edit]
[-] ip6_tunnel.h
[edit]
[-] pie.h
[edit]
[-] dropreason.h
[edit]
[-] ethoc.h
[edit]
[+]
tc_act
[-] bpf_sk_storage.h
[edit]
[-] dcbevent.h
[edit]
[-] regulatory.h
[edit]
[-] tls_toe.h
[edit]
[-] lapb.h
[edit]
[-] codel_qdisc.h
[edit]
[-] dn_fib.h
[edit]
[-] gtp.h
[edit]
[-] strparser.h
[edit]
[-] gre.h
[edit]
[-] ndisc.h
[edit]
[-] dn_nsp.h
[edit]
[-] ax25.h
[edit]
[-] inet_connection_sock.h
[edit]
[-] neighbour.h
[edit]
[-] af_vsock.h
[edit]
[-] seg6_local.h
[edit]
[-] llc_conn.h
[edit]
[-] llc.h
[edit]
[-] tls.h
[edit]
[-] pptp.h
[edit]
[+]
libeth
[-] failover.h
[edit]
[-] dst_ops.h
[edit]
[-] inet_dscp.h
[edit]
[-] dsa_stubs.h
[edit]
[-] mac802154.h
[edit]
[-] p8022.h
[edit]
[-] gro_cells.h
[edit]
[-] request_sock.h
[edit]
[-] atmclip.h
[edit]
[-] net_ratelimit.h
[edit]
[-] firewire.h
[edit]
[-] dst.h
[edit]
[-] tcx.h
[edit]
[-] rpl.h
[edit]
[-] tipc.h
[edit]
[-] ip_fib.h
[edit]
[-] snmp.h
[edit]
[-] tcp.h
[edit]
[+]
iucv
[-] nexthop.h
[edit]
[-] mptcp.h
[edit]
[-] netdev_queues.h
[edit]
[-] protocol.h
[edit]
[+]
sctp
[-] fou.h
[edit]
[-] inet_sock.h
[edit]
[-] bond_alb.h
[edit]
[-] ipv6.h
[edit]
[-] net_trackers.h
[edit]
[-] 6lowpan.h
[edit]
[-] mld.h
[edit]
[-] raw.h
[edit]
[-] netdev_rx_queue.h
[edit]
[-] garp.h
[edit]
[-] cfg80211-wext.h
[edit]
[-] checksum.h
[edit]
[-] llc_pdu.h
[edit]
[-] cfg80211.h
[edit]
[-] dn.h
[edit]
[-] udp.h
[edit]
[-] stp.h
[edit]
[-] flow.h
[edit]
[-] handshake.h
[edit]
[-] transp_v6.h
[edit]
[-] llc_s_ac.h
[edit]
[-] ip_vs.h
[edit]
[-] mip6.h
[edit]
[-] sch_generic.h
[edit]
[-] ip_tunnels.h
[edit]
[-] smc.h
[edit]
[-] xdp_sock_drv.h
[edit]
[-] inet6_connection_sock.h
[edit]
[-] dn_neigh.h
[edit]
[-] cipso_ipv4.h
[edit]
[-] vsock_addr.h
[edit]
[-] dcbnl.h
[edit]
[-] ife.h
[edit]
[-] lwtunnel.h
[edit]
[-] netlabel.h
[edit]
[-] compat.h
[edit]
[-] gen_stats.h
[edit]
[-] genetlink.h
[edit]
[-] net_shaper.h
[edit]
[-] inet_timewait_sock.h
[edit]
[-] cls_cgroup.h
[edit]
[-] llc_if.h
[edit]
[+]
phonet
[-] erspan.h
[edit]
[-] inet_frag.h
[edit]
[-] inet_ecn.h
[edit]
[-] bareudp.h
[edit]
[-] slhc_vj.h
[edit]
[-] seg6_hmac.h
[edit]
[-] inet_hashtables.h
[edit]
[-] llc_s_ev.h
[edit]
[-] gso.h
[edit]
[-] net_failover.h
[edit]
[-] iw_handler.h
[edit]
[-] selftests.h
[edit]
[-] addrconf.h
[edit]
[-] lag.h
[edit]
[-] esp.h
[edit]
[-] ping.h
[edit]
[-] net_namespace.h
[edit]
[-] ip6_checksum.h
[edit]
[-] macsec.h
[edit]
[-] scm.h
[edit]
[-] arp.h
[edit]
[-] tso.h
[edit]
[-] netprio_cgroup.h
[edit]
[-] ipv6_stubs.h
[edit]
[-] flow_dissector.h
[edit]
[-] cfg802154.h
[edit]
[-] ncsi.h
[edit]