#include "netdissect.h"
#include "extract.h"
-static const char tstr[] = "[|forces]";
#define ForCES_VERS 1
#define ForCES_HDRL 24
};
#define TOM_MAX_IND (_TOM_RSV_MAX - 1)
-static inline int tom_valid(uint8_t tom)
+static int
+tom_valid(uint8_t tom)
{
if (tom > 0) {
if (tom >= 0x7 && tom <= 0xe)
return 0;
}
-static inline const char *ForCES_node(uint32_t node)
+static const char *
+ForCES_node(uint32_t node)
{
if (node <= 0x3FFFFFFF)
return "FE";
/* F_OP_RTRCOMP */ {ZERO_TTLV, 0, " RTRCOMP", NULL},
};
-static inline const struct optlv_h *get_forces_optlv_h(uint16_t opt)
+static const struct optlv_h *
+get_forces_optlv_h(uint16_t opt)
{
if (opt > F_OP_MAX || opt == F_OP_RSV)
return &OPTLV_msg[F_OP_RSV];
#define IND_SUF 0x0
static char ind_buf[IND_SIZE];
-static inline char *indent_pr(int indent, int nlpref)
+static char *
+indent_pr(int indent, int nlpref)
{
int i = 0;
char *r = ind_buf;
return r;
}
-static inline int op_valid(uint16_t op, uint16_t mask)
+static int
+op_valid(uint16_t op, uint16_t mask)
{
if (op == 0)
return 0;
};
#define TLV_HLN 4
-static inline int ttlv_valid(uint16_t ttlv)
+static int
+ttlv_valid(uint16_t ttlv)
{
if (ttlv > 0) {
if (ttlv == 1 || ttlv == 0x1000)
{0, NULL}
};
-static inline u_int tlv_valid(u_int tlvl, u_int rlen)
+static u_int
+tlv_valid(u_int tlvl, u_int rlen)
{
if (rlen < TLV_HDRL)
return INVALID_RLEN;
return 0;
}
-static inline int ilv_valid(const struct forces_ilv *ilv, u_int rlen)
+static int
+ilv_valid(const struct forces_ilv *ilv, u_int rlen)
{
if (rlen < ILV_HDRL)
return INVALID_RLEN;
{TOM_QUERYREP, TTLV_T2, CFG_QYR, "Query Response", lfbselect_print},
};
-static inline const struct tom_h *get_forces_tom(uint8_t tom)
+static const struct tom_h *
+get_forces_tom(uint8_t tom)
{
int i;
for (i = TOM_RSV_I; i <= TOM_MAX_IND; i++) {
};
#define PD_MAX_IND (_TOM_RSV_MAX - 1)
-static inline int pd_valid(uint16_t pd)
+static int
+pd_valid(uint16_t pd)
{
if (pd >= F_TLV_PDAT && pd <= F_TLV_REST)
return 1;
return 0;
}
-static inline void
+static void
chk_op_type(netdissect_options *ndo,
uint16_t type, uint16_t msk, uint16_t omsk)
{
{F_TLV_PDAT, 0, 0, "Inner PATH-DATA TLV", recpdoptlv_print},
};
-static inline const struct pdata_ops *get_forces_pd(uint16_t pd)
+static const struct pdata_ops *
+get_forces_pd(uint16_t pd)
{
int i;
for (i = PD_RSV_I + 1; i <= PD_MAX_IND; i++) {
return 0;
trunc:
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
return -1;
}
return 0;
trunc:
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
return -1;
}
return 0;
trunc:
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
return -1;
}
return sdatailv_print(ndo, tdp, rlen, op_msk, indent);
trunc:
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
return -1;
}
return fdatatlv_print(ndo, dp, tll, op_msk, indent);
trunc:
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
return -1;
}
return len;
trunc:
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
return -1;
}
return 0;
trunc:
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
return -1;
}
}
trunc:
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
return -1;
}
return 0;
trunc:
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
return -1;
}
return rc;
trunc:
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
return -1;
}
return 0;
trunc:
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
return -1;
}
return 0;
trunc:
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
return -1;
}
return 0;
trunc:
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
return -1;
}
return 0;
trunc:
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
return -1;
}
return 0;
trunc:
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
return -1;
}
return 0;
trunc:
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
return -1;
}
return 0;
trunc:
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
return -1;
}
const struct tom_h *tops;
int rc = 0;
+ ndo->ndo_protocol = "forces";
fhdr = (const struct forcesh *)pptr;
ND_TCHECK_SIZE(fhdr);
tom = EXTRACT_U_1(fhdr->fm_tom);
return;
trunc:
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
}
-/*
- * Local Variables:
- * c-style: whitesmith
- * c-basic-offset: 8
- * End:
- */