~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/net/atm/mpoa_caches.h

Version: ~ [ linux-5.2-rc5 ] ~ [ linux-5.1.12 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.53 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.128 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.182 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.182 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.68 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.39.4 ] ~ [ linux-2.6.38.8 ] ~ [ linux-2.6.37.6 ] ~ [ linux-2.6.36.4 ] ~ [ linux-2.6.35.14 ] ~ [ linux-2.6.34.15 ] ~ [ linux-2.6.33.20 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef MPOA_CACHES_H
  2 #define MPOA_CACHES_H
  3 
  4 #include <linux/netdevice.h>
  5 #include <linux/types.h>
  6 #include <linux/atm.h>
  7 #include <linux/atmdev.h>
  8 #include <linux/atmmpc.h>
  9 
 10 struct mpoa_client;
 11 
 12 void atm_mpoa_init_cache(struct mpoa_client *mpc);
 13 
 14 typedef struct in_cache_entry {
 15         struct in_cache_entry *next;
 16         struct in_cache_entry *prev;
 17         struct timeval  tv;
 18         struct timeval  reply_wait;
 19         struct timeval  hold_down;
 20         uint32_t  packets_fwded;
 21         uint16_t  entry_state;
 22         uint32_t retry_time;
 23         uint32_t refresh_time;
 24         uint32_t count;
 25         struct   atm_vcc *shortcut;
 26         uint8_t  MPS_ctrl_ATM_addr[ATM_ESA_LEN];
 27         struct   in_ctrl_info ctrl_info;
 28         atomic_t use;
 29 } in_cache_entry;
 30 
 31 struct in_cache_ops{
 32         in_cache_entry *(*add_entry)(__be32 dst_ip,
 33                                       struct mpoa_client *client);
 34         in_cache_entry *(*get)(__be32 dst_ip, struct mpoa_client *client);
 35         in_cache_entry *(*get_with_mask)(__be32 dst_ip,
 36                                          struct mpoa_client *client,
 37                                          __be32 mask);
 38         in_cache_entry *(*get_by_vcc)(struct atm_vcc *vcc,
 39                                       struct mpoa_client *client);
 40         void            (*put)(in_cache_entry *entry);
 41         void            (*remove_entry)(in_cache_entry *delEntry,
 42                                         struct mpoa_client *client );
 43         int             (*cache_hit)(in_cache_entry *entry,
 44                                      struct mpoa_client *client);
 45         void            (*clear_count)(struct mpoa_client *client);
 46         void            (*check_resolving)(struct mpoa_client *client);
 47         void            (*refresh)(struct mpoa_client *client);
 48         void            (*destroy_cache)(struct mpoa_client *mpc);
 49 };
 50 
 51 typedef struct eg_cache_entry{
 52         struct               eg_cache_entry *next;
 53         struct               eg_cache_entry *prev;
 54         struct               timeval  tv;
 55         uint8_t              MPS_ctrl_ATM_addr[ATM_ESA_LEN];
 56         struct atm_vcc       *shortcut;
 57         uint32_t             packets_rcvd;
 58         uint16_t             entry_state;
 59         __be32             latest_ip_addr;    /* The src IP address of the last packet */
 60         struct eg_ctrl_info  ctrl_info;
 61         atomic_t             use;
 62 } eg_cache_entry;
 63 
 64 struct eg_cache_ops{
 65         eg_cache_entry *(*add_entry)(struct k_message *msg, struct mpoa_client *client);
 66         eg_cache_entry *(*get_by_cache_id)(__be32 cache_id, struct mpoa_client *client);
 67         eg_cache_entry *(*get_by_tag)(__be32 cache_id, struct mpoa_client *client);
 68         eg_cache_entry *(*get_by_vcc)(struct atm_vcc *vcc, struct mpoa_client *client);
 69         eg_cache_entry *(*get_by_src_ip)(__be32 ipaddr, struct mpoa_client *client);
 70         void            (*put)(eg_cache_entry *entry);
 71         void            (*remove_entry)(eg_cache_entry *entry, struct mpoa_client *client);
 72         void            (*update)(eg_cache_entry *entry, uint16_t holding_time);
 73         void            (*clear_expired)(struct mpoa_client *client);
 74         void            (*destroy_cache)(struct mpoa_client *mpc);
 75 };
 76 
 77 
 78 /* Ingress cache entry states */
 79 
 80 #define INGRESS_REFRESHING 3
 81 #define INGRESS_RESOLVED   2
 82 #define INGRESS_RESOLVING  1
 83 #define INGRESS_INVALID    0
 84 
 85 /* VCC states */
 86 
 87 #define OPEN   1
 88 #define CLOSED 0
 89 
 90 /* Egress cache entry states */
 91 
 92 #define EGRESS_RESOLVED 2
 93 #define EGRESS_PURGE    1
 94 #define EGRESS_INVALID  0
 95 
 96 #endif
 97 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp