45 * 1.2.3.4 is a non-failover address, and so isn't output.
46 *
47 * The "failover" and "-failover" commands can occur several times for
48 * a given logical interface. Only the last one counts. For example:
49 *
50 * ifparse -f inet 1.2.3.4 -failover failover -failover failover up
51 *
52 * Produces:
53 *
54 * set 1.2.3.4 -failover failover -failover failover up
55 *
56 * No attempt is made to clean up such "pathological" command lines, by
57 * removing redundant "failover" and "-failover" commands.
58 */
59
60 #include <sys/types.h>
61 #include <stdlib.h>
62 #include <stdio.h>
63 #include <string.h>
64 #include <assert.h>
65
66 /*
67 * Parser flags:
68 *
69 * PARSEFIXED
70 * Command should only appear if non-failover commands
71 * are requested.
72 * PARSEMOVABLE
73 * Command should only appear if failover commands are
74 * requested.
75 * PARSENOW
76 * Don't buffer the command, dump it to output immediately.
77 * PARSEADD
78 * Indicates processing has moved on to additional
79 * logical interfaces.
80 * Dump the buffer to output and clear buffer contents.
81 * PARSESET
82 * The "set" and "destination" keywords are optional.
83 * This flag indicates that the next address not prefixed
84 * with a keyword will be a destination address.
|
45 * 1.2.3.4 is a non-failover address, and so isn't output.
46 *
47 * The "failover" and "-failover" commands can occur several times for
48 * a given logical interface. Only the last one counts. For example:
49 *
50 * ifparse -f inet 1.2.3.4 -failover failover -failover failover up
51 *
52 * Produces:
53 *
54 * set 1.2.3.4 -failover failover -failover failover up
55 *
56 * No attempt is made to clean up such "pathological" command lines, by
57 * removing redundant "failover" and "-failover" commands.
58 */
59
60 #include <sys/types.h>
61 #include <stdlib.h>
62 #include <stdio.h>
63 #include <string.h>
64 #include <assert.h>
65 #include <unistd.h>
66
67 /*
68 * Parser flags:
69 *
70 * PARSEFIXED
71 * Command should only appear if non-failover commands
72 * are requested.
73 * PARSEMOVABLE
74 * Command should only appear if failover commands are
75 * requested.
76 * PARSENOW
77 * Don't buffer the command, dump it to output immediately.
78 * PARSEADD
79 * Indicates processing has moved on to additional
80 * logical interfaces.
81 * Dump the buffer to output and clear buffer contents.
82 * PARSESET
83 * The "set" and "destination" keywords are optional.
84 * This flag indicates that the next address not prefixed
85 * with a keyword will be a destination address.
|