Lines Matching defs:fp
115 static void print_ctrl_cmd_flags(FILE *fp, __u32 fl)
117 fprintf(fp, "\n\t\tCapabilities (0x%x):\n ", fl);
119 fprintf(fp, "\n");
122 fprintf(fp, "\t\t ");
125 fprintf(fp, " requires admin permission;");
127 fprintf(fp, " can doit;");
129 fprintf(fp, " can dumpit;");
131 fprintf(fp, " has policy");
133 fprintf(fp, "\n");
136 static int print_ctrl_cmds(FILE *fp, struct rtattr *arg, __u32 ctrl_ver)
146 fprintf(fp, " ID-0x%x ",*id);
151 print_ctrl_cmd_flags(fp, *fl);
157 static int print_ctrl_grp(FILE *fp, struct rtattr *arg, __u32 ctrl_ver)
167 fprintf(fp, " ID-0x%x ",*id);
171 fprintf(fp, " name: %s ", name);
188 FILE *fp = (FILE *) arg;
218 fprintf(fp, "\nName: %s\n",name);
222 fprintf(fp, "\tID: 0x%x ",*id);
226 fprintf(fp, " Version: 0x%x ",*v);
231 fprintf(fp, " header size: %d ",*h);
235 fprintf(fp, " max attribs: %d ",*ma);
238 fprintf(fp,"\n");
243 fprintf(fp, "\tcommands supported: \n");
246 fprintf(fp, "\t\t#%d: ", i);
247 if (0 > print_ctrl_cmds(fp, tb2[i], ctrl_v)) {
248 fprintf(fp, "Error printing command\n");
251 fprintf(fp,"\n");
256 fprintf(fp,"\n");
265 fprintf(fp, "\tmulticast groups:\n");
269 fprintf(fp, "\t\t#%d: ", i);
270 if (0 > print_ctrl_grp(fp, tb2[i], ctrl_v))
271 fprintf(fp, "Error printing group\n");
273 fprintf(fp,"\n");
278 fprintf(fp,"\n");
281 fflush(fp);