summaryrefslogtreecommitdiff
path: root/trafgen_dev.h
diff options
context:
space:
mode:
Diffstat (limited to 'trafgen_dev.h')
-rw-r--r--trafgen_dev.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/trafgen_dev.h b/trafgen_dev.h
index 720c630..686a577 100644
--- a/trafgen_dev.h
+++ b/trafgen_dev.h
@@ -16,6 +16,7 @@ struct dev_io_ops;
struct dev_io {
int fd;
char *name;
+ char *trans;
int ifindex;
int dev_type;
uint32_t link_type;
@@ -31,6 +32,7 @@ struct dev_io_ops {
int(*open) (struct dev_io *dev, const char *name, enum dev_io_mode_t mode);
int(*write) (struct dev_io *dev, const uint8_t *buf, size_t len);
int(*read) (struct dev_io *dev, uint8_t *buf, size_t len, struct timespec *tstamp);
+ int(*set_link_type) (struct dev_io *dev, int link_type);
void(*close) (struct dev_io *dev);
};
@@ -41,7 +43,7 @@ extern int dev_io_read(struct dev_io *dev, uint8_t *buf, size_t len,
extern int dev_io_ifindex_get(struct dev_io *dev);
extern int dev_io_fd_get(struct dev_io *dev);
extern const char *dev_io_name_get(struct dev_io *dev);
-extern void dev_io_link_type_set(struct dev_io *dev, int link_type);
+extern int dev_io_link_type_set(struct dev_io *dev, int link_type);
extern bool dev_io_is_netdev(struct dev_io *dev);
extern bool dev_io_is_pcap(struct dev_io *dev);
extern void dev_io_close(struct dev_io *dev);