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

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

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

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

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

kernel.org | git.kernel.org | LWN.net | Project Home | 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.

sflogo.php