diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2020-11-11 13:38:22 -0500 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2020-12-15 10:02:07 -0500 |
commit | f0e34a06f6580e666a1f49d1b8315adf1d587c43 (patch) | |
tree | 9101e40233c5f085f648955d1f3983dc4c31aea8 /net/dump.c | |
parent | 6d11ea6d8e5ad0ba3766755cc23a1392ae321433 (diff) |
netfilter: Use class properties
Instance properties make introspection hard and are not shown by
"-object ...,help". Convert them to class properties.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20201111183823.283752-12-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'net/dump.c')
-rw-r--r-- | net/dump.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/dump.c b/net/dump.c index 7fd448d2e1..4d538d82a6 100644 --- a/net/dump.c +++ b/net/dump.c @@ -224,11 +224,6 @@ static void filter_dump_instance_init(Object *obj) NetFilterDumpState *nfds = FILTER_DUMP(obj); nfds->maxlen = 65536; - - object_property_add(obj, "maxlen", "uint32", filter_dump_get_maxlen, - filter_dump_set_maxlen, NULL, NULL); - object_property_add_str(obj, "file", file_dump_get_filename, - file_dump_set_filename); } static void filter_dump_instance_finalize(Object *obj) @@ -242,6 +237,11 @@ static void filter_dump_class_init(ObjectClass *oc, void *data) { NetFilterClass *nfc = NETFILTER_CLASS(oc); + object_class_property_add(oc, "maxlen", "uint32", filter_dump_get_maxlen, + filter_dump_set_maxlen, NULL, NULL); + object_class_property_add_str(oc, "file", file_dump_get_filename, + file_dump_set_filename); + nfc->setup = filter_dump_setup; nfc->cleanup = filter_dump_cleanup; nfc->receive_iov = filter_dump_receive_iov; |