Home | History | Annotate | Download | only in ip

Lines Matching refs:fp

48 	FILE *fp = (FILE*)arg;
68 fprintf(fp, "acquire ");
70 fprintf(fp, "proto %s ", strxf_xfrmproto(xacq->id.proto));
73 fprintf(fp, "spi 0x%08x", spi);
75 fprintf(fp, "(%u)", spi);
76 fprintf(fp, " ");
78 fprintf(fp, "%s", _SL_);
80 xfrm_selector_print(&xacq->sel, family, fp, " sel ");
82 xfrm_policy_info_print(&xacq->policy, tb, fp, " ", " policy ");
85 fprintf(fp, " seq 0x%08u ", xacq->seq);
87 fprintf(fp, "%s-mask %s ",
90 fprintf(fp, "%s-mask %s ",
93 fprintf(fp, "%s-mask %s",
97 fprintf(fp, "%s", _SL_);
100 fprintf(fp, "\n");
101 fflush(fp);
109 FILE *fp = (FILE*)arg;
120 fprintf(fp, "Flushed state ");
124 fprintf(fp, "proto %s", str);
126 fprintf(fp, "proto %u", xsf->proto);
127 fprintf(fp, "%s", _SL_);
130 fprintf(fp, "\n");
131 fflush(fp);
140 FILE *fp = (FILE*)arg;
149 fprintf(fp, "Flushed policy ");
156 fprintf(fp, "ptype ");
159 fprintf(fp, "(ERROR truncated)");
162 fprintf(fp, "%s ", strxf_ptype(upt->type));
165 fprintf(fp, "%s", _SL_);
168 fprintf(fp, "\n");
169 fflush(fp);
177 FILE *fp = (FILE*)arg;
193 fprintf(fp, "report ");
195 fprintf(fp, "proto %s ", strxf_xfrmproto(xrep->proto));
196 fprintf(fp, "%s", _SL_);
198 xfrm_selector_print(&xrep->sel, family, fp, " sel ");
202 xfrm_xfrma_print(tb, family, fp, " ");
205 fprintf(fp, "\n");
212 FILE *fp = (FILE*)arg;
213 fprintf(fp, " (0x%x) ", flags);
217 fprintf(fp, " replay update ");
219 fprintf(fp, " timer expired ");
221 fprintf(fp, " policy updated ");
225 static void xfrm_usersa_print(const struct xfrm_usersa_id *sa_id, __u32 reqid, FILE *fp)
230 fprintf(fp, "dst %s ", rt_addr_n2a(sa_id->family,
233 fprintf(fp, " reqid 0x%x", reqid);
235 fprintf(fp, " protocol %s ", strxf_proto(sa_id->proto));
236 fprintf(fp, " SPI 0x%x", ntohl(sa_id->spi));
242 FILE *fp = (FILE*)arg;
246 fprintf(fp, "Async event ");
248 fprintf(fp,"\n\t");
250 fprintf(fp, "src %s ", rt_addr_n2a(id->sa_id.family,
254 xfrm_usersa_print(&id->sa_id, id->reqid, fp);
256 fprintf(fp, "\n");
257 fflush(fp);
262 static void xfrm_print_addr(FILE *fp, int family, xfrm_address_t *a, size_t s)
267 fprintf(fp, "%s", rt_addr_n2a(family, s, a, buf, sizeof(buf)));
273 FILE *fp = (FILE*)arg;
276 fprintf(fp, "Mapping change ");
277 xfrm_print_addr(fp, map->id.family, &map->old_saddr,
280 fprintf(fp, ":%d -> ", ntohs(map->old_sport));
281 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);
295 FILE *fp = (FILE*)arg;
298 print_timestamp(fp);
337 fprintf(fp, "Unknown message: %08d 0x%08x 0x%08x\n",
403 FILE *fp;
404 fp = fopen(file, "r");
405 if (fp == NULL) {
409 return rtnl_from_file(fp, xfrm_accept_msg, (void*)stdout);