Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_ecn.h
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | |||||
int tcp_ecn_input_segment(struct tcpcb *, uint16_t, int, int, int); | int tcp_ecn_input_segment(struct tcpcb *, uint16_t, int, int, int); | ||||
uint16_t tcp_ecn_output_syn_sent(struct tcpcb *); | uint16_t tcp_ecn_output_syn_sent(struct tcpcb *); | ||||
int tcp_ecn_output_established(struct tcpcb *, uint16_t *, int, bool); | int tcp_ecn_output_established(struct tcpcb *, uint16_t *, int, bool); | ||||
void tcp_ecn_syncache_socket(struct tcpcb *, struct syncache *); | void tcp_ecn_syncache_socket(struct tcpcb *, struct syncache *); | ||||
int tcp_ecn_syncache_add(uint16_t, int); | int tcp_ecn_syncache_add(uint16_t, int); | ||||
uint16_t tcp_ecn_syncache_respond(uint16_t, struct syncache *); | uint16_t tcp_ecn_syncache_respond(uint16_t, struct syncache *); | ||||
int tcp_ecn_get_ace(uint16_t); | int tcp_ecn_get_ace(uint16_t); | ||||
static inline void hton24(u_char **p, uint32_t v) | |||||
{ | |||||
*(*p)++ = (u_char)(v >> 16); | |||||
*(*p)++ = (u_char)(v >> 8); | |||||
*(*p)++ = (u_char)(v); | |||||
} | |||||
static inline uint32_t ntoh24(u_char *p) | |||||
{ | |||||
uint32_t v; | |||||
v = (uint32_t)(p[0] << 16); | |||||
v |= (uint32_t)(p[1] << 8); | |||||
v |= (uint32_t)(p[2] << 0); | |||||
return v; | |||||
} | |||||
#endif /* _KERNEL */ | #endif /* _KERNEL */ | ||||
#endif /* _NETINET_TCP_ECN_H_ */ | #endif /* _NETINET_TCP_ECN_H_ */ |