Lines Matching full:ri
118 def is_recursive_for_op(self, ri): argument
119 return self.is_recursive() and not ri.op
136 def _complex_member_type(self, ri): argument
142 def free(self, ri, var, ref): argument
144 ri.cw.p(f'free({var}->{ref}{self.c_name});')
146 def arg_member(self, ri): argument
147 member = self._complex_member_type(ri)
155 def struct_member(self, ri): argument
157 ri.cw.p(f"unsigned int n_{self.c_name};")
158 member = self._complex_member_type(ri)
161 if self.is_recursive_for_op(ri):
163 ri.cw.p(f"{member} {ptr}{self.c_name};")
165 members = self.arg_member(ri)
167 ri.cw.p(one + ';')
188 def _attr_put_line(self, ri, var, line): argument
190 ri.cw.p(f"if ({var}->_present.{self.c_name})")
192 ri.cw.p(f"if ({var}->_present.{self.c_name}_len)")
193 ri.cw.p(f"{line};")
195 def _attr_put_simple(self, ri, var, put_type): argument
197 self._attr_put_line(ri, var, line)
199 def attr_put(self, ri, var): argument
202 def _attr_get(self, ri, var): argument
205 def attr_get(self, ri, var, first): argument
206 lines, init_lines, local_vars = self._attr_get(ri, var)
213 ri.cw.block_start(line=f"{kw} (type == {self.enum_name})")
216 ri.cw.p(local)
217 ri.cw.nl()
220 ri.cw.p("if (ynl_attr_validate(yarg, attr))")
221 ri.cw.p("return YNL_PARSE_CB_ERROR;")
223 ri.cw.p(f"{var}->_present.{self.c_name} = 1;")
226 ri.cw.nl()
228 ri.cw.p(line)
231 ri.cw.p(line)
232 ri.cw.block_end()
235 def _setter_lines(self, ri, member, presence): argument
238 def setter(self, ri, space, direction, deref=False, ref=None): argument
252 code += self._setter_lines(ri, member, presence)
254 func_name = f"{op_prefix(ri, direction, deref=deref)}_set_{'_'.join(ref)}"
259 ri.cw.write_func('static inline void', func_name, body=code,
260 … args=[f'{type_name(ri, direction, deref=deref)} *{var}'] + self.arg_member(ri))
267 def arg_member(self, ri): argument
270 def _attr_get(self, ri, var): argument
279 def attr_put(self, ri, var): argument
282 def attr_get(self, ri, var, first): argument
285 def setter(self, ri, space, direction, deref=False, ref=None): argument
293 def arg_member(self, ri): argument
299 def attr_put(self, ri, var): argument
302 def attr_get(self, ri, var, first): argument
308 def setter(self, ri, space, direction, deref=False, ref=None): argument
387 def arg_member(self, ri): argument
390 def attr_put(self, ri, var): argument
391 self._attr_put_simple(ri, var, self.type)
393 def _attr_get(self, ri, var): argument
396 def _setter_lines(self, ri, member, presence): argument
401 def arg_member(self, ri): argument
407 def attr_put(self, ri, var): argument
408 self._attr_put_line(ri, var, f"ynl_attr_put(nlh, {self.enum_name}, NULL, 0)")
410 def _attr_get(self, ri, var): argument
413 def _setter_lines(self, ri, member, presence): argument
418 def arg_member(self, ri): argument
424 def struct_member(self, ri): argument
425 ri.cw.p(f"char *{self.c_name};")
449 def attr_put(self, ri, var): argument
450 self._attr_put_simple(ri, var, 'str')
452 def _attr_get(self, ri, var): argument
461 def _setter_lines(self, ri, member, presence): argument
470 def arg_member(self, ri): argument
476 def struct_member(self, ri): argument
477 ri.cw.p(f"void *{self.c_name};")
503 def attr_put(self, ri, var): argument
504 self._attr_put_line(ri, var, f"ynl_attr_put(nlh, {self.enum_name}, " +
507 def _attr_get(self, ri, var): argument
515 def _setter_lines(self, ri, member, presence): argument
523 def _complex_member_type(self, ri): argument
536 def attr_put(self, ri, var): argument
538 self._attr_put_line(ri, var, line)
540 def _attr_get(self, ri, var): argument
543 def _setter_lines(self, ri, member, presence): argument
551 def _complex_member_type(self, ri): argument
554 def free(self, ri, var, ref): argument
556 if self.is_recursive_for_op(ri):
558 ri.cw.p(f'if ({var}->{ref}{self.c_name})')
559 ri.cw.p(f'{self.nested_render_name}_free({at}{var}->{ref}{self.c_name});')
567 def attr_put(self, ri, var): argument
568 at = '' if self.is_recursive_for_op(ri) else '&'
569 self._attr_put_line(ri, var, f"{self.nested_render_name}_put(nlh, " +
572 def _attr_get(self, ri, var): argument
579 def setter(self, ri, space, direction, deref=False, ref=None): argument
582 for _, attr in ri.family.pure_nested_structs[self.nested_attrs].member_list():
585 attr.setter(ri, self.nested_attrs, direction, deref=deref, ref=ref)
600 def _complex_member_type(self, ri): argument
604 scalar_pfx = '__' if ri.ku_space == 'user' else ''
612 def free(self, ri, var, ref): argument
614 ri.cw.p(f"free({var}->{ref}{self.c_name});")
616 ri.cw.p(f"for (i = 0; i < {var}->{ref}n_{self.c_name}; i++)")
617 ri.cw.p(f'{self.nested_render_name}_free(&{var}->{ref}{self.c_name}[i]);')
618 ri.cw.p(f"free({var}->{ref}{self.c_name});")
628 def _attr_get(self, ri, var): argument
631 def attr_put(self, ri, var): argument
634 ri.cw.p(f"for (unsigned int i = 0; i < {var}->n_{self.c_name}; i++)")
635 ri.cw.p(f"ynl_attr_put_{put_type}(nlh, {self.enum_name}, {var}->{self.c_name}[i]);")
637 ri.cw.p(f"for (unsigned int i = 0; i < {var}->n_{self.c_name}; i++)")
638 self._attr_put_line(ri, var, f"{self.nested_render_name}_put(nlh, " +
643 def _setter_lines(self, ri, member, presence): argument
658 def _complex_member_type(self, ri): argument
662 scalar_pfx = '__' if ri.ku_space == 'user' else ''
670 def _attr_get(self, ri, var): argument
679 def _complex_member_type(self, ri): argument
685 def _attr_get(self, ri, var): argument
1481 def op_prefix(ri, direction, deref=False): argument
1482 suffix = f"_{ri.type_name}"
1484 if not ri.op_mode or ri.op_mode == 'do':
1490 if ri.type_consistent:
1494 suffix += op_mode_to_wrapper[ri.op_mode]
1499 return f"{ri.family.c_name}{suffix}"
1502 def type_name(ri, direction, deref=False): argument
1503 return f"struct {op_prefix(ri, direction, deref=deref)}"
1506 def print_prototype(ri, direction, terminate=True, doc=None): argument
1509 fname = ri.op.render_name
1510 if ri.op_mode == 'dump':
1514 if 'request' in ri.op[ri.op_mode]:
1515 args.append(f"{type_name(ri, direction)} *" + f"{direction_to_suffix[direction][1:]}")
1518 if 'reply' in ri.op[ri.op_mode]:
1519 ret = f"{type_name(ri, rdir(direction))} *"
1521 ri.cw.write_func_prot(ret, fname, args, doc=doc, suffix=suffix)
1524 def print_req_prototype(ri): argument
1525 print_prototype(ri, "request", doc=ri.op['doc'])
1528 def print_dump_prototype(ri): argument
1529 print_prototype(ri, "request")
1609 def put_req_nested_prototype(ri, struct, suffix=';'): argument
1614 ri.cw.write_func_prot('int', f'{struct.render_name}_put', func_args,
1618 def put_req_nested(ri, struct): argument
1619 put_req_nested_prototype(ri, struct, suffix='')
1620 ri.cw.block_start()
1621 ri.cw.write_func_lvar('struct nlattr *nest;')
1623 ri.cw.p("nest = ynl_attr_nest_start(nlh, attr_type);")
1626 arg.attr_put(ri, "obj")
1628 ri.cw.p("ynl_attr_nest_end(nlh, nest);")
1630 ri.cw.nl()
1631 ri.cw.p('return 0;')
1632 ri.cw.block_end()
1633 ri.cw.nl()
1636 def _multi_parse(ri, struct, init_lines, local_vars): argument
1640 if ri.fixed_hdr:
1668 ri.cw.block_start()
1669 ri.cw.write_func_lvar(local_vars)
1672 ri.cw.p(line)
1673 ri.cw.nl()
1676 ri.cw.p(f'dst->{arg} = {arg};')
1678 if ri.fixed_hdr:
1679 ri.cw.p('hdr = ynl_nlmsg_data_offset(nlh, sizeof(struct genlmsghdr));')
1680 ri.cw.p(f"memcpy(&dst->_hdr, hdr, sizeof({ri.fixed_hdr}));")
1683 ri.cw.p(f"if (dst->{aspec.c_name})")
1684 …ri.cw.p(f'return ynl_error_parse(yarg, "attribute already present ({struct.attr_set.name}.{aspec.n…
1686 ri.cw.nl()
1687 ri.cw.block_start(line=iter_line)
1688 ri.cw.p('unsigned int type = ynl_attr_type(attr);')
1689 ri.cw.nl()
1693 good = arg.attr_get(ri, 'dst', first=first)
1697 ri.cw.block_end()
1698 ri.cw.nl()
1703 ri.cw.block_start(line=f"if (n_{aspec.c_name})")
1704 ri.cw.p(f"dst->{aspec.c_name} = calloc(n_{aspec.c_name}, sizeof(*dst->{aspec.c_name}));")
1705 ri.cw.p(f"dst->n_{aspec.c_name} = n_{aspec.c_name};")
1706 ri.cw.p('i = 0;')
1707 ri.cw.p(f"parg.rsp_policy = &{aspec.nested_render_name}_nest;")
1708 ri.cw.block_start(line=f"ynl_attr_for_each_nested(attr, attr_{aspec.c_name})")
1709 ri.cw.p(f"parg.data = &dst->{aspec.c_name}[i];")
1710 ri.cw.p(f"if ({aspec.nested_render_name}_parse(&parg, attr, ynl_attr_type(attr)))")
1711 ri.cw.p('return YNL_PARSE_CB_ERROR;')
1712 ri.cw.p('i++;')
1713 ri.cw.block_end()
1714 ri.cw.block_end()
1715 ri.cw.nl()
1719 ri.cw.block_start(line=f"if (n_{aspec.c_name})")
1720 ri.cw.p(f"dst->{aspec.c_name} = calloc(n_{aspec.c_name}, sizeof(*dst->{aspec.c_name}));")
1721 ri.cw.p(f"dst->n_{aspec.c_name} = n_{aspec.c_name};")
1722 ri.cw.p('i = 0;')
1724 ri.cw.p(f"parg.rsp_policy = &{aspec.nested_render_name}_nest;")
1725 ri.cw.block_start(line=iter_line)
1726 ri.cw.block_start(line=f"if (ynl_attr_type(attr) == {aspec.enum_name})")
1728 ri.cw.p(f"parg.data = &dst->{aspec.c_name}[i];")
1729 ri.cw.p(f"if ({aspec.nested_render_name}_parse(&parg, attr))")
1730 ri.cw.p('return YNL_PARSE_CB_ERROR;')
1732 ri.cw.p(f"dst->{aspec.c_name}[i] = ynl_attr_get_{aspec.type}(attr);")
1735 ri.cw.p('i++;')
1736 ri.cw.block_end()
1737 ri.cw.block_end()
1738 ri.cw.block_end()
1739 ri.cw.nl()
1742 ri.cw.p('return 0;')
1744 ri.cw.p('return YNL_PARSE_CB_OK;')
1745 ri.cw.block_end()
1746 ri.cw.nl()
1749 def parse_rsp_nested_prototype(ri, struct, suffix=';'): argument
1755 ri.cw.write_func_prot('int', f'{struct.render_name}_parse', func_args,
1759 def parse_rsp_nested(ri, struct): argument
1760 parse_rsp_nested_prototype(ri, struct, suffix='')
1766 _multi_parse(ri, struct, init_lines, local_vars)
1769 def parse_rsp_msg(ri, deref=False): argument
1770 if 'reply' not in ri.op[ri.op_mode] and ri.op_mode != 'event':
1776 local_vars = [f'{type_name(ri, "reply", deref=deref)} *dst;',
1780 ri.cw.write_func_prot('int', f'{op_prefix(ri, "reply", deref=deref)}_parse', func_args)
1782 if ri.struct["reply"].member_list():
1783 _multi_parse(ri, ri.struct["reply"], init_lines, local_vars)
1786 ri.cw.block_start()
1787 ri.cw.p('return YNL_PARSE_CB_OK;')
1788 ri.cw.block_end()
1789 ri.cw.nl()
1792 def print_req(ri): argument
1800 if 'reply' in ri.op[ri.op_mode]:
1803 local_vars += [f'{type_name(ri, rdir(direction))} *rsp;']
1805 if ri.fixed_hdr:
1809 print_prototype(ri, direction, terminate=False)
1810 ri.cw.block_start()
1811 ri.cw.write_func_lvar(local_vars)
1813 ri.cw.p(f"nlh = ynl_gemsg_start_req(ys, {ri.nl.get_family_id()}, {ri.op.enum_name}, 1);")
1815 ri.cw.p(f"ys->req_policy = &{ri.struct['request'].render_name}_nest;")
1816 if 'reply' in ri.op[ri.op_mode]:
1817 ri.cw.p(f"yrs.yarg.rsp_policy = &{ri.struct['reply'].render_name}_nest;")
1818 ri.cw.nl()
1820 if ri.fixed_hdr:
1821 ri.cw.p("hdr_len = sizeof(req->_hdr);")
1822 ri.cw.p("hdr = ynl_nlmsg_put_extra_header(nlh, hdr_len);")
1823 ri.cw.p("memcpy(hdr, &req->_hdr, hdr_len);")
1824 ri.cw.nl()
1826 for _, attr in ri.struct["request"].member_list():
1827 attr.attr_put(ri, "req")
1828 ri.cw.nl()
1830 if 'reply' in ri.op[ri.op_mode]:
1831 ri.cw.p('rsp = calloc(1, sizeof(*rsp));')
1832 ri.cw.p('yrs.yarg.data = rsp;')
1833 ri.cw.p(f"yrs.cb = {op_prefix(ri, 'reply')}_parse;")
1834 if ri.op.value is not None:
1835 ri.cw.p(f'yrs.rsp_cmd = {ri.op.enum_name};')
1837 ri.cw.p(f'yrs.rsp_cmd = {ri.op.rsp_value};')
1838 ri.cw.nl()
1839 ri.cw.p("err = ynl_exec(ys, nlh, &yrs);")
1840 ri.cw.p('if (err < 0)')
1841 if 'reply' in ri.op[ri.op_mode]:
1842 ri.cw.p('goto err_free;')
1844 ri.cw.p('return -1;')
1845 ri.cw.nl()
1847 ri.cw.p(f"return {ret_ok};")
1848 ri.cw.nl()
1850 if 'reply' in ri.op[ri.op_mode]:
1851 ri.cw.p('err_free:')
1852 ri.cw.p(f"{call_free(ri, rdir(direction), 'rsp')}")
1853 ri.cw.p(f"return {ret_err};")
1855 ri.cw.block_end()
1858 def print_dump(ri): argument
1860 print_prototype(ri, direction, terminate=False)
1861 ri.cw.block_start()
1866 if ri.fixed_hdr:
1870 ri.cw.write_func_lvar(local_vars)
1872 ri.cw.p('yds.yarg.ys = ys;')
1873 ri.cw.p(f"yds.yarg.rsp_policy = &{ri.struct['reply'].render_name}_nest;")
1874 ri.cw.p("yds.yarg.data = NULL;")
1875 ri.cw.p(f"yds.alloc_sz = sizeof({type_name(ri, rdir(direction))});")
1876 ri.cw.p(f"yds.cb = {op_prefix(ri, 'reply', deref=True)}_parse;")
1877 if ri.op.value is not None:
1878 ri.cw.p(f'yds.rsp_cmd = {ri.op.enum_name};')
1880 ri.cw.p(f'yds.rsp_cmd = {ri.op.rsp_value};')
1881 ri.cw.nl()
1882 ri.cw.p(f"nlh = ynl_gemsg_start_dump(ys, {ri.nl.get_family_id()}, {ri.op.enum_name}, 1);")
1884 if ri.fixed_hdr:
1885 ri.cw.p("hdr_len = sizeof(req->_hdr);")
1886 ri.cw.p("hdr = ynl_nlmsg_put_extra_header(nlh, hdr_len);")
1887 ri.cw.p("memcpy(hdr, &req->_hdr, hdr_len);")
1888 ri.cw.nl()
1890 if "request" in ri.op[ri.op_mode]:
1891 ri.cw.p(f"ys->req_policy = &{ri.struct['request'].render_name}_nest;")
1892 ri.cw.nl()
1893 for _, attr in ri.struct["request"].member_list():
1894 attr.attr_put(ri, "req")
1895 ri.cw.nl()
1897 ri.cw.p('err = ynl_exec_dump(ys, nlh, &yds);')
1898 ri.cw.p('if (err < 0)')
1899 ri.cw.p('goto free_list;')
1900 ri.cw.nl()
1902 ri.cw.p('return yds.first;')
1903 ri.cw.nl()
1904 ri.cw.p('free_list:')
1905 ri.cw.p(call_free(ri, rdir(direction), 'yds.first'))
1906 ri.cw.p('return NULL;')
1907 ri.cw.block_end()
1910 def call_free(ri, direction, var): argument
1911 return f"{op_prefix(ri, direction)}_free({var});"
1920 def print_alloc_wrapper(ri, direction): argument
1921 name = op_prefix(ri, direction)
1922 ri.cw.write_func_prot(f'static inline struct {name} *', f"{name}_alloc", [f"void"])
1923 ri.cw.block_start()
1924 ri.cw.p(f'return calloc(1, sizeof(struct {name}));')
1925 ri.cw.block_end()
1928 def print_free_prototype(ri, direction, suffix=';'): argument
1929 name = op_prefix(ri, direction)
1931 if ri.type_name_conflict:
1934 ri.cw.write_func_prot('void', f"{name}_free", [f"struct {struct_name} *{arg}"], suffix=suffix)
1937 def _print_type(ri, direction, struct): argument
1938 suffix = f'_{ri.type_name}{direction_to_suffix[direction]}'
1939 if not direction and ri.type_name_conflict:
1942 if ri.op_mode == 'dump':
1945 ri.cw.block_start(line=f"struct {ri.family.c_name}{suffix}")
1947 if ri.fixed_hdr:
1948 ri.cw.p(ri.fixed_hdr + ' _hdr;')
1949 ri.cw.nl()
1954 line = attr.presence_member(ri.ku_space, type_filter)
1957 ri.cw.block_start(line=f"struct")
1959 ri.cw.p(line)
1961 ri.cw.block_end(line='_present;')
1962 ri.cw.nl()
1965 ri.cw.p(f"__u32 {arg};")
1968 attr.struct_member(ri)
1970 ri.cw.block_end(line=';')
1971 ri.cw.nl()
1974 def print_type(ri, direction): argument
1975 _print_type(ri, direction, ri.struct[direction])
1978 def print_type_full(ri, struct): argument
1979 _print_type(ri, "", struct)
1982 def print_type_helpers(ri, direction, deref=False): argument
1983 print_free_prototype(ri, direction)
1984 ri.cw.nl()
1986 if ri.ku_space == 'user' and direction == 'request':
1987 for _, attr in ri.struct[direction].member_list():
1988 attr.setter(ri, ri.attr_set, direction, deref=deref)
1989 ri.cw.nl()
1992 def print_req_type_helpers(ri): argument
1993 if len(ri.struct["request"].attr_list) == 0:
1995 print_alloc_wrapper(ri, "request")
1996 print_type_helpers(ri, "request")
1999 def print_rsp_type_helpers(ri): argument
2000 if 'reply' not in ri.op[ri.op_mode]:
2002 print_type_helpers(ri, "reply")
2005 def print_parse_prototype(ri, direction, terminate=True): argument
2009 ri.cw.write_func_prot('void', f"{ri.op.render_name}{suffix}_parse",
2011 f"struct {ri.op.render_name}{suffix} *req"],
2015 def print_req_type(ri): argument
2016 if len(ri.struct["request"].attr_list) == 0:
2018 print_type(ri, "request")
2021 def print_req_free(ri): argument
2022 if 'request' not in ri.op[ri.op_mode]:
2024 _free_type(ri, 'request', ri.struct['request'])
2027 def print_rsp_type(ri): argument
2028 if (ri.op_mode == 'do' or ri.op_mode == 'dump') and 'reply' in ri.op[ri.op_mode]:
2030 elif ri.op_mode == 'event':
2034 print_type(ri, direction)
2037 def print_wrapped_type(ri): argument
2038 ri.cw.block_start(line=f"{type_name(ri, 'reply')}")
2039 if ri.op_mode == 'dump':
2040 ri.cw.p(f"{type_name(ri, 'reply')} *next;")
2041 elif ri.op_mode == 'notify' or ri.op_mode == 'event':
2042 ri.cw.p('__u16 family;')
2043 ri.cw.p('__u8 cmd;')
2044 ri.cw.p('struct ynl_ntf_base_type *next;')
2045 ri.cw.p(f"void (*free)({type_name(ri, 'reply')} *ntf);")
2046 ri.cw.p(f"{type_name(ri, 'reply', deref=True)} obj __attribute__((aligned(8)));")
2047 ri.cw.block_end(line=';')
2048 ri.cw.nl()
2049 print_free_prototype(ri, 'reply')
2050 ri.cw.nl()
2053 def _free_type_members_iter(ri, struct): argument
2056 ri.cw.p('unsigned int i;')
2057 ri.cw.nl()
2061 def _free_type_members(ri, var, struct, ref=''): argument
2063 attr.free(ri, var, ref)
2066 def _free_type(ri, direction, struct): argument
2069 print_free_prototype(ri, direction, suffix='')
2070 ri.cw.block_start()
2071 _free_type_members_iter(ri, struct)
2072 _free_type_members(ri, var, struct)
2074 ri.cw.p(f'free({var});')
2075 ri.cw.block_end()
2076 ri.cw.nl()
2079 def free_rsp_nested_prototype(ri): argument
2080 print_free_prototype(ri, "")
2083 def free_rsp_nested(ri, struct): argument
2084 _free_type(ri, "", struct)
2087 def print_rsp_free(ri): argument
2088 if 'reply' not in ri.op[ri.op_mode]:
2090 _free_type(ri, 'reply', ri.struct['reply'])
2093 def print_dump_type_free(ri): argument
2094 sub_type = type_name(ri, 'reply')
2096 print_free_prototype(ri, 'reply', suffix='')
2097 ri.cw.block_start()
2098 ri.cw.p(f"{sub_type} *next = rsp;")
2099 ri.cw.nl()
2100 ri.cw.block_start(line='while ((void *)next != YNL_LIST_END)')
2101 _free_type_members_iter(ri, ri.struct['reply'])
2102 ri.cw.p('rsp = next;')
2103 ri.cw.p('next = rsp->next;')
2104 ri.cw.nl()
2106 _free_type_members(ri, 'rsp', ri.struct['reply'], ref='obj.')
2107 ri.cw.p(f'free(rsp);')
2108 ri.cw.block_end()
2109 ri.cw.block_end()
2110 ri.cw.nl()
2113 def print_ntf_type_free(ri): argument
2114 print_free_prototype(ri, 'reply', suffix='')
2115 ri.cw.block_start()
2116 _free_type_members_iter(ri, ri.struct['reply'])
2117 _free_type_members(ri, 'rsp', ri.struct['reply'], ref='obj.')
2118 ri.cw.p(f'free(rsp);')
2119 ri.cw.block_end()
2120 ri.cw.nl()
2123 def print_req_policy_fwd(cw, struct, ri=None, terminate=True): argument
2124 if terminate and ri and policy_should_be_static(struct.family):
2130 if ri and policy_should_be_static(struct.family):
2138 if ri:
2139 name = ri.op.render_name
2140 if ri.op.dual_policy:
2141 name += '_' + ri.op_mode
2147 def print_req_policy(cw, struct, ri=None): argument
2148 if ri and ri.op:
2149 cw.ifdef_block(ri.op.get('config-cond', None))
2150 print_req_policy_fwd(cw, struct, ri=ri, terminate=False)
2570 def _render_user_ntf_entry(ri, op): argument
2571 ri.cw.block_start(line=f"[{op.enum_name}] = ")
2572 ri.cw.p(f".alloc_sz\t= sizeof({type_name(ri, 'event')}),")
2573 ri.cw.p(f".cb\t\t= {op_prefix(ri, 'reply', deref=True)}_parse,")
2574 ri.cw.p(f".policy\t\t= &{ri.struct['reply'].render_name}_nest,")
2575 ri.cw.p(f".free\t\t= (void *){op_prefix(ri, 'notify')}_free,")
2576 ri.cw.block_end(line=',')
2590 ri = RenderInfo(cw, family, "user", op, "notify")
2592 ri = RenderInfo(cw, family, "user", ntf_op, "event")
2595 _render_user_ntf_entry(ri, ntf_op)
2599 ri = RenderInfo(cw, family, "user", op, "event")
2600 _render_user_ntf_entry(ri, op)
2762 ri = RenderInfo(cw, parsed, args.mode, op, "do")
2763 print_req_policy_fwd(cw, ri.struct['request'], ri=ri)
2793 ri = RenderInfo(cw, parsed, args.mode, op, op_mode)
2794 print_req_policy(cw, ri.struct['request'], ri=ri)
2813 ri = RenderInfo(cw, parsed, args.mode, "", "", attr_set)
2814 print_type_full(ri, struct)
2821 ri = RenderInfo(cw, parsed, args.mode, op, "do")
2822 print_req_type(ri)
2823 print_req_type_helpers(ri)
2825 print_rsp_type(ri)
2826 print_rsp_type_helpers(ri)
2828 print_req_prototype(ri)
2833 ri = RenderInfo(cw, parsed, args.mode, op, 'dump')
2834 print_req_type(ri)
2835 print_req_type_helpers(ri)
2836 if not ri.type_consistent:
2837 print_rsp_type(ri)
2838 print_wrapped_type(ri)
2839 print_dump_prototype(ri)
2844 ri = RenderInfo(cw, parsed, args.mode, op, 'notify')
2845 if not ri.type_consistent:
2847 print_wrapped_type(ri)
2851 ri = RenderInfo(cw, parsed, args.mode, op, 'event')
2853 print_rsp_type(ri)
2855 print_wrapped_type(ri)
2884 ri = RenderInfo(cw, parsed, args.mode, "", "", attr_set)
2885 free_rsp_nested_prototype(ri)
2887 put_req_nested_prototype(ri, struct)
2889 parse_rsp_nested_prototype(ri, struct)
2892 ri = RenderInfo(cw, parsed, args.mode, "", "", attr_set)
2894 free_rsp_nested(ri, struct)
2896 put_req_nested(ri, struct)
2898 parse_rsp_nested(ri, struct)
2904 ri = RenderInfo(cw, parsed, args.mode, op, "do")
2905 print_req_free(ri)
2906 print_rsp_free(ri)
2907 parse_rsp_msg(ri)
2908 print_req(ri)
2913 ri = RenderInfo(cw, parsed, args.mode, op, "dump")
2914 if not ri.type_consistent:
2915 parse_rsp_msg(ri, deref=True)
2916 print_req_free(ri)
2917 print_dump_type_free(ri)
2918 print_dump(ri)
2923 ri = RenderInfo(cw, parsed, args.mode, op, 'notify')
2924 if not ri.type_consistent:
2926 print_ntf_type_free(ri)
2932 ri = RenderInfo(cw, parsed, args.mode, op, "do")
2933 parse_rsp_msg(ri)
2935 ri = RenderInfo(cw, parsed, args.mode, op, "event")
2936 print_ntf_type_free(ri)