Lines Matching full:ri

136     def is_recursive_for_op(self, ri):  argument
137 return self.is_recursive() and not ri.op
154 def _complex_member_type(self, ri): argument
160 def free(self, ri, var, ref): argument
162 ri.cw.p(f'free({var}->{ref}{self.c_name});')
164 def arg_member(self, ri): argument
165 member = self._complex_member_type(ri)
173 def struct_member(self, ri): argument
175 ri.cw.p(f"unsigned int n_{self.c_name};")
176 member = self._complex_member_type(ri)
179 if self.is_recursive_for_op(ri):
181 ri.cw.p(f"{member} {ptr}{self.c_name};")
183 members = self.arg_member(ri)
185 ri.cw.p(one + ';')
206 def _attr_put_line(self, ri, var, line): argument
208 ri.cw.p(f"if ({var}->_present.{self.c_name})")
210 ri.cw.p(f"if ({var}->_present.{self.c_name}_len)")
211 ri.cw.p(f"{line};")
213 def _attr_put_simple(self, ri, var, put_type): argument
215 self._attr_put_line(ri, var, line)
217 def attr_put(self, ri, var): argument
220 def _attr_get(self, ri, var): argument
223 def attr_get(self, ri, var, first): argument
224 lines, init_lines, local_vars = self._attr_get(ri, var)
231 ri.cw.block_start(line=f"{kw} (type == {self.enum_name})")
234 ri.cw.p(local)
235 ri.cw.nl()
238 ri.cw.p("if (ynl_attr_validate(yarg, attr))")
239 ri.cw.p("return YNL_PARSE_CB_ERROR;")
241 ri.cw.p(f"{var}->_present.{self.c_name} = 1;")
244 ri.cw.nl()
246 ri.cw.p(line)
249 ri.cw.p(line)
250 ri.cw.block_end()
253 def _setter_lines(self, ri, member, presence): argument
256 def setter(self, ri, space, direction, deref=False, ref=None): argument
270 code += self._setter_lines(ri, member, presence)
272 func_name = f"{op_prefix(ri, direction, deref=deref)}_set_{'_'.join(ref)}"
277 ri.cw.write_func('static inline void', func_name, body=code,
278 … args=[f'{type_name(ri, direction, deref=deref)} *{var}'] + self.arg_member(ri))
285 def arg_member(self, ri): argument
288 def _attr_get(self, ri, var): argument
297 def attr_put(self, ri, var): argument
300 def attr_get(self, ri, var, first): argument
303 def setter(self, ri, space, direction, deref=False, ref=None): argument
311 def arg_member(self, ri): argument
317 def attr_put(self, ri, var): argument
320 def attr_get(self, ri, var, first): argument
326 def setter(self, ri, space, direction, deref=False, ref=None): argument
405 def arg_member(self, ri): argument
408 def attr_put(self, ri, var): argument
409 self._attr_put_simple(ri, var, self.type)
411 def _attr_get(self, ri, var): argument
414 def _setter_lines(self, ri, member, presence): argument
419 def arg_member(self, ri): argument
425 def attr_put(self, ri, var): argument
426 self._attr_put_line(ri, var, f"ynl_attr_put(nlh, {self.enum_name}, NULL, 0)")
428 def _attr_get(self, ri, var): argument
431 def _setter_lines(self, ri, member, presence): argument
436 def arg_member(self, ri): argument
442 def struct_member(self, ri): argument
443 ri.cw.p(f"char *{self.c_name};")
467 def attr_put(self, ri, var): argument
468 self._attr_put_simple(ri, var, 'str')
470 def _attr_get(self, ri, var): argument
479 def _setter_lines(self, ri, member, presence): argument
488 def arg_member(self, ri): argument
494 def struct_member(self, ri): argument
495 ri.cw.p(f"void *{self.c_name};")
521 def attr_put(self, ri, var): argument
522 self._attr_put_line(ri, var, f"ynl_attr_put(nlh, {self.enum_name}, " +
525 def _attr_get(self, ri, var): argument
533 def _setter_lines(self, ri, member, presence): argument
541 def _complex_member_type(self, ri): argument
554 def attr_put(self, ri, var): argument
556 self._attr_put_line(ri, var, line)
558 def _attr_get(self, ri, var): argument
561 def _setter_lines(self, ri, member, presence): argument
569 def _complex_member_type(self, ri): argument
572 def free(self, ri, var, ref): argument
574 if self.is_recursive_for_op(ri):
576 ri.cw.p(f'if ({var}->{ref}{self.c_name})')
577 ri.cw.p(f'{self.nested_render_name}_free({at}{var}->{ref}{self.c_name});')
585 def attr_put(self, ri, var): argument
586 at = '' if self.is_recursive_for_op(ri) else '&'
587 self._attr_put_line(ri, var, f"{self.nested_render_name}_put(nlh, " +
590 def _attr_get(self, ri, var): argument
597 def setter(self, ri, space, direction, deref=False, ref=None): argument
600 for _, attr in ri.family.pure_nested_structs[self.nested_attrs].member_list():
603 attr.setter(ri, self.nested_attrs, direction, deref=deref, ref=ref)
618 def _complex_member_type(self, ri): argument
622 scalar_pfx = '__' if ri.ku_space == 'user' else ''
630 def free(self, ri, var, ref): argument
632 ri.cw.p(f"free({var}->{ref}{self.c_name});")
634 ri.cw.p(f"for (i = 0; i < {var}->{ref}n_{self.c_name}; i++)")
635 ri.cw.p(f'{self.nested_render_name}_free(&{var}->{ref}{self.c_name}[i]);')
636 ri.cw.p(f"free({var}->{ref}{self.c_name});")
646 def _attr_get(self, ri, var): argument
649 def attr_put(self, ri, var): argument
652 ri.cw.p(f"for (unsigned int i = 0; i < {var}->n_{self.c_name}; i++)")
653 ri.cw.p(f"ynl_attr_put_{put_type}(nlh, {self.enum_name}, {var}->{self.c_name}[i]);")
655 ri.cw.p(f"for (unsigned int i = 0; i < {var}->n_{self.c_name}; i++)")
656 self._attr_put_line(ri, var, f"{self.nested_render_name}_put(nlh, " +
661 def _setter_lines(self, ri, member, presence): argument
676 def _complex_member_type(self, ri): argument
680 scalar_pfx = '__' if ri.ku_space == 'user' else ''
688 def _attr_get(self, ri, var): argument
697 def _complex_member_type(self, ri): argument
703 def _attr_get(self, ri, var): argument
1501 def op_prefix(ri, direction, deref=False): argument
1502 suffix = f"_{ri.type_name}"
1504 if not ri.op_mode or ri.op_mode == 'do':
1510 if ri.type_consistent:
1514 suffix += op_mode_to_wrapper[ri.op_mode]
1519 return f"{ri.family.c_name}{suffix}"
1522 def type_name(ri, direction, deref=False): argument
1523 return f"struct {op_prefix(ri, direction, deref=deref)}"
1526 def print_prototype(ri, direction, terminate=True, doc=None): argument
1529 fname = ri.op.render_name
1530 if ri.op_mode == 'dump':
1534 if 'request' in ri.op[ri.op_mode]:
1535 args.append(f"{type_name(ri, direction)} *" + f"{direction_to_suffix[direction][1:]}")
1538 if 'reply' in ri.op[ri.op_mode]:
1539 ret = f"{type_name(ri, rdir(direction))} *"
1541 ri.cw.write_func_prot(ret, fname, args, doc=doc, suffix=suffix)
1544 def print_req_prototype(ri): argument
1545 print_prototype(ri, "request", doc=ri.op['doc'])
1548 def print_dump_prototype(ri): argument
1549 print_prototype(ri, "request")
1629 def put_req_nested_prototype(ri, struct, suffix=';'): argument
1634 ri.cw.write_func_prot('int', f'{struct.render_name}_put', func_args,
1638 def put_req_nested(ri, struct): argument
1639 put_req_nested_prototype(ri, struct, suffix='')
1640 ri.cw.block_start()
1641 ri.cw.write_func_lvar('struct nlattr *nest;')
1643 ri.cw.p("nest = ynl_attr_nest_start(nlh, attr_type);")
1646 arg.attr_put(ri, "obj")
1648 ri.cw.p("ynl_attr_nest_end(nlh, nest);")
1650 ri.cw.nl()
1651 ri.cw.p('return 0;')
1652 ri.cw.block_end()
1653 ri.cw.nl()
1656 def _multi_parse(ri, struct, init_lines, local_vars): argument
1660 if ri.fixed_hdr:
1688 ri.cw.block_start()
1689 ri.cw.write_func_lvar(local_vars)
1692 ri.cw.p(line)
1693 ri.cw.nl()
1696 ri.cw.p(f'dst->{arg} = {arg};')
1698 if ri.fixed_hdr:
1699 ri.cw.p('hdr = ynl_nlmsg_data_offset(nlh, sizeof(struct genlmsghdr));')
1700 ri.cw.p(f"memcpy(&dst->_hdr, hdr, sizeof({ri.fixed_hdr}));")
1703 ri.cw.p(f"if (dst->{aspec.c_name})")
1704ri.cw.p(f'return ynl_error_parse(yarg, "attribute already present ({struct.attr_set.name}.{aspec.n…
1706 ri.cw.nl()
1707 ri.cw.block_start(line=iter_line)
1708 ri.cw.p('unsigned int type = ynl_attr_type(attr);')
1709 ri.cw.nl()
1713 good = arg.attr_get(ri, 'dst', first=first)
1717 ri.cw.block_end()
1718 ri.cw.nl()
1723 ri.cw.block_start(line=f"if (n_{aspec.c_name})")
1724 ri.cw.p(f"dst->{aspec.c_name} = calloc(n_{aspec.c_name}, sizeof(*dst->{aspec.c_name}));")
1725 ri.cw.p(f"dst->n_{aspec.c_name} = n_{aspec.c_name};")
1726 ri.cw.p('i = 0;')
1727 ri.cw.p(f"parg.rsp_policy = &{aspec.nested_render_name}_nest;")
1728 ri.cw.block_start(line=f"ynl_attr_for_each_nested(attr, attr_{aspec.c_name})")
1729 ri.cw.p(f"parg.data = &dst->{aspec.c_name}[i];")
1730 ri.cw.p(f"if ({aspec.nested_render_name}_parse(&parg, attr, ynl_attr_type(attr)))")
1731 ri.cw.p('return YNL_PARSE_CB_ERROR;')
1732 ri.cw.p('i++;')
1733 ri.cw.block_end()
1734 ri.cw.block_end()
1735 ri.cw.nl()
1739 ri.cw.block_start(line=f"if (n_{aspec.c_name})")
1740 ri.cw.p(f"dst->{aspec.c_name} = calloc(n_{aspec.c_name}, sizeof(*dst->{aspec.c_name}));")
1741 ri.cw.p(f"dst->n_{aspec.c_name} = n_{aspec.c_name};")
1742 ri.cw.p('i = 0;')
1744 ri.cw.p(f"parg.rsp_policy = &{aspec.nested_render_name}_nest;")
1745 ri.cw.block_start(line=iter_line)
1746 ri.cw.block_start(line=f"if (ynl_attr_type(attr) == {aspec.enum_name})")
1748 ri.cw.p(f"parg.data = &dst->{aspec.c_name}[i];")
1749 ri.cw.p(f"if ({aspec.nested_render_name}_parse(&parg, attr))")
1750 ri.cw.p('return YNL_PARSE_CB_ERROR;')
1752 ri.cw.p(f"dst->{aspec.c_name}[i] = ynl_attr_get_{aspec.type}(attr);")
1755 ri.cw.p('i++;')
1756 ri.cw.block_end()
1757 ri.cw.block_end()
1758 ri.cw.block_end()
1759 ri.cw.nl()
1762 ri.cw.p('return 0;')
1764 ri.cw.p('return YNL_PARSE_CB_OK;')
1765 ri.cw.block_end()
1766 ri.cw.nl()
1769 def parse_rsp_nested_prototype(ri, struct, suffix=';'): argument
1775 ri.cw.write_func_prot('int', f'{struct.render_name}_parse', func_args,
1779 def parse_rsp_nested(ri, struct): argument
1780 parse_rsp_nested_prototype(ri, struct, suffix='')
1787 _multi_parse(ri, struct, init_lines, local_vars)
1790 ri.cw.block_start()
1791 ri.cw.p('return 0;')
1792 ri.cw.block_end()
1793 ri.cw.nl()
1796 def parse_rsp_msg(ri, deref=False): argument
1797 if 'reply' not in ri.op[ri.op_mode] and ri.op_mode != 'event':
1803 local_vars = [f'{type_name(ri, "reply", deref=deref)} *dst;',
1807 ri.cw.write_func_prot('int', f'{op_prefix(ri, "reply", deref=deref)}_parse', func_args)
1809 if ri.struct["reply"].member_list():
1810 _multi_parse(ri, ri.struct["reply"], init_lines, local_vars)
1813 ri.cw.block_start()
1814 ri.cw.p('return YNL_PARSE_CB_OK;')
1815 ri.cw.block_end()
1816 ri.cw.nl()
1819 def print_req(ri): argument
1827 if 'reply' in ri.op[ri.op_mode]:
1830 local_vars += [f'{type_name(ri, rdir(direction))} *rsp;']
1832 if ri.fixed_hdr:
1836 print_prototype(ri, direction, terminate=False)
1837 ri.cw.block_start()
1838 ri.cw.write_func_lvar(local_vars)
1840 ri.cw.p(f"nlh = ynl_gemsg_start_req(ys, {ri.nl.get_family_id()}, {ri.op.enum_name}, 1);")
1842 ri.cw.p(f"ys->req_policy = &{ri.struct['request'].render_name}_nest;")
1843 if 'reply' in ri.op[ri.op_mode]:
1844 ri.cw.p(f"yrs.yarg.rsp_policy = &{ri.struct['reply'].render_name}_nest;")
1845 ri.cw.nl()
1847 if ri.fixed_hdr:
1848 ri.cw.p("hdr_len = sizeof(req->_hdr);")
1849 ri.cw.p("hdr = ynl_nlmsg_put_extra_header(nlh, hdr_len);")
1850 ri.cw.p("memcpy(hdr, &req->_hdr, hdr_len);")
1851 ri.cw.nl()
1853 for _, attr in ri.struct["request"].member_list():
1854 attr.attr_put(ri, "req")
1855 ri.cw.nl()
1857 if 'reply' in ri.op[ri.op_mode]:
1858 ri.cw.p('rsp = calloc(1, sizeof(*rsp));')
1859 ri.cw.p('yrs.yarg.data = rsp;')
1860 ri.cw.p(f"yrs.cb = {op_prefix(ri, 'reply')}_parse;")
1861 if ri.op.value is not None:
1862 ri.cw.p(f'yrs.rsp_cmd = {ri.op.enum_name};')
1864 ri.cw.p(f'yrs.rsp_cmd = {ri.op.rsp_value};')
1865 ri.cw.nl()
1866 ri.cw.p("err = ynl_exec(ys, nlh, &yrs);")
1867 ri.cw.p('if (err < 0)')
1868 if 'reply' in ri.op[ri.op_mode]:
1869 ri.cw.p('goto err_free;')
1871 ri.cw.p('return -1;')
1872 ri.cw.nl()
1874 ri.cw.p(f"return {ret_ok};")
1875 ri.cw.nl()
1877 if 'reply' in ri.op[ri.op_mode]:
1878 ri.cw.p('err_free:')
1879 ri.cw.p(f"{call_free(ri, rdir(direction), 'rsp')}")
1880 ri.cw.p(f"return {ret_err};")
1882 ri.cw.block_end()
1885 def print_dump(ri): argument
1887 print_prototype(ri, direction, terminate=False)
1888 ri.cw.block_start()
1893 if ri.fixed_hdr:
1897 ri.cw.write_func_lvar(local_vars)
1899 ri.cw.p('yds.yarg.ys = ys;')
1900 ri.cw.p(f"yds.yarg.rsp_policy = &{ri.struct['reply'].render_name}_nest;")
1901 ri.cw.p("yds.yarg.data = NULL;")
1902 ri.cw.p(f"yds.alloc_sz = sizeof({type_name(ri, rdir(direction))});")
1903 ri.cw.p(f"yds.cb = {op_prefix(ri, 'reply', deref=True)}_parse;")
1904 if ri.op.value is not None:
1905 ri.cw.p(f'yds.rsp_cmd = {ri.op.enum_name};')
1907 ri.cw.p(f'yds.rsp_cmd = {ri.op.rsp_value};')
1908 ri.cw.nl()
1909 ri.cw.p(f"nlh = ynl_gemsg_start_dump(ys, {ri.nl.get_family_id()}, {ri.op.enum_name}, 1);")
1911 if ri.fixed_hdr:
1912 ri.cw.p("hdr_len = sizeof(req->_hdr);")
1913 ri.cw.p("hdr = ynl_nlmsg_put_extra_header(nlh, hdr_len);")
1914 ri.cw.p("memcpy(hdr, &req->_hdr, hdr_len);")
1915 ri.cw.nl()
1917 if "request" in ri.op[ri.op_mode]:
1918 ri.cw.p(f"ys->req_policy = &{ri.struct['request'].render_name}_nest;")
1919 ri.cw.nl()
1920 for _, attr in ri.struct["request"].member_list():
1921 attr.attr_put(ri, "req")
1922 ri.cw.nl()
1924 ri.cw.p('err = ynl_exec_dump(ys, nlh, &yds);')
1925 ri.cw.p('if (err < 0)')
1926 ri.cw.p('goto free_list;')
1927 ri.cw.nl()
1929 ri.cw.p('return yds.first;')
1930 ri.cw.nl()
1931 ri.cw.p('free_list:')
1932 ri.cw.p(call_free(ri, rdir(direction), 'yds.first'))
1933 ri.cw.p('return NULL;')
1934 ri.cw.block_end()
1937 def call_free(ri, direction, var): argument
1938 return f"{op_prefix(ri, direction)}_free({var});"
1947 def print_alloc_wrapper(ri, direction): argument
1948 name = op_prefix(ri, direction)
1949 ri.cw.write_func_prot(f'static inline struct {name} *', f"{name}_alloc", [f"void"])
1950 ri.cw.block_start()
1951 ri.cw.p(f'return calloc(1, sizeof(struct {name}));')
1952 ri.cw.block_end()
1955 def print_free_prototype(ri, direction, suffix=';'): argument
1956 name = op_prefix(ri, direction)
1958 if ri.type_name_conflict:
1961 ri.cw.write_func_prot('void', f"{name}_free", [f"struct {struct_name} *{arg}"], suffix=suffix)
1964 def _print_type(ri, direction, struct): argument
1965 suffix = f'_{ri.type_name}{direction_to_suffix[direction]}'
1966 if not direction and ri.type_name_conflict:
1969 if ri.op_mode == 'dump':
1972 ri.cw.block_start(line=f"struct {ri.family.c_name}{suffix}")
1974 if ri.fixed_hdr:
1975 ri.cw.p(ri.fixed_hdr + ' _hdr;')
1976 ri.cw.nl()
1981 line = attr.presence_member(ri.ku_space, type_filter)
1984 ri.cw.block_start(line=f"struct")
1986 ri.cw.p(line)
1988 ri.cw.block_end(line='_present;')
1989 ri.cw.nl()
1992 ri.cw.p(f"__u32 {arg};")
1995 attr.struct_member(ri)
1997 ri.cw.block_end(line=';')
1998 ri.cw.nl()
2001 def print_type(ri, direction): argument
2002 _print_type(ri, direction, ri.struct[direction])
2005 def print_type_full(ri, struct): argument
2006 _print_type(ri, "", struct)
2009 def print_type_helpers(ri, direction, deref=False): argument
2010 print_free_prototype(ri, direction)
2011 ri.cw.nl()
2013 if ri.ku_space == 'user' and direction == 'request':
2014 for _, attr in ri.struct[direction].member_list():
2015 attr.setter(ri, ri.attr_set, direction, deref=deref)
2016 ri.cw.nl()
2019 def print_req_type_helpers(ri): argument
2020 if len(ri.struct["request"].attr_list) == 0:
2022 print_alloc_wrapper(ri, "request")
2023 print_type_helpers(ri, "request")
2026 def print_rsp_type_helpers(ri): argument
2027 if 'reply' not in ri.op[ri.op_mode]:
2029 print_type_helpers(ri, "reply")
2032 def print_parse_prototype(ri, direction, terminate=True): argument
2036 ri.cw.write_func_prot('void', f"{ri.op.render_name}{suffix}_parse",
2038 f"struct {ri.op.render_name}{suffix} *req"],
2042 def print_req_type(ri): argument
2043 if len(ri.struct["request"].attr_list) == 0:
2045 print_type(ri, "request")
2048 def print_req_free(ri): argument
2049 if 'request' not in ri.op[ri.op_mode]:
2051 _free_type(ri, 'request', ri.struct['request'])
2054 def print_rsp_type(ri): argument
2055 if (ri.op_mode == 'do' or ri.op_mode == 'dump') and 'reply' in ri.op[ri.op_mode]:
2057 elif ri.op_mode == 'event':
2061 print_type(ri, direction)
2064 def print_wrapped_type(ri): argument
2065 ri.cw.block_start(line=f"{type_name(ri, 'reply')}")
2066 if ri.op_mode == 'dump':
2067 ri.cw.p(f"{type_name(ri, 'reply')} *next;")
2068 elif ri.op_mode == 'notify' or ri.op_mode == 'event':
2069 ri.cw.p('__u16 family;')
2070 ri.cw.p('__u8 cmd;')
2071 ri.cw.p('struct ynl_ntf_base_type *next;')
2072 ri.cw.p(f"void (*free)({type_name(ri, 'reply')} *ntf);")
2073 ri.cw.p(f"{type_name(ri, 'reply', deref=True)} obj __attribute__((aligned(8)));")
2074 ri.cw.block_end(line=';')
2075 ri.cw.nl()
2076 print_free_prototype(ri, 'reply')
2077 ri.cw.nl()
2080 def _free_type_members_iter(ri, struct): argument
2083 ri.cw.p('unsigned int i;')
2084 ri.cw.nl()
2088 def _free_type_members(ri, var, struct, ref=''): argument
2090 attr.free(ri, var, ref)
2093 def _free_type(ri, direction, struct): argument
2096 print_free_prototype(ri, direction, suffix='')
2097 ri.cw.block_start()
2098 _free_type_members_iter(ri, struct)
2099 _free_type_members(ri, var, struct)
2101 ri.cw.p(f'free({var});')
2102 ri.cw.block_end()
2103 ri.cw.nl()
2106 def free_rsp_nested_prototype(ri): argument
2107 print_free_prototype(ri, "")
2110 def free_rsp_nested(ri, struct): argument
2111 _free_type(ri, "", struct)
2114 def print_rsp_free(ri): argument
2115 if 'reply' not in ri.op[ri.op_mode]:
2117 _free_type(ri, 'reply', ri.struct['reply'])
2120 def print_dump_type_free(ri): argument
2121 sub_type = type_name(ri, 'reply')
2123 print_free_prototype(ri, 'reply', suffix='')
2124 ri.cw.block_start()
2125 ri.cw.p(f"{sub_type} *next = rsp;")
2126 ri.cw.nl()
2127 ri.cw.block_start(line='while ((void *)next != YNL_LIST_END)')
2128 _free_type_members_iter(ri, ri.struct['reply'])
2129 ri.cw.p('rsp = next;')
2130 ri.cw.p('next = rsp->next;')
2131 ri.cw.nl()
2133 _free_type_members(ri, 'rsp', ri.struct['reply'], ref='obj.')
2134 ri.cw.p(f'free(rsp);')
2135 ri.cw.block_end()
2136 ri.cw.block_end()
2137 ri.cw.nl()
2140 def print_ntf_type_free(ri): argument
2141 print_free_prototype(ri, 'reply', suffix='')
2142 ri.cw.block_start()
2143 _free_type_members_iter(ri, ri.struct['reply'])
2144 _free_type_members(ri, 'rsp', ri.struct['reply'], ref='obj.')
2145 ri.cw.p(f'free(rsp);')
2146 ri.cw.block_end()
2147 ri.cw.nl()
2150 def print_req_policy_fwd(cw, struct, ri=None, terminate=True): argument
2151 if terminate and ri and policy_should_be_static(struct.family):
2157 if ri and policy_should_be_static(struct.family):
2165 if ri:
2166 name = ri.op.render_name
2167 if ri.op.dual_policy:
2168 name += '_' + ri.op_mode
2174 def print_req_policy(cw, struct, ri=None): argument
2175 if ri and ri.op:
2176 cw.ifdef_block(ri.op.get('config-cond', None))
2177 print_req_policy_fwd(cw, struct, ri=ri, terminate=False)
2677 def _render_user_ntf_entry(ri, op): argument
2678 ri.cw.block_start(line=f"[{op.enum_name}] = ")
2679 ri.cw.p(f".alloc_sz\t= sizeof({type_name(ri, 'event')}),")
2680 ri.cw.p(f".cb\t\t= {op_prefix(ri, 'reply', deref=True)}_parse,")
2681 ri.cw.p(f".policy\t\t= &{ri.struct['reply'].render_name}_nest,")
2682 ri.cw.p(f".free\t\t= (void *){op_prefix(ri, 'notify')}_free,")
2683 ri.cw.block_end(line=',')
2697 ri = RenderInfo(cw, family, "user", op, "notify")
2699 ri = RenderInfo(cw, family, "user", ntf_op, "event")
2702 _render_user_ntf_entry(ri, ntf_op)
2706 ri = RenderInfo(cw, family, "user", op, "event")
2707 _render_user_ntf_entry(ri, op)
2871 ri = RenderInfo(cw, parsed, args.mode, op, "do")
2872 print_req_policy_fwd(cw, ri.struct['request'], ri=ri)
2902 ri = RenderInfo(cw, parsed, args.mode, op, op_mode)
2903 print_req_policy(cw, ri.struct['request'], ri=ri)
2922 ri = RenderInfo(cw, parsed, args.mode, "", "", attr_set)
2923 print_type_full(ri, struct)
2930 ri = RenderInfo(cw, parsed, args.mode, op, "do")
2931 print_req_type(ri)
2932 print_req_type_helpers(ri)
2934 print_rsp_type(ri)
2935 print_rsp_type_helpers(ri)
2937 print_req_prototype(ri)
2942 ri = RenderInfo(cw, parsed, args.mode, op, 'dump')
2943 print_req_type(ri)
2944 print_req_type_helpers(ri)
2945 if not ri.type_consistent:
2946 print_rsp_type(ri)
2947 print_wrapped_type(ri)
2948 print_dump_prototype(ri)
2953 ri = RenderInfo(cw, parsed, args.mode, op, 'notify')
2954 if not ri.type_consistent:
2956 print_wrapped_type(ri)
2960 ri = RenderInfo(cw, parsed, args.mode, op, 'event')
2962 print_rsp_type(ri)
2964 print_wrapped_type(ri)
2993 ri = RenderInfo(cw, parsed, args.mode, "", "", attr_set)
2994 free_rsp_nested_prototype(ri)
2996 put_req_nested_prototype(ri, struct)
2998 parse_rsp_nested_prototype(ri, struct)
3001 ri = RenderInfo(cw, parsed, args.mode, "", "", attr_set)
3003 free_rsp_nested(ri, struct)
3005 put_req_nested(ri, struct)
3007 parse_rsp_nested(ri, struct)
3013 ri = RenderInfo(cw, parsed, args.mode, op, "do")
3014 print_req_free(ri)
3015 print_rsp_free(ri)
3016 parse_rsp_msg(ri)
3017 print_req(ri)
3022 ri = RenderInfo(cw, parsed, args.mode, op, "dump")
3023 if not ri.type_consistent:
3024 parse_rsp_msg(ri, deref=True)
3025 print_req_free(ri)
3026 print_dump_type_free(ri)
3027 print_dump(ri)
3032 ri = RenderInfo(cw, parsed, args.mode, op, 'notify')
3033 if not ri.type_consistent:
3035 print_ntf_type_free(ri)
3041 ri = RenderInfo(cw, parsed, args.mode, op, "do")
3042 parse_rsp_msg(ri)
3044 ri = RenderInfo(cw, parsed, args.mode, op, "event")
3045 print_ntf_type_free(ri)