Lines Matching defs:fp
49 FILE *fp = (FILE*)arg;
69 fprintf(fp, "acquire ");
71 fprintf(fp, "proto %s ", strxf_xfrmproto(xacq->id.proto));
74 fprintf(fp, "spi 0x%08x", spi);
76 fprintf(fp, "(%u)", spi);
77 fprintf(fp, " ");
79 fprintf(fp, "%s", _SL_);
81 xfrm_selector_print(&xacq->sel, family, fp, " sel ");
83 xfrm_policy_info_print(&xacq->policy, tb, fp, " ", " policy ");
86 fprintf(fp, " seq 0x%08u ", xacq->seq);
88 fprintf(fp, "%s-mask %s ",
91 fprintf(fp, "%s-mask %s ",
94 fprintf(fp, "%s-mask %s",
98 fprintf(fp, "%s", _SL_);
101 fprintf(fp, "\n");
102 fflush(fp);
110 FILE *fp = (FILE*)arg;
121 fprintf(fp, "Flushed state ");
125 fprintf(fp, "proto %s", str);
127 fprintf(fp, "proto %u", xsf->proto);
128 fprintf(fp, "%s", _SL_);
131 fprintf(fp, "\n");
132 fflush(fp);
141 FILE *fp = (FILE*)arg;
150 fprintf(fp, "Flushed policy ");
157 fprintf(fp, "ptype ");
160 fprintf(fp, "(ERROR truncated)");
163 fprintf(fp, "%s ", strxf_ptype(upt->type));
166 fprintf(fp, "%s", _SL_);
169 fprintf(fp, "\n");
170 fflush(fp);
178 FILE *fp = (FILE*)arg;
194 fprintf(fp, "report ");
196 fprintf(fp, "proto %s ", strxf_xfrmproto(xrep->proto));
197 fprintf(fp, "%s", _SL_);
199 xfrm_selector_print(&xrep->sel, family, fp, " sel ");
203 xfrm_xfrma_print(tb, family, fp, " ");
206 fprintf(fp, "\n");
213 FILE *fp = (FILE*)arg;
214 fprintf(fp, " (0x%x) ", flags);
218 fprintf(fp, " replay update ");
220 fprintf(fp, " timer expired ");
222 fprintf(fp, " policy updated ");
226 static void xfrm_usersa_print(const struct xfrm_usersa_id *sa_id, __u32 reqid, FILE *fp)
231 fprintf(fp, "dst %s ",
235 fprintf(fp, " reqid 0x%x", reqid);
237 fprintf(fp, " protocol %s ", strxf_proto(sa_id->proto));
238 fprintf(fp, " SPI 0x%x", ntohl(sa_id->spi));
244 FILE *fp = (FILE*)arg;
248 fprintf(fp, "Async event ");
250 fprintf(fp,"\n\t");
252 fprintf(fp, "src %s ", rt_addr_n2a(id->sa_id.family,
256 xfrm_usersa_print(&id->sa_id, id->reqid, fp);
258 fprintf(fp, "\n");
259 fflush(fp);
264 static void xfrm_print_addr(FILE *fp, int family, xfrm_address_t *a)
269 fprintf(fp, "%s", rt_addr_n2a(family, sizeof(*a), a, buf, sizeof(buf)));
275 FILE *fp = (FILE*)arg;
278 fprintf(fp, "Mapping change ");
279 xfrm_print_addr(fp, map->id.family, &map->old_saddr);
281 fprintf(fp, ":%d -> ", ntohs(map->old_sport));
282 xfrm_print_addr(fp, map->id.family, &map->new_saddr);
283 fprintf(fp, ":%d\n\t", ntohs(map->new_sport));
285 xfrm_usersa_print(&map->id, map->reqid, fp);
287 fprintf(fp, "\n");
288 fflush(fp);
296 FILE *fp = (FILE*)arg;
299 print_timestamp(fp);
303 fprintf(fp, "[nsid current]");
305 fprintf(fp, "[nsid %d]", ctrl->nsid);
345 fprintf(fp, "Unknown message: %08d 0x%08x 0x%08x\n",
413 FILE *fp;
416 fp = fopen(file, "r");
417 if (fp == NULL) {
421 err = rtnl_from_file(fp, xfrm_accept_msg, stdout);
422 fclose(fp);