Lines Matching full:ri
105 def is_recursive_for_op(self, ri): argument
106 return self.is_recursive() and not ri.op
123 def _complex_member_type(self, ri): argument
129 def free(self, ri, var, ref): argument
131 ri.cw.p(f'free({var}->{ref}{self.c_name});')
133 def arg_member(self, ri): argument
134 member = self._complex_member_type(ri)
142 def struct_member(self, ri): argument
144 ri.cw.p(f"unsigned int n_{self.c_name};")
145 member = self._complex_member_type(ri)
148 if self.is_recursive_for_op(ri):
150 ri.cw.p(f"{member} {ptr}{self.c_name};")
152 members = self.arg_member(ri)
154 ri.cw.p(one + ';')
172 def _attr_put_line(self, ri, var, line): argument
174 ri.cw.p(f"if ({var}->_present.{self.c_name})")
176 ri.cw.p(f"if ({var}->_present.{self.c_name}_len)")
177 ri.cw.p(f"{line};")
179 def _attr_put_simple(self, ri, var, put_type): argument
181 self._attr_put_line(ri, var, line)
183 def attr_put(self, ri, var): argument
186 def _attr_get(self, ri, var): argument
189 def attr_get(self, ri, var, first): argument
190 lines, init_lines, local_vars = self._attr_get(ri, var)
197 ri.cw.block_start(line=f"{kw} (type == {self.enum_name})")
200 ri.cw.p(local)
201 ri.cw.nl()
204 ri.cw.p("if (ynl_attr_validate(yarg, attr))")
205 ri.cw.p("return YNL_PARSE_CB_ERROR;")
207 ri.cw.p(f"{var}->_present.{self.c_name} = 1;")
210 ri.cw.nl()
212 ri.cw.p(line)
215 ri.cw.p(line)
216 ri.cw.block_end()
219 def _setter_lines(self, ri, member, presence): argument
222 def setter(self, ri, space, direction, deref=False, ref=None): argument
236 code += self._setter_lines(ri, member, presence)
238 func_name = f"{op_prefix(ri, direction, deref=deref)}_set_{'_'.join(ref)}"
243 ri.cw.write_func('static inline void', func_name, body=code,
244 … args=[f'{type_name(ri, direction, deref=deref)} *{var}'] + self.arg_member(ri))
251 def arg_member(self, ri): argument
254 def _attr_get(self, ri, var): argument
263 def attr_put(self, ri, var): argument
266 def attr_get(self, ri, var, first): argument
269 def setter(self, ri, space, direction, deref=False, ref=None): argument
277 def arg_member(self, ri): argument
283 def attr_put(self, ri, var): argument
286 def attr_get(self, ri, var, first): argument
292 def setter(self, ri, space, direction, deref=False, ref=None): argument
371 def arg_member(self, ri): argument
374 def attr_put(self, ri, var): argument
375 self._attr_put_simple(ri, var, self.type)
377 def _attr_get(self, ri, var): argument
380 def _setter_lines(self, ri, member, presence): argument
385 def arg_member(self, ri): argument
391 def attr_put(self, ri, var): argument
392 self._attr_put_line(ri, var, f"ynl_attr_put(nlh, {self.enum_name}, NULL, 0)")
394 def _attr_get(self, ri, var): argument
397 def _setter_lines(self, ri, member, presence): argument
402 def arg_member(self, ri): argument
408 def struct_member(self, ri): argument
409 ri.cw.p(f"char *{self.c_name};")
433 def attr_put(self, ri, var): argument
434 self._attr_put_simple(ri, var, 'str')
436 def _attr_get(self, ri, var): argument
445 def _setter_lines(self, ri, member, presence): argument
454 def arg_member(self, ri): argument
460 def struct_member(self, ri): argument
461 ri.cw.p(f"void *{self.c_name};")
480 def attr_put(self, ri, var): argument
481 self._attr_put_line(ri, var, f"ynl_attr_put(nlh, {self.enum_name}, " +
484 def _attr_get(self, ri, var): argument
492 def _setter_lines(self, ri, member, presence): argument
500 def _complex_member_type(self, ri): argument
513 def attr_put(self, ri, var): argument
515 self._attr_put_line(ri, var, line)
517 def _attr_get(self, ri, var): argument
520 def _setter_lines(self, ri, member, presence): argument
528 def _complex_member_type(self, ri): argument
531 def free(self, ri, var, ref): argument
533 if self.is_recursive_for_op(ri):
535 ri.cw.p(f'if ({var}->{ref}{self.c_name})')
536 ri.cw.p(f'{self.nested_render_name}_free({at}{var}->{ref}{self.c_name});')
544 def attr_put(self, ri, var): argument
545 at = '' if self.is_recursive_for_op(ri) else '&'
546 self._attr_put_line(ri, var, f"{self.nested_render_name}_put(nlh, " +
549 def _attr_get(self, ri, var): argument
556 def setter(self, ri, space, direction, deref=False, ref=None): argument
559 for _, attr in ri.family.pure_nested_structs[self.nested_attrs].member_list():
562 attr.setter(ri, self.nested_attrs, direction, deref=deref, ref=ref)
577 def _complex_member_type(self, ri): argument
581 scalar_pfx = '__' if ri.ku_space == 'user' else ''
589 def free(self, ri, var, ref): argument
591 ri.cw.p(f"free({var}->{ref}{self.c_name});")
593 ri.cw.p(f"for (i = 0; i < {var}->{ref}n_{self.c_name}; i++)")
594 ri.cw.p(f'{self.nested_render_name}_free(&{var}->{ref}{self.c_name}[i]);')
595 ri.cw.p(f"free({var}->{ref}{self.c_name});")
605 def _attr_get(self, ri, var): argument
608 def attr_put(self, ri, var): argument
611 ri.cw.p(f"for (unsigned int i = 0; i < {var}->n_{self.c_name}; i++)")
612 ri.cw.p(f"ynl_attr_put_{put_type}(nlh, {self.enum_name}, {var}->{self.c_name}[i]);")
614 ri.cw.p(f"for (unsigned int i = 0; i < {var}->n_{self.c_name}; i++)")
615 self._attr_put_line(ri, var, f"{self.nested_render_name}_put(nlh, " +
620 def _setter_lines(self, ri, member, presence): argument
635 def _complex_member_type(self, ri): argument
639 scalar_pfx = '__' if ri.ku_space == 'user' else ''
647 def _attr_get(self, ri, var): argument
656 def _complex_member_type(self, ri): argument
662 def _attr_get(self, ri, var): argument
1458 def op_prefix(ri, direction, deref=False): argument
1459 suffix = f"_{ri.type_name}"
1461 if not ri.op_mode or ri.op_mode == 'do':
1467 if ri.type_consistent:
1471 suffix += op_mode_to_wrapper[ri.op_mode]
1476 return f"{ri.family.c_name}{suffix}"
1479 def type_name(ri, direction, deref=False): argument
1480 return f"struct {op_prefix(ri, direction, deref=deref)}"
1483 def print_prototype(ri, direction, terminate=True, doc=None): argument
1486 fname = ri.op.render_name
1487 if ri.op_mode == 'dump':
1491 if 'request' in ri.op[ri.op_mode]:
1492 args.append(f"{type_name(ri, direction)} *" + f"{direction_to_suffix[direction][1:]}")
1495 if 'reply' in ri.op[ri.op_mode]:
1496 ret = f"{type_name(ri, rdir(direction))} *"
1498 ri.cw.write_func_prot(ret, fname, args, doc=doc, suffix=suffix)
1501 def print_req_prototype(ri): argument
1502 print_prototype(ri, "request", doc=ri.op['doc'])
1505 def print_dump_prototype(ri): argument
1506 print_prototype(ri, "request")
1586 def put_req_nested_prototype(ri, struct, suffix=';'): argument
1591 ri.cw.write_func_prot('int', f'{struct.render_name}_put', func_args,
1595 def put_req_nested(ri, struct): argument
1596 put_req_nested_prototype(ri, struct, suffix='')
1597 ri.cw.block_start()
1598 ri.cw.write_func_lvar('struct nlattr *nest;')
1600 ri.cw.p("nest = ynl_attr_nest_start(nlh, attr_type);")
1603 arg.attr_put(ri, "obj")
1605 ri.cw.p("ynl_attr_nest_end(nlh, nest);")
1607 ri.cw.nl()
1608 ri.cw.p('return 0;')
1609 ri.cw.block_end()
1610 ri.cw.nl()
1613 def _multi_parse(ri, struct, init_lines, local_vars): argument
1617 if ri.fixed_hdr:
1645 ri.cw.block_start()
1646 ri.cw.write_func_lvar(local_vars)
1649 ri.cw.p(line)
1650 ri.cw.nl()
1653 ri.cw.p(f'dst->{arg} = {arg};')
1655 if ri.fixed_hdr:
1656 ri.cw.p('hdr = ynl_nlmsg_data_offset(nlh, sizeof(struct genlmsghdr));')
1657 ri.cw.p(f"memcpy(&dst->_hdr, hdr, sizeof({ri.fixed_hdr}));")
1660 ri.cw.p(f"if (dst->{aspec.c_name})")
1661 …ri.cw.p(f'return ynl_error_parse(yarg, "attribute already present ({struct.attr_set.name}.{aspec.n…
1663 ri.cw.nl()
1664 ri.cw.block_start(line=iter_line)
1665 ri.cw.p('unsigned int type = ynl_attr_type(attr);')
1666 ri.cw.nl()
1670 good = arg.attr_get(ri, 'dst', first=first)
1674 ri.cw.block_end()
1675 ri.cw.nl()
1680 ri.cw.block_start(line=f"if (n_{aspec.c_name})")
1681 ri.cw.p(f"dst->{aspec.c_name} = calloc(n_{aspec.c_name}, sizeof(*dst->{aspec.c_name}));")
1682 ri.cw.p(f"dst->n_{aspec.c_name} = n_{aspec.c_name};")
1683 ri.cw.p('i = 0;')
1684 ri.cw.p(f"parg.rsp_policy = &{aspec.nested_render_name}_nest;")
1685 ri.cw.block_start(line=f"ynl_attr_for_each_nested(attr, attr_{aspec.c_name})")
1686 ri.cw.p(f"parg.data = &dst->{aspec.c_name}[i];")
1687 ri.cw.p(f"if ({aspec.nested_render_name}_parse(&parg, attr, ynl_attr_type(attr)))")
1688 ri.cw.p('return YNL_PARSE_CB_ERROR;')
1689 ri.cw.p('i++;')
1690 ri.cw.block_end()
1691 ri.cw.block_end()
1692 ri.cw.nl()
1696 ri.cw.block_start(line=f"if (n_{aspec.c_name})")
1697 ri.cw.p(f"dst->{aspec.c_name} = calloc(n_{aspec.c_name}, sizeof(*dst->{aspec.c_name}));")
1698 ri.cw.p(f"dst->n_{aspec.c_name} = n_{aspec.c_name};")
1699 ri.cw.p('i = 0;')
1701 ri.cw.p(f"parg.rsp_policy = &{aspec.nested_render_name}_nest;")
1702 ri.cw.block_start(line=iter_line)
1703 ri.cw.block_start(line=f"if (ynl_attr_type(attr) == {aspec.enum_name})")
1705 ri.cw.p(f"parg.data = &dst->{aspec.c_name}[i];")
1706 ri.cw.p(f"if ({aspec.nested_render_name}_parse(&parg, attr))")
1707 ri.cw.p('return YNL_PARSE_CB_ERROR;')
1709 ri.cw.p(f"dst->{aspec.c_name}[i] = ynl_attr_get_{aspec.type}(attr);")
1712 ri.cw.p('i++;')
1713 ri.cw.block_end()
1714 ri.cw.block_end()
1715 ri.cw.block_end()
1716 ri.cw.nl()
1719 ri.cw.p('return 0;')
1721 ri.cw.p('return YNL_PARSE_CB_OK;')
1722 ri.cw.block_end()
1723 ri.cw.nl()
1726 def parse_rsp_nested_prototype(ri, struct, suffix=';'): argument
1732 ri.cw.write_func_prot('int', f'{struct.render_name}_parse', func_args,
1736 def parse_rsp_nested(ri, struct): argument
1737 parse_rsp_nested_prototype(ri, struct, suffix='')
1743 _multi_parse(ri, struct, init_lines, local_vars)
1746 def parse_rsp_msg(ri, deref=False): argument
1747 if 'reply' not in ri.op[ri.op_mode] and ri.op_mode != 'event':
1753 local_vars = [f'{type_name(ri, "reply", deref=deref)} *dst;',
1757 ri.cw.write_func_prot('int', f'{op_prefix(ri, "reply", deref=deref)}_parse', func_args)
1759 if ri.struct["reply"].member_list():
1760 _multi_parse(ri, ri.struct["reply"], init_lines, local_vars)
1763 ri.cw.block_start()
1764 ri.cw.p('return YNL_PARSE_CB_OK;')
1765 ri.cw.block_end()
1766 ri.cw.nl()
1769 def print_req(ri): argument
1777 if 'reply' in ri.op[ri.op_mode]:
1780 local_vars += [f'{type_name(ri, rdir(direction))} *rsp;']
1782 if ri.fixed_hdr:
1786 print_prototype(ri, direction, terminate=False)
1787 ri.cw.block_start()
1788 ri.cw.write_func_lvar(local_vars)
1790 ri.cw.p(f"nlh = ynl_gemsg_start_req(ys, {ri.nl.get_family_id()}, {ri.op.enum_name}, 1);")
1792 ri.cw.p(f"ys->req_policy = &{ri.struct['request'].render_name}_nest;")
1793 if 'reply' in ri.op[ri.op_mode]:
1794 ri.cw.p(f"yrs.yarg.rsp_policy = &{ri.struct['reply'].render_name}_nest;")
1795 ri.cw.nl()
1797 if ri.fixed_hdr:
1798 ri.cw.p("hdr_len = sizeof(req->_hdr);")
1799 ri.cw.p("hdr = ynl_nlmsg_put_extra_header(nlh, hdr_len);")
1800 ri.cw.p("memcpy(hdr, &req->_hdr, hdr_len);")
1801 ri.cw.nl()
1803 for _, attr in ri.struct["request"].member_list():
1804 attr.attr_put(ri, "req")
1805 ri.cw.nl()
1807 if 'reply' in ri.op[ri.op_mode]:
1808 ri.cw.p('rsp = calloc(1, sizeof(*rsp));')
1809 ri.cw.p('yrs.yarg.data = rsp;')
1810 ri.cw.p(f"yrs.cb = {op_prefix(ri, 'reply')}_parse;")
1811 if ri.op.value is not None:
1812 ri.cw.p(f'yrs.rsp_cmd = {ri.op.enum_name};')
1814 ri.cw.p(f'yrs.rsp_cmd = {ri.op.rsp_value};')
1815 ri.cw.nl()
1816 ri.cw.p("err = ynl_exec(ys, nlh, &yrs);")
1817 ri.cw.p('if (err < 0)')
1818 if 'reply' in ri.op[ri.op_mode]:
1819 ri.cw.p('goto err_free;')
1821 ri.cw.p('return -1;')
1822 ri.cw.nl()
1824 ri.cw.p(f"return {ret_ok};")
1825 ri.cw.nl()
1827 if 'reply' in ri.op[ri.op_mode]:
1828 ri.cw.p('err_free:')
1829 ri.cw.p(f"{call_free(ri, rdir(direction), 'rsp')}")
1830 ri.cw.p(f"return {ret_err};")
1832 ri.cw.block_end()
1835 def print_dump(ri): argument
1837 print_prototype(ri, direction, terminate=False)
1838 ri.cw.block_start()
1843 if ri.fixed_hdr:
1847 ri.cw.write_func_lvar(local_vars)
1849 ri.cw.p('yds.yarg.ys = ys;')
1850 ri.cw.p(f"yds.yarg.rsp_policy = &{ri.struct['reply'].render_name}_nest;")
1851 ri.cw.p("yds.yarg.data = NULL;")
1852 ri.cw.p(f"yds.alloc_sz = sizeof({type_name(ri, rdir(direction))});")
1853 ri.cw.p(f"yds.cb = {op_prefix(ri, 'reply', deref=True)}_parse;")
1854 if ri.op.value is not None:
1855 ri.cw.p(f'yds.rsp_cmd = {ri.op.enum_name};')
1857 ri.cw.p(f'yds.rsp_cmd = {ri.op.rsp_value};')
1858 ri.cw.nl()
1859 ri.cw.p(f"nlh = ynl_gemsg_start_dump(ys, {ri.nl.get_family_id()}, {ri.op.enum_name}, 1);")
1861 if ri.fixed_hdr:
1862 ri.cw.p("hdr_len = sizeof(req->_hdr);")
1863 ri.cw.p("hdr = ynl_nlmsg_put_extra_header(nlh, hdr_len);")
1864 ri.cw.p("memcpy(hdr, &req->_hdr, hdr_len);")
1865 ri.cw.nl()
1867 if "request" in ri.op[ri.op_mode]:
1868 ri.cw.p(f"ys->req_policy = &{ri.struct['request'].render_name}_nest;")
1869 ri.cw.nl()
1870 for _, attr in ri.struct["request"].member_list():
1871 attr.attr_put(ri, "req")
1872 ri.cw.nl()
1874 ri.cw.p('err = ynl_exec_dump(ys, nlh, &yds);')
1875 ri.cw.p('if (err < 0)')
1876 ri.cw.p('goto free_list;')
1877 ri.cw.nl()
1879 ri.cw.p('return yds.first;')
1880 ri.cw.nl()
1881 ri.cw.p('free_list:')
1882 ri.cw.p(call_free(ri, rdir(direction), 'yds.first'))
1883 ri.cw.p('return NULL;')
1884 ri.cw.block_end()
1887 def call_free(ri, direction, var): argument
1888 return f"{op_prefix(ri, direction)}_free({var});"
1897 def print_alloc_wrapper(ri, direction): argument
1898 name = op_prefix(ri, direction)
1899 ri.cw.write_func_prot(f'static inline struct {name} *', f"{name}_alloc", [f"void"])
1900 ri.cw.block_start()
1901 ri.cw.p(f'return calloc(1, sizeof(struct {name}));')
1902 ri.cw.block_end()
1905 def print_free_prototype(ri, direction, suffix=';'): argument
1906 name = op_prefix(ri, direction)
1908 if ri.type_name_conflict:
1911 ri.cw.write_func_prot('void', f"{name}_free", [f"struct {struct_name} *{arg}"], suffix=suffix)
1914 def _print_type(ri, direction, struct): argument
1915 suffix = f'_{ri.type_name}{direction_to_suffix[direction]}'
1916 if not direction and ri.type_name_conflict:
1919 if ri.op_mode == 'dump':
1922 ri.cw.block_start(line=f"struct {ri.family.c_name}{suffix}")
1924 if ri.fixed_hdr:
1925 ri.cw.p(ri.fixed_hdr + ' _hdr;')
1926 ri.cw.nl()
1931 line = attr.presence_member(ri.ku_space, type_filter)
1934 ri.cw.block_start(line=f"struct")
1936 ri.cw.p(line)
1938 ri.cw.block_end(line='_present;')
1939 ri.cw.nl()
1942 ri.cw.p(f"__u32 {arg};")
1945 attr.struct_member(ri)
1947 ri.cw.block_end(line=';')
1948 ri.cw.nl()
1951 def print_type(ri, direction): argument
1952 _print_type(ri, direction, ri.struct[direction])
1955 def print_type_full(ri, struct): argument
1956 _print_type(ri, "", struct)
1959 def print_type_helpers(ri, direction, deref=False): argument
1960 print_free_prototype(ri, direction)
1961 ri.cw.nl()
1963 if ri.ku_space == 'user' and direction == 'request':
1964 for _, attr in ri.struct[direction].member_list():
1965 attr.setter(ri, ri.attr_set, direction, deref=deref)
1966 ri.cw.nl()
1969 def print_req_type_helpers(ri): argument
1970 if len(ri.struct["request"].attr_list) == 0:
1972 print_alloc_wrapper(ri, "request")
1973 print_type_helpers(ri, "request")
1976 def print_rsp_type_helpers(ri): argument
1977 if 'reply' not in ri.op[ri.op_mode]:
1979 print_type_helpers(ri, "reply")
1982 def print_parse_prototype(ri, direction, terminate=True): argument
1986 ri.cw.write_func_prot('void', f"{ri.op.render_name}{suffix}_parse",
1988 f"struct {ri.op.render_name}{suffix} *req"],
1992 def print_req_type(ri): argument
1993 if len(ri.struct["request"].attr_list) == 0:
1995 print_type(ri, "request")
1998 def print_req_free(ri): argument
1999 if 'request' not in ri.op[ri.op_mode]:
2001 _free_type(ri, 'request', ri.struct['request'])
2004 def print_rsp_type(ri): argument
2005 if (ri.op_mode == 'do' or ri.op_mode == 'dump') and 'reply' in ri.op[ri.op_mode]:
2007 elif ri.op_mode == 'event':
2011 print_type(ri, direction)
2014 def print_wrapped_type(ri): argument
2015 ri.cw.block_start(line=f"{type_name(ri, 'reply')}")
2016 if ri.op_mode == 'dump':
2017 ri.cw.p(f"{type_name(ri, 'reply')} *next;")
2018 elif ri.op_mode == 'notify' or ri.op_mode == 'event':
2019 ri.cw.p('__u16 family;')
2020 ri.cw.p('__u8 cmd;')
2021 ri.cw.p('struct ynl_ntf_base_type *next;')
2022 ri.cw.p(f"void (*free)({type_name(ri, 'reply')} *ntf);")
2023 ri.cw.p(f"{type_name(ri, 'reply', deref=True)} obj __attribute__((aligned(8)));")
2024 ri.cw.block_end(line=';')
2025 ri.cw.nl()
2026 print_free_prototype(ri, 'reply')
2027 ri.cw.nl()
2030 def _free_type_members_iter(ri, struct): argument
2033 ri.cw.p('unsigned int i;')
2034 ri.cw.nl()
2038 def _free_type_members(ri, var, struct, ref=''): argument
2040 attr.free(ri, var, ref)
2043 def _free_type(ri, direction, struct): argument
2046 print_free_prototype(ri, direction, suffix='')
2047 ri.cw.block_start()
2048 _free_type_members_iter(ri, struct)
2049 _free_type_members(ri, var, struct)
2051 ri.cw.p(f'free({var});')
2052 ri.cw.block_end()
2053 ri.cw.nl()
2056 def free_rsp_nested_prototype(ri): argument
2057 print_free_prototype(ri, "")
2060 def free_rsp_nested(ri, struct): argument
2061 _free_type(ri, "", struct)
2064 def print_rsp_free(ri): argument
2065 if 'reply' not in ri.op[ri.op_mode]:
2067 _free_type(ri, 'reply', ri.struct['reply'])
2070 def print_dump_type_free(ri): argument
2071 sub_type = type_name(ri, 'reply')
2073 print_free_prototype(ri, 'reply', suffix='')
2074 ri.cw.block_start()
2075 ri.cw.p(f"{sub_type} *next = rsp;")
2076 ri.cw.nl()
2077 ri.cw.block_start(line='while ((void *)next != YNL_LIST_END)')
2078 _free_type_members_iter(ri, ri.struct['reply'])
2079 ri.cw.p('rsp = next;')
2080 ri.cw.p('next = rsp->next;')
2081 ri.cw.nl()
2083 _free_type_members(ri, 'rsp', ri.struct['reply'], ref='obj.')
2084 ri.cw.p(f'free(rsp);')
2085 ri.cw.block_end()
2086 ri.cw.block_end()
2087 ri.cw.nl()
2090 def print_ntf_type_free(ri): argument
2091 print_free_prototype(ri, 'reply', suffix='')
2092 ri.cw.block_start()
2093 _free_type_members_iter(ri, ri.struct['reply'])
2094 _free_type_members(ri, 'rsp', ri.struct['reply'], ref='obj.')
2095 ri.cw.p(f'free(rsp);')
2096 ri.cw.block_end()
2097 ri.cw.nl()
2100 def print_req_policy_fwd(cw, struct, ri=None, terminate=True): argument
2101 if terminate and ri and policy_should_be_static(struct.family):
2107 if ri and policy_should_be_static(struct.family):
2115 if ri:
2116 name = ri.op.render_name
2117 if ri.op.dual_policy:
2118 name += '_' + ri.op_mode
2124 def print_req_policy(cw, struct, ri=None): argument
2125 if ri and ri.op:
2126 cw.ifdef_block(ri.op.get('config-cond', None))
2127 print_req_policy_fwd(cw, struct, ri=ri, terminate=False)
2542 def _render_user_ntf_entry(ri, op): argument
2543 ri.cw.block_start(line=f"[{op.enum_name}] = ")
2544 ri.cw.p(f".alloc_sz\t= sizeof({type_name(ri, 'event')}),")
2545 ri.cw.p(f".cb\t\t= {op_prefix(ri, 'reply', deref=True)}_parse,")
2546 ri.cw.p(f".policy\t\t= &{ri.struct['reply'].render_name}_nest,")
2547 ri.cw.p(f".free\t\t= (void *){op_prefix(ri, 'notify')}_free,")
2548 ri.cw.block_end(line=',')
2562 ri = RenderInfo(cw, family, "user", op, "notify")
2564 ri = RenderInfo(cw, family, "user", ntf_op, "event")
2567 _render_user_ntf_entry(ri, ntf_op)
2571 ri = RenderInfo(cw, family, "user", op, "event")
2572 _render_user_ntf_entry(ri, op)
2734 ri = RenderInfo(cw, parsed, args.mode, op, "do")
2735 print_req_policy_fwd(cw, ri.struct['request'], ri=ri)
2765 ri = RenderInfo(cw, parsed, args.mode, op, op_mode)
2766 print_req_policy(cw, ri.struct['request'], ri=ri)
2785 ri = RenderInfo(cw, parsed, args.mode, "", "", attr_set)
2786 print_type_full(ri, struct)
2793 ri = RenderInfo(cw, parsed, args.mode, op, "do")
2794 print_req_type(ri)
2795 print_req_type_helpers(ri)
2797 print_rsp_type(ri)
2798 print_rsp_type_helpers(ri)
2800 print_req_prototype(ri)
2805 ri = RenderInfo(cw, parsed, args.mode, op, 'dump')
2806 print_req_type(ri)
2807 print_req_type_helpers(ri)
2808 if not ri.type_consistent:
2809 print_rsp_type(ri)
2810 print_wrapped_type(ri)
2811 print_dump_prototype(ri)
2816 ri = RenderInfo(cw, parsed, args.mode, op, 'notify')
2817 if not ri.type_consistent:
2819 print_wrapped_type(ri)
2823 ri = RenderInfo(cw, parsed, args.mode, op, 'event')
2825 print_rsp_type(ri)
2827 print_wrapped_type(ri)
2856 ri = RenderInfo(cw, parsed, args.mode, "", "", attr_set)
2857 free_rsp_nested_prototype(ri)
2859 put_req_nested_prototype(ri, struct)
2861 parse_rsp_nested_prototype(ri, struct)
2864 ri = RenderInfo(cw, parsed, args.mode, "", "", attr_set)
2866 free_rsp_nested(ri, struct)
2868 put_req_nested(ri, struct)
2870 parse_rsp_nested(ri, struct)
2876 ri = RenderInfo(cw, parsed, args.mode, op, "do")
2877 print_req_free(ri)
2878 print_rsp_free(ri)
2879 parse_rsp_msg(ri)
2880 print_req(ri)
2885 ri = RenderInfo(cw, parsed, args.mode, op, "dump")
2886 if not ri.type_consistent:
2887 parse_rsp_msg(ri, deref=True)
2888 print_req_free(ri)
2889 print_dump_type_free(ri)
2890 print_dump(ri)
2895 ri = RenderInfo(cw, parsed, args.mode, op, 'notify')
2896 if not ri.type_consistent:
2898 print_ntf_type_free(ri)
2904 ri = RenderInfo(cw, parsed, args.mode, op, "do")
2905 parse_rsp_msg(ri)
2907 ri = RenderInfo(cw, parsed, args.mode, op, "event")
2908 print_ntf_type_free(ri)