Lines Matching refs:req
29 void idiagnl_req_get(struct idiagnl_req *req) in idiagnl_req_get() argument
31 nl_object_get((struct nl_object *) req); in idiagnl_req_get()
34 void idiagnl_req_put(struct idiagnl_req *req) in idiagnl_req_put() argument
36 nl_object_put((struct nl_object *) req); in idiagnl_req_put()
44 uint8_t idiagnl_req_get_family(const struct idiagnl_req *req) in idiagnl_req_get_family() argument
46 return req->idiag_family; in idiagnl_req_get_family()
49 void idiagnl_req_set_family(struct idiagnl_req *req, uint8_t family) in idiagnl_req_set_family() argument
51 req->idiag_family = family; in idiagnl_req_set_family()
54 uint8_t idiagnl_req_get_ext(const struct idiagnl_req *req) in idiagnl_req_get_ext() argument
56 return req->idiag_ext; in idiagnl_req_get_ext()
59 void idiagnl_req_set_ext(struct idiagnl_req *req, uint8_t ext) in idiagnl_req_set_ext() argument
61 req->idiag_ext = ext; in idiagnl_req_set_ext()
64 uint32_t idiagnl_req_get_ifindex(const struct idiagnl_req *req) in idiagnl_req_get_ifindex() argument
66 return req->idiag_ifindex; in idiagnl_req_get_ifindex()
69 void idiagnl_req_set_ifindex(struct idiagnl_req *req, uint32_t ifindex) in idiagnl_req_set_ifindex() argument
71 req->idiag_states = ifindex; in idiagnl_req_set_ifindex()
74 uint32_t idiagnl_req_get_states(const struct idiagnl_req *req) in idiagnl_req_get_states() argument
76 return req->idiag_states; in idiagnl_req_get_states()
79 void idiagnl_req_set_states(struct idiagnl_req *req, uint32_t states) in idiagnl_req_set_states() argument
81 req->idiag_states = states; in idiagnl_req_set_states()
84 uint32_t idiagnl_req_get_dbs(const struct idiagnl_req *req) in idiagnl_req_get_dbs() argument
86 return req->idiag_dbs; in idiagnl_req_get_dbs()
89 void idiagnl_req_set_dbs(struct idiagnl_req *req, uint32_t dbs) in idiagnl_req_set_dbs() argument
91 req->idiag_dbs = dbs; in idiagnl_req_set_dbs()
94 struct nl_addr *idiagnl_req_get_src(const struct idiagnl_req *req) in idiagnl_req_get_src() argument
96 return req->idiag_src; in idiagnl_req_get_src()
99 int idiagnl_req_set_src(struct idiagnl_req *req, struct nl_addr *addr) in idiagnl_req_set_src() argument
101 if (req->idiag_src) in idiagnl_req_set_src()
102 nl_addr_put(req->idiag_src); in idiagnl_req_set_src()
105 req->idiag_src = addr; in idiagnl_req_set_src()
110 struct nl_addr *idiagnl_req_get_dst(const struct idiagnl_req *req) in idiagnl_req_get_dst() argument
112 return req->idiag_dst; in idiagnl_req_get_dst()
115 int idiagnl_req_set_dst(struct idiagnl_req *req, struct nl_addr *addr) in idiagnl_req_set_dst() argument
117 if (req->idiag_dst) in idiagnl_req_set_dst()
118 nl_addr_put(req->idiag_dst); in idiagnl_req_set_dst()
121 req->idiag_dst = addr; in idiagnl_req_set_dst()
130 struct idiagnl_req *req = (struct idiagnl_req *) a; in idiag_req_dump_line() local
133 nl_dump_line(p, "%s ", nl_af2str(req->idiag_family, buf, sizeof(buf))); in idiag_req_dump_line()
134 nl_dump(p, "src %s ", nl_addr2str(req->idiag_src, buf, sizeof(buf))); in idiag_req_dump_line()
135 nl_dump(p, "dst %s ", nl_addr2str(req->idiag_dst, buf, sizeof(buf))); in idiag_req_dump_line()
136 nl_dump(p, "iif %d ", req->idiag_ifindex); in idiag_req_dump_line()
142 struct idiagnl_req *req = (struct idiagnl_req *) a; in idiag_req_dump_details() local
146 nl_dump(p, "%s ", nl_af2str(req->idiag_family, buf, sizeof(buf))); in idiag_req_dump_details()
148 idiagnl_exts2str(req->idiag_ext, buf, sizeof(buf))); in idiag_req_dump_details()
149 nl_dump(p, "src %s ", nl_addr2str(req->idiag_src, buf, sizeof(buf))); in idiag_req_dump_details()
150 nl_dump(p, "dst %s ", nl_addr2str(req->idiag_dst, buf, sizeof(buf))); in idiag_req_dump_details()
151 nl_dump(p, "iif %d ", req->idiag_ifindex); in idiag_req_dump_details()
152 nl_dump(p, "states %s ", idiagnl_state2str(req->idiag_states, buf, in idiag_req_dump_details()
154 nl_dump(p, "dbs %d", req->idiag_dbs); in idiag_req_dump_details()
165 struct idiagnl_req *req = (struct idiagnl_req *) a; in idiagnl_req_free() local
169 nl_addr_put(req->idiag_src); in idiagnl_req_free()
170 nl_addr_put(req->idiag_dst); in idiagnl_req_free()
191 struct idiagnl_req *req = NULL; in idiagnl_req_parse() local
196 req = idiagnl_req_alloc(); in idiagnl_req_parse()
197 if (!req) in idiagnl_req_parse()
201 req->idiag_family = raw_req->idiag_family; in idiagnl_req_parse()
202 req->idiag_ext = raw_req->idiag_ext; in idiagnl_req_parse()
203 req->idiag_states = raw_req->idiag_states; in idiagnl_req_parse()
204 req->idiag_dbs = raw_req->idiag_dbs; in idiagnl_req_parse()
205 req->idiag_ifindex = raw_req->id.idiag_if; in idiagnl_req_parse()
212 err = idiagnl_req_set_dst(req, dst); in idiagnl_req_parse()
223 err = idiagnl_req_set_src(req, src); in idiagnl_req_parse()
229 *result = req; in idiagnl_req_parse()
233 idiagnl_req_put(req); in idiagnl_req_parse()