static void redirector_rs_finalize(SocketReadState *rs) { MirrorState *s = container_of(rs, MirrorState, rs); NetFilterState *nf = NETFILTER(s); redirector_to_filter(nf, rs->buf, rs->packet_len); }
static char *netfilter_get_netdev_id(Object *obj, Error **errp) { NetFilterState *nf = NETFILTER(obj); return g_strdup(nf->netdev_id); }
static void netfilter_set_netdev_id(Object *obj, const char *str, Error **errp) { NetFilterState *nf = NETFILTER(obj); nf->netdev_id = g_strdup(str); }
{ NetFilterState *nf = NETFILTER(obj); return g_strdup(nf->netdev_id); } static void netfilter_set_netdev_id(Object *obj, const char *str, Error **errp) { NetFilterState *nf = NETFILTER(obj); nf->netdev_id = g_strdup(str); } static int netfilter_get_direction(Object *obj, Error **errp G_GNUC_UNUSED) { NetFilterState *nf = NETFILTER(obj); return nf->direction; } static void netfilter_set_direction(Object *obj, int direction, Error **errp) { NetFilterState *nf = NETFILTER(obj); nf->direction = direction; } static void netfilter_init(Object *obj) { object_property_add_str(obj, "netdev", netfilter_get_netdev_id, netfilter_set_netdev_id, NULL); object_property_add_enum(obj, "queue", "NetFilterDirection",