123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- #include <linux/types.h>
- #include <linux/time.h>
- #include <linux/spinlock.h>
- #include <net/rmnet_config.h>
- #include <linux/hrtimer.h>
- #ifndef _RMNET_DATA_CONFIG_H_
- #define _RMNET_DATA_CONFIG_H_
- #define RMNET_DATA_MAX_LOGICAL_EP 256
- struct rmnet_logical_ep_conf_s {
- struct net_device *egress_dev;
- struct timespec last_flush_time;
- long curr_time_limit;
- unsigned int flush_byte_count;
- unsigned int curr_byte_threshold;
- u8 refcount;
- u8 rmnet_mode;
- u8 mux_id;
- };
- struct rmnet_phys_ep_config {
- struct net_device *dev;
- struct rmnet_logical_ep_conf_s local_ep;
- struct rmnet_logical_ep_conf_s muxed_ep[RMNET_DATA_MAX_LOGICAL_EP];
- u32 ingress_data_format;
- u32 egress_data_format;
-
- u16 egress_agg_size;
- u16 egress_agg_count;
- u8 tail_spacing;
-
- spinlock_t agg_lock;
- struct sk_buff *agg_skb;
- u8 agg_state;
- u8 agg_count;
- struct timespec agg_time;
- struct timespec agg_last;
- struct hrtimer hrtimer;
- };
- int rmnet_config_init(void);
- void rmnet_config_exit(void);
- int rmnet_unassociate_network_device(struct net_device *dev);
- int rmnet_set_ingress_data_format(struct net_device *dev,
- u32 ingress_data_format,
- u8 tail_spacing);
- int rmnet_set_egress_data_format(struct net_device *dev,
- u32 egress_data_format,
- u16 agg_size,
- u16 agg_count);
- int rmnet_associate_network_device(struct net_device *dev);
- int _rmnet_set_logical_endpoint_config
- (struct net_device *dev, int config_id,
- struct rmnet_logical_ep_conf_s *epconfig);
- int rmnet_set_logical_endpoint_config(struct net_device *dev,
- int config_id,
- u8 rmnet_mode,
- struct net_device *egress_dev);
- int _rmnet_unset_logical_endpoint_config(struct net_device *dev,
- int config_id);
- int rmnet_unset_logical_endpoint_config(struct net_device *dev,
- int config_id);
- int _rmnet_get_logical_endpoint_config
- (struct net_device *dev, int config_id,
- struct rmnet_logical_ep_conf_s *epconfig);
- int rmnet_get_logical_endpoint_config(struct net_device *dev,
- int config_id,
- u8 *rmnet_mode,
- u8 *egress_dev_name,
- size_t egress_dev_name_size);
- void rmnet_config_netlink_msg_handler (struct sk_buff *skb);
- int rmnet_config_notify_cb(struct notifier_block *nb,
- unsigned long event, void *data);
- int rmnet_create_vnd(int id);
- int rmnet_create_vnd_prefix(int id, const char *name);
- int rmnet_create_vnd_name(int id, const char *name);
- int rmnet_free_vnd(int id);
- struct rmnet_phys_ep_config *_rmnet_get_phys_ep_config
- (struct net_device *dev);
- #endif
|