#include <aquosa/qsup_lib.h>
#include <sys/types.h>
#include <pwd.h>
#include <stdio.h>
#include <grp.h>
#include <string.h>
#include <errno.h>
Go to the source code of this file.
Data Structures | |
struct | rule |
union | rule::value |
Defines | |
#define | MAX_LINE 1024 |
#define | MAX_RULENAME 6 |
#define | MAX_TOKENLENGTH 32 |
#define | PARSE_ERROR 1 |
#define | INVALID_RULE 2 |
#define | NO_ENTRY 3 |
Typedefs | |
typedef enum rules | rule_type |
Enumerations | |
enum | rules { LEVEL = 1, GROUP, USER } |
Functions | |
void | pushout_nums (char **buf, int n) |
int | fill_rule (char *buf, struct rule *r) |
rule_type | getrule (char **buf) |
int | parse_rule (struct rule *r, char *buf) |
int | main (int argc, char *argv[]) |
#define INVALID_RULE 2 |
Definition at line 15 of file qsup-admin.c.
Referenced by fill_rule().
#define MAX_LINE 1024 |
Definition at line 9 of file qsup-admin.c.
Referenced by main().
#define MAX_RULENAME 6 |
Definition at line 10 of file qsup-admin.c.
Referenced by getrule().
#define MAX_TOKENLENGTH 32 |
Definition at line 11 of file qsup-admin.c.
Referenced by parse_rule().
#define NO_ENTRY 3 |
Definition at line 16 of file qsup-admin.c.
Referenced by parse_rule().
#define PARSE_ERROR 1 |
Definition at line 14 of file qsup-admin.c.
Referenced by fill_rule(), and parse_rule().
enum rules |
Definition at line 18 of file qsup-admin.c.
int fill_rule | ( | char * | buf, | |
struct rule * | r | |||
) |
Definition at line 41 of file qsup-admin.c.
References d2bw(), qsup_constraints_t::flags_mask, INVALID_RULE, qsup_constraints_t::level, LEVEL, qsup_constraints_t::max_bw, qsup_constraints_t::max_min_bw, PARSE_ERROR, rule::value::qb, rule::value::qc, rule::r_type, rule::rule_value, and qsup_constraints_t::weight.
Referenced by parse_rule().
rule_type getrule | ( | char ** | buf | ) |
Definition at line 105 of file qsup-admin.c.
References GROUP, LEVEL, MAX_RULENAME, and USER.
Referenced by main().
int main | ( | int | argc, | |
char * | argv[] | |||
) |
Definition at line 203 of file qsup-admin.c.
References getrule(), GROUP, LEVEL, MAX_LINE, parse_rule(), rule::value::qb, rule::value::qc, qos_chk_ok_exit, qsup_add_group_rule(), qsup_add_level_rule(), qsup_add_user_rule(), qsup_cleanup(), qsup_init(), rule::r_type, rule::rule_id, rule::rule_value, and USER.
int parse_rule | ( | struct rule * | r, | |
char * | buf | |||
) |
Definition at line 130 of file qsup-admin.c.
References fill_rule(), GROUP, LEVEL, MAX_TOKENLENGTH, NO_ENTRY, p, PARSE_ERROR, pushout_nums(), rule::r_type, rule::rule_id, and USER.
Referenced by main().
void pushout_nums | ( | char ** | buf, | |
int | n | |||
) |
Definition at line 33 of file qsup-admin.c.
Referenced by parse_rule().