Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\nlattr.c Create Date:2022-07-28 07:16:24
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:la_policy_len - Determin the max. length of a policy*@policy: policy to use*@n: number of policies* Determines the max. length of the policy. It is currently used* to allocated Netlink buffers roughly the size of the actual* message.

Proto:int nla_policy_len(const struct nla_policy *p, int n)

Type:int

Parameter:

TypeParameterName
const struct nla_policy *p
intn
442  len = 0
444  When i < n cycle
445  If len Then len += la_total_size - total length of attribute including padding*@payload: length of payload
447  Else if For these data types, attribute length should be exactly the given* size. However, to maintain compatibility with broken commands, if the* attribute length does not match the expected size a warning is emitted[specific validation (e.g. range, function call), see] Then len += la_total_size - total length of attribute including padding*@payload: length of payload
449  Else if nla_attr_minlen[specific validation (e.g. range, function call), see] Then len += la_total_size - total length of attribute including padding*@payload: length of payload
453  Return len