projects
/
l2tpns.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use ctime rather than duration
[l2tpns.git]
/
control.h
diff --git
a/control.h
b/control.h
index
8dd159c
..
ee7ed7d
100644
(file)
--- a/
control.h
+++ b/
control.h
@@
-27,27
+27,27
@@
#define NSCTL_MAX_PKT_SZ 4096
struct nsctl_packet {
#define NSCTL_MAX_PKT_SZ 4096
struct nsctl_packet {
- u
16
magic;
- u
8
type;
- u
8
argc;
+ u
int16_t
magic;
+ u
int8_t
type;
+ u
int8_t
argc;
char argv[NSCTL_MAX_PKT_SZ - 4];
} __attribute__ ((packed));
#define NSCTL_MAX_ARG_SZ 512
struct nsctl_args {
char argv[NSCTL_MAX_PKT_SZ - 4];
} __attribute__ ((packed));
#define NSCTL_MAX_ARG_SZ 512
struct nsctl_args {
- u
8
len;
+ u
int8_t
len;
char value[NSCTL_MAX_ARG_SZ - 1];
} __attribute__ ((packed));
/* parsed packet */
struct nsctl {
char value[NSCTL_MAX_ARG_SZ - 1];
} __attribute__ ((packed));
/* parsed packet */
struct nsctl {
- u
8
type;
- u
8
argc;
+ u
int8_t
type;
+ u
int8_t
argc;
char *argv[0xff];
};
char *argv[0xff];
};
-int pack_control(char *data, int len, u
8
type, int argc, char *argv[]);
+int pack_control(char *data, int len, u
int8_t
type, int argc, char *argv[]);
int unpack_control(struct nsctl *packet, char *data, int len);
void dump_control(struct nsctl *control, FILE *stream);
int unpack_control(struct nsctl *packet, char *data, int len);
void dump_control(struct nsctl *control, FILE *stream);