Lines Matching refs:nsh
190 * [0] https://datatracker.ietf.org/doc/draft-ietf-sfc-nsh/
260 static inline u16 nsh_hdr_len(const struct nshhdr *nsh)
262 return ((ntohs(nsh->ver_flags_ttl_len) & NSH_LEN_MASK)
266 static inline u8 nsh_get_ver(const struct nshhdr *nsh)
268 return (ntohs(nsh->ver_flags_ttl_len) & NSH_VER_MASK)
272 static inline u8 nsh_get_flags(const struct nshhdr *nsh)
274 return (ntohs(nsh->ver_flags_ttl_len) & NSH_FLAGS_MASK)
278 static inline u8 nsh_get_ttl(const struct nshhdr *nsh)
280 return (ntohs(nsh->ver_flags_ttl_len) & NSH_TTL_MASK)
284 static inline void __nsh_set_xflag(struct nshhdr *nsh, u16 xflag, u16 xmask)
286 nsh->ver_flags_ttl_len
287 = (nsh->ver_flags_ttl_len & ~htons(xmask)) | htons(xflag);
290 static inline void nsh_set_flags_and_ttl(struct nshhdr *nsh, u8 flags, u8 ttl)
292 __nsh_set_xflag(nsh, ((flags << NSH_FLAGS_SHIFT) & NSH_FLAGS_MASK) |
297 static inline void nsh_set_flags_ttl_len(struct nshhdr *nsh, u8 flags,
301 __nsh_set_xflag(nsh, ((flags << NSH_FLAGS_SHIFT) & NSH_FLAGS_MASK) |