2 static struct tapi_attr default_port
[] = {
4 .type
= TAPI_TYPE_PORTS
,
6 .description
= "foobar",
12 static const struct nla_policy tapi_policy
[] = {
13 [TAPI_ATTR_ID
] = { .type
= NLA_U32
},
14 [TAPI_ATTR_PORT
] = { .type
= NLA_U32
},
15 [TAPI_ATTR_ENDPOINT
] = { .type
= NLA_U32
},
16 [TAPI_ATTR_STREAM
] = { .type
= NLA_U32
}
19 static const struct nla_policy tapi_port_policy
[] = {
20 [TAPI_PORT_ID
] = { .type
= NLA_U32
},
23 static const struct nla_policy tapi_endpoint_policy
[] = {
24 [TAPI_ENDPOINT_ID
] = { .type
= NLA_U32
},
27 static const struct nla_policy tapi_stream_policy
[] = {
28 [TAPI_STREAM_ID
] = { .type
= NLA_U32
},
31 static struct genl_family tapi_nl_family
= {
32 .id
= GENL_ID_GENERATE
,
36 .maxattr
= ARRAY_SIZE(tapi_policy
),
41 static struct genl_ops tapi_nl_ops
[] = {
42 TAPI_NL_OP(TAPI_CMD_LIST
, list_attr
),
46 static int __init
tapi_nl_init(void)
48 ret
= genl_unregister_family(&tapi_nl_family
);
52 genl_register_ops(&tapi_nl_family
, tapi_nl_ops
);
56 module_init(tapi_nl_init
);
58 static void __exit
tapi_nl_exit(void)
60 genl_unregister_family(&tapi_nl_family
);