diff options
author | Yonit <yhalperi@redhat.com> | 2009-07-01 17:08:25 +0300 |
---|---|---|
committer | Yonit <yhalperi@redhat.com> | 2009-07-01 17:08:25 +0300 |
commit | aa25b55655a7acdd4a59104af1bd3527860516c8 (patch) | |
tree | 32bbe6af294bb1ecff0461da231b2ca95605001d | |
parent | b6d2186e1ad19056513604f22c3700669734a23c (diff) |
allowing to change the network interface callbacks
-rw-r--r-- | net_slirp.c | 5 | ||||
-rw-r--r-- | net_slirp.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/net_slirp.c b/net_slirp.c index 0e7d6e4..e79802d 100644 --- a/net_slirp.c +++ b/net_slirp.c @@ -223,6 +223,11 @@ void DLL_PUBLIC net_slirp_init(struct in_addr special_ip, int restricted, } +void DLL_PUBLIC net_slirp_set_net_interface(SlirpUsrNetworkInterface *net_interface) +{ + slirp_net_interface = net_interface; +} + void DLL_PUBLIC net_slirp_input(const uint8_t *pkt, int pkt_len) { struct mbuf *m; diff --git a/net_slirp.h b/net_slirp.h index e9f4258..b5c7cdd 100644 --- a/net_slirp.h +++ b/net_slirp.h @@ -31,6 +31,7 @@ struct SlirpUsrNetworkInterface { void net_slirp_init(struct in_addr special_ip, int restricted, SlirpUsrNetworkInterface *net_interface); +void net_slirp_set_net_interface(SlirpUsrNetworkInterface *net_interface); void net_slirp_input(const uint8_t *pkt, int pkt_len); // TODO: maybe we will need to change the allocation/deallocation to be for specific |