mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
filter: Add handle_event method for NetFilterClass
Filter needs to process the event of checkpoint/failover or other event passed by COLO frame. Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com> Signed-off-by: Zhang Chen <zhangckid@gmail.com> Signed-off-by: Zhang Chen <chen.zhang@intel.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
parent
d1955d2219
commit
5fbba3d659
3 changed files with 41 additions and 0 deletions
|
@ -38,6 +38,8 @@ typedef ssize_t (FilterReceiveIOV)(NetFilterState *nc,
|
|||
|
||||
typedef void (FilterStatusChanged) (NetFilterState *nf, Error **errp);
|
||||
|
||||
typedef void (FilterHandleEvent) (NetFilterState *nf, int event, Error **errp);
|
||||
|
||||
typedef struct NetFilterClass {
|
||||
ObjectClass parent_class;
|
||||
|
||||
|
@ -45,6 +47,7 @@ typedef struct NetFilterClass {
|
|||
FilterSetup *setup;
|
||||
FilterCleanup *cleanup;
|
||||
FilterStatusChanged *status_changed;
|
||||
FilterHandleEvent *handle_event;
|
||||
/* mandatory */
|
||||
FilterReceiveIOV *receive_iov;
|
||||
} NetFilterClass;
|
||||
|
@ -77,4 +80,6 @@ ssize_t qemu_netfilter_pass_to_next(NetClientState *sender,
|
|||
int iovcnt,
|
||||
void *opaque);
|
||||
|
||||
void colo_notify_filters_event(int event, Error **errp);
|
||||
|
||||
#endif /* QEMU_NET_FILTER_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue