1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /* Copyright 2010 Cisco Systems, Inc. All rights reserved. */
7 /* Note: All integer fields in NETWORK byte order */
9 /* Note: String field lengths include null char */
11 #define VIC_PROVINFO_CISCO_OUI { 0x00, 0x00, 0x0c }
12 #define VIC_PROVINFO_GENERIC_TYPE 0x4
14 enum vic_generic_prov_tlv_type
{
15 VIC_GENERIC_PROV_TLV_PORT_PROFILE_NAME_STR
= 0,
16 VIC_GENERIC_PROV_TLV_CLIENT_MAC_ADDR
= 1,
17 VIC_GENERIC_PROV_TLV_CLIENT_NAME_STR
= 2,
18 VIC_GENERIC_PROV_TLV_CLUSTER_PORT_NAME_STR
= 3,
19 VIC_GENERIC_PROV_TLV_CLUSTER_PORT_UUID_STR
= 4,
20 VIC_GENERIC_PROV_TLV_CLUSTER_UUID_STR
= 5,
21 VIC_GENERIC_PROV_TLV_CLUSTER_NAME_STR
= 7,
22 VIC_GENERIC_PROV_TLV_HOST_UUID_STR
= 8,
23 VIC_GENERIC_PROV_TLV_CLIENT_UUID_STR
= 9,
24 VIC_GENERIC_PROV_TLV_INCARNATION_NUMBER
= 10,
25 VIC_GENERIC_PROV_TLV_OS_TYPE
= 11,
26 VIC_GENERIC_PROV_TLV_OS_VENDOR
= 12,
27 VIC_GENERIC_PROV_TLV_CLIENT_TYPE
= 15,
30 enum vic_generic_prov_os_type
{
31 VIC_GENERIC_PROV_OS_TYPE_UNKNOWN
= 0,
32 VIC_GENERIC_PROV_OS_TYPE_ESX
= 1,
33 VIC_GENERIC_PROV_OS_TYPE_LINUX
= 2,
34 VIC_GENERIC_PROV_OS_TYPE_WINDOWS
= 3,
35 VIC_GENERIC_PROV_OS_TYPE_SOLARIS
= 4,
39 u8 oui
[3]; /* OUI of data provider */
40 u8 type
; /* provider-specific type */
41 u32 length
; /* length of data below */
42 u32 num_tlvs
; /* number of tlvs */
43 struct vic_provinfo_tlv
{
50 #define VIC_PROVINFO_ADD_TLV(vp, tlvtype, tlvlen, data) \
52 err = vic_provinfo_add_tlv(vp, tlvtype, tlvlen, data); \
54 goto add_tlv_failure; \
57 #define VIC_PROVINFO_MAX_DATA 1385
58 #define VIC_PROVINFO_MAX_TLV_DATA (VIC_PROVINFO_MAX_DATA - \
59 sizeof(struct vic_provinfo))
61 struct vic_provinfo
*vic_provinfo_alloc(gfp_t flags
, const u8
*oui
,
63 void vic_provinfo_free(struct vic_provinfo
*vp
);
64 int vic_provinfo_add_tlv(struct vic_provinfo
*vp
, u16 type
, u16 length
,
66 size_t vic_provinfo_size(struct vic_provinfo
*vp
);
68 #endif /* _VNIC_VIC_H_ */