File: ext.h

package info (click to toggle)
tcng 10b-4
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 3,644 kB
  • sloc: ansic: 19,040; pascal: 4,640; yacc: 2,619; sh: 1,914; perl: 1,546; lex: 772; makefile: 751
file content (49 lines) | stat: -rw-r--r-- 1,508 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
 * ext.h - Communication over the external interface
 *
 * Written 2001,2002 by Werner Almesberger
 * Copyright 2001,2002 Bivio Networks, Network Robots
 */


#ifndef EXT_H
#define EXT_H

#include <stdio.h>

#include "tree.h"


/*
 * Usage:
 *
 * ext_open runs the external program and opens a stream for sending data to
 * the program.
 *
 * Once all data is sent, ext_read closes the stream, waits for the process
 * to terminate, opens the stream for reading the output generated by the
 * external program, and returns the exit status. (Or -1 if the process did
 * not exit normally.)
 *
 * ext_close can be called before or after ext_read to close the stream.
 */

FILE *ext_open(char **argv,const char *name);
void ext_read(const char *name,const char *action);
void ext_close(void);

void add_tcc_external_arg(const char *name,const char *arg);

void ext_config(const char *name);
void ext_build(const char *name,const QDISC *qdisc,const FILTER *filter,
  void (*dump_config)(FILE *file,void *user),void *user);

void ext_dump_class(FILE *file,const CLASS *class,const PARAM_DSC **special,
  void (*fn)(FILE *file,const PARAM_DSC *param,const CLASS *class));
void do_ext_dump_qdisc(FILE *file,const QDISC *qdisc,const QDISC_DSC *dsc,
  const PARAM_DSC **special,void (*fn)(FILE *file,const PARAM_DSC *param,
  const QDISC *qdisc));
void ext_dump_qdisc(FILE *file,const QDISC *qdisc,const PARAM_DSC **special,
  void (*fn)(FILE *file,const PARAM_DSC *param,const QDISC *qdisc));

#endif /* EXT_H */