It was mostly used with large functions.
Moreover:
Put some function definition names at the beginning of line.
Fix a space.
/* Find the hash node that corresponds the ether address 'ep' */
-static inline struct enamemem *
+static struct enamemem *
lookup_emem(netdissect_options *ndo, const u_char *ep)
{
u_int i, j, k;
* with length 'nlen'
*/
-static inline struct bsnamemem *
+static struct bsnamemem *
lookup_bytestring(netdissect_options *ndo, const u_char *bs,
const unsigned int nlen)
{
/* Find the hash node that corresponds the NSAP 'nsap' */
-static inline struct enamemem *
+static struct enamemem *
lookup_nsap(netdissect_options *ndo, const u_char *nsap,
u_int nsap_length)
{
/* Find the hash node that corresponds the protoid 'pi'. */
-static inline struct protoidmem *
+static struct protoidmem *
lookup_protoid(netdissect_options *ndo, const u_char *pi)
{
u_int i, j;
return (linkaddr_string(ndo, addr, LINKADDR_IEEE1394, FIREWIRE_EUI64_LEN));
}
-static inline void
+static void
ap1394_hdr_print(netdissect_options *ndo, const u_char *bp, u_int length)
{
const struct firewire_header *fp;
{ 0, 0 }
};
-static inline void
+static void
arcnet_print(netdissect_options *ndo, const u_char *bp, u_int length, int phds,
u_int flag, u_int seqid)
{
0x00,
0x00 };
-static inline void
+static void
cip_print(netdissect_options *ndo, u_int length)
{
/*
"check data checksum",
};
-static inline u_int dccp_csum_coverage(const struct dccp_hdr* dh, u_int len)
+static u_int
+dccp_csum_coverage(const struct dccp_hdr* dh, u_int len)
{
u_int cov;
return seqno;
}
-static inline unsigned int dccp_basic_hdr_len(const struct dccp_hdr *dh)
+static unsigned int
+dccp_basic_hdr_len(const struct dccp_hdr *dh)
{
return DCCPH_X(dh) ? sizeof(struct dccp_hdr_ext) : sizeof(struct dccp_hdr);
}
{ 0, NULL}
};
-static inline void
+static void
ether_hdr_print(netdissect_options *ndo,
const u_char *bp, u_int length)
{
/*
* Print FDDI frame-control bits
*/
-static inline void
+static void
print_fddi_fc(netdissect_options *ndo, u_char fc)
{
switch (fc) {
}
/* Extract src, dst addresses */
-static inline void
+static void
extract_fddi_addrs(const struct fddi_header *fddip, char *fsrc, char *fdst)
{
int i;
/*
* Print the FDDI MAC header
*/
-static inline void
+static void
fddi_hdr_print(netdissect_options *ndo,
const struct fddi_header *fddip, u_int length,
const u_char *fsrc, const u_char *fdst)
length);
}
-static inline void
+static void
fddi_smt_print(netdissect_options *ndo, const u_char *p _U_, u_int length _U_)
{
ND_PRINT("<SMT printer not yet implemented>");
};
#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++) {
/*
* Is an IPv6 address an IPv4-mapped address?
*/
-static inline int
+static int
is_ipv4_mapped_address(const u_char *addr)
{
/* The value of the prefix */
#define IPFC_HDRLEN 16
/* Extract src, dst addresses */
-static inline void
+static void
extract_ipfc_addrs(const struct ipfc_header *ipfcp, char *ipfcsrc,
char *ipfcdst)
{
/*
* Print the Network_Header
*/
-static inline void
+static void
ipfc_hdr_print(netdissect_options *ndo,
const struct ipfc_header *ipfcp _U_,
u_int length, const u_char *ipfcsrc,
{ 0, NULL }
};
-static inline void
+static void
ipnet_hdr_print(netdissect_options *ndo, const u_char *bp, u_int length)
{
const ipnet_hdr_t *hdr;
#define MAP_REGISTER_LOC_LEN sizeof(lisp_map_register_loc)
-static inline uint8_t extract_lisp_type(uint8_t);
-static inline uint8_t is_xtr_data_present(uint8_t , uint8_t);
+static uint8_t extract_lisp_type(uint8_t);
+static uint8_t is_xtr_data_present(uint8_t, uint8_t);
static void lisp_hdr_flag(netdissect_options *, const lisp_map_register_hdr *);
static void action_flag(netdissect_options *, uint8_t);
static void loc_hdr_flag(netdissect_options *, uint16_t);
return;
}
-static inline uint8_t extract_lisp_type(uint8_t lisp_hdr_flags)
+static uint8_t
+extract_lisp_type(uint8_t lisp_hdr_flags)
{
return (lisp_hdr_flags) >> TYPE_INDEX;
}
-static inline uint8_t is_xtr_data_present(uint8_t type, uint8_t lisp_hdr_flags)
+static uint8_t
+is_xtr_data_present(uint8_t type, uint8_t lisp_hdr_flags)
{
uint8_t xtr_present = 0;
{ 0, NULL }
};
-static inline void
+static void
nflog_hdr_print(netdissect_options *ndo, const nflog_hdr_t *hdr, u_int length)
{
ND_PRINT("version %d, resource ID %d", hdr->nflog_version, ntohs(hdr->nflog_rid));
#define SWAPLONG(y) \
((((y)&0xff)<<24) | (((y)&0xff00)<<8) | (((y)&0xff0000)>>8) | (((y)>>24)&0xff))
-static inline void
+static void
null_hdr_print(netdissect_options *ndo, u_int family, u_int length)
{
if (!ndo->ndo_qflag) {
#define PKT_REC_NONE 0 /* nothing follows the header */
#define PKT_REC_PACKET 1 /* a packet follows the header */
-static inline void
+static void
pktap_header_print(netdissect_options *ndo, const u_char *bp, u_int length)
{
const pktap_header_t *hdr;
#ifdef DLT_PPI
-static inline void
+static void
ppi_header_print(netdissect_options *ndo, const u_char *bp, u_int length)
{
const ppi_header_t *hdr;
};
-static inline int isForCES_port(u_short Port)
+static int
+isForCES_port(u_short Port)
{
if (Port == CHAN_HP)
return 1;
{ 0, NULL}
};
-static inline void
+static void
sll_print(netdissect_options *ndo, const struct sll_header *sllp, u_int length)
{
u_short ether_type;
nd_byte stuff2[36];
};
-static inline void
+static void
symantec_hdr_print(netdissect_options *ndo, const u_char *bp, u_int length)
{
const struct symantec_header *sp;
static const char tstr[] = "[|token-ring]";
/* Extract src, dst addresses */
-static inline void
+static void
extract_token_addrs(const struct token_header *trp, char *fsrc, char *fdst)
{
memcpy(fdst, (const char *)trp->token_dhost, 6);
/*
* Print the TR MAC header
*/
-static inline void
+static void
token_hdr_print(netdissect_options *ndo,
const struct token_header *trp, u_int length,
const u_char *fsrc, const u_char *fdst)