Annotation of embedaddon/bird2/sysdep/linux/krt-sys.h, revision 1.1.1.1

1.1       misho       1: /*
                      2:  *     BIRD -- Linux Kernel Netlink Route Syncer
                      3:  *
                      4:  *     (c) 1998--2000 Martin Mares <mj@ucw.cz>
                      5:  *
                      6:  *     Can be freely distributed and used under the terms of the GNU GPL.
                      7:  */
                      8: 
                      9: #ifndef _BIRD_KRT_SYS_H_
                     10: #define _BIRD_KRT_SYS_H_
                     11: 
                     12: 
                     13: /* Kernel interfaces */
                     14: 
                     15: struct kif_params {
                     16: };
                     17: 
                     18: struct kif_state {
                     19: };
                     20: 
                     21: 
                     22: static inline void kif_sys_init(struct kif_proto *p UNUSED) { }
                     23: static inline int kif_sys_reconfigure(struct kif_proto *p UNUSED, struct kif_config *n UNUSED, struct kif_config *o UNUSED) { return 1; }
                     24: 
                     25: static inline void kif_sys_preconfig(struct config *c UNUSED) { }
                     26: static inline void kif_sys_postconfig(struct kif_config *c UNUSED) { }
                     27: static inline void kif_sys_init_config(struct kif_config *c UNUSED) { }
                     28: static inline void kif_sys_copy_config(struct kif_config *d UNUSED, struct kif_config *s UNUSED) { }
                     29: 
                     30: static inline struct ifa * kif_get_primary_ip(struct iface *i UNUSED) { return NULL; }
                     31: 
                     32: 
                     33: /* Kernel routes */
                     34: 
                     35: #define KRT_ALLOW_MERGE_PATHS  1
                     36: 
                     37: #define EA_KRT_PREFSRC         EA_CODE(PROTOCOL_KERNEL, 0x10)
                     38: #define EA_KRT_REALM           EA_CODE(PROTOCOL_KERNEL, 0x11)
                     39: #define EA_KRT_SCOPE           EA_CODE(PROTOCOL_KERNEL, 0x12)
                     40: 
                     41: 
                     42: #define KRT_METRICS_MAX                0x10    /* RTAX_QUICKACK+1 */
                     43: #define KRT_METRICS_OFFSET     0x20    /* Offset of EA_KRT_* vs RTAX_* */
                     44: 
                     45: #define KRT_FEATURES_MAX       4
                     46: 
                     47: /*
                     48:  * Following attributes are parts of RTA_METRICS kernel route attribute, their
                     49:  * ids must be consistent with their RTAX_* constants (+ KRT_METRICS_OFFSET)
                     50:  */
                     51: #define EA_KRT_METRICS         EA_CODE(PROTOCOL_KERNEL, 0x20)  /* Dummy one */
                     52: #define EA_KRT_LOCK            EA_CODE(PROTOCOL_KERNEL, 0x21)
                     53: #define EA_KRT_MTU             EA_CODE(PROTOCOL_KERNEL, 0x22)
                     54: #define EA_KRT_WINDOW          EA_CODE(PROTOCOL_KERNEL, 0x23)
                     55: #define EA_KRT_RTT             EA_CODE(PROTOCOL_KERNEL, 0x24)
                     56: #define EA_KRT_RTTVAR          EA_CODE(PROTOCOL_KERNEL, 0x25)
                     57: #define EA_KRT_SSTRESH         EA_CODE(PROTOCOL_KERNEL, 0x26)
                     58: #define EA_KRT_CWND            EA_CODE(PROTOCOL_KERNEL, 0x27)
                     59: #define EA_KRT_ADVMSS          EA_CODE(PROTOCOL_KERNEL, 0x28)
                     60: #define EA_KRT_REORDERING      EA_CODE(PROTOCOL_KERNEL, 0x29)
                     61: #define EA_KRT_HOPLIMIT                EA_CODE(PROTOCOL_KERNEL, 0x2a)
                     62: #define EA_KRT_INITCWND                EA_CODE(PROTOCOL_KERNEL, 0x2b)
                     63: #define EA_KRT_FEATURES                EA_CODE(PROTOCOL_KERNEL, 0x2c)
                     64: #define EA_KRT_RTO_MIN         EA_CODE(PROTOCOL_KERNEL, 0x2d)
                     65: #define EA_KRT_INITRWND                EA_CODE(PROTOCOL_KERNEL, 0x2e)
                     66: #define EA_KRT_QUICKACK                EA_CODE(PROTOCOL_KERNEL, 0x2f)
                     67: 
                     68: 
                     69: struct krt_params {
                     70:   u32 table_id;                                /* Kernel table ID we sync with */
                     71:   u32 metric;                          /* Kernel metric used for all routes */
                     72: };
                     73: 
                     74: struct krt_state {
                     75:   struct krt_proto *hash_next;
                     76: };
                     77: 
                     78: 
                     79: static inline void krt_sys_init(struct krt_proto *p UNUSED) { }
                     80: static inline void krt_sys_preconfig(struct config *c UNUSED) { }
                     81: static inline void krt_sys_postconfig(struct krt_config *x UNUSED) { }
                     82: 
                     83: 
                     84: #endif

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>