函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\nlattr.c Create Date:2022-07-27 08:14:51
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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.

函数原型:int nla_policy_len(const struct nla_policy *p, int n)

返回类型:int

参数:

类型参数名称
const struct nla_policy *p
intn
442  len等于0
444 i小于n循环
445  如果lenlen加等于属性的总长度,包括填充
447  否则如果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]则len加等于属性的总长度,包括填充
449  否则如果nla_attr_minlen[specific validation (e.g. range, function call), see]则len加等于属性的总长度,包括填充
453  返回:len