… | |
… | |
48 | /* |
48 | /* |
49 | * check wether the given path is an absolute pathname |
49 | * check wether the given path is an absolute pathname |
50 | */ |
50 | */ |
51 | #define ABSOLUTE_PATH(c) ((c)[0] == '/') |
51 | #define ABSOLUTE_PATH(c) ((c)[0] == '/') |
52 | |
52 | |
53 | static inline void |
|
|
54 | id2mac (unsigned int id, void *m) |
53 | extern void id2mac (unsigned int id, void *m); |
55 | { |
|
|
56 | mac &p = *(mac *)m; |
|
|
57 | |
54 | |
58 | p[0] = 0xfe; |
|
|
59 | p[1] = 0xfd; |
|
|
60 | p[2] = 0x80; |
|
|
61 | p[3] = 0x00; |
|
|
62 | p[4] = id >> 8; |
|
|
63 | p[5] = id; |
|
|
64 | } |
|
|
65 | |
|
|
66 | #define mac2id(p) (p[0] & 0x01 ? 0 : (p[4] << 8) | p[5]) |
55 | #define mac2id(p) ((p)[0] & 0x01 ? 0 : ((p)[4] << 8) | (p)[5]) |
67 | |
56 | |
68 | struct sliding_window { |
57 | struct sliding_window { |
69 | u32 v[(WINDOWSIZE + 31) / 32]; |
58 | u32 v[(WINDOWSIZE + 31) / 32]; |
70 | u32 seq; |
59 | u32 seq; |
71 | |
60 | |