Fixed wrong results in cw_get_hdr_fragoffset and cw_get_hdr_fragid
FossilOrigin-Name: 1bc1c836eae499da08204f9b7740cef0df0a4feaf45514b8a220f8ebca288f42
This commit is contained in:
		@ -98,8 +98,13 @@
 | 
			
		||||
/* macros to acces transport header values */
 | 
			
		||||
 | 
			
		||||
#define cw_get_hdr_preamble(th) (th[0])
 | 
			
		||||
#define cw_get_hdr_fragid(th) ((ntohl((((uint32_t*)th)[1]) >> 16) & 0xffff))
 | 
			
		||||
#define cw_get_hdr_fragoffset(th) ((ntohl((((uint32_t*)th)[1]) >> 3) & 0x1fff))
 | 
			
		||||
 | 
			
		||||
#define cw_get_hdr_fragid(th)\
 | 
			
		||||
	(((ntohl(*(((uint32_t*)(th))+1))) >> 16) & 0xffff)
 | 
			
		||||
 | 
			
		||||
#define cw_get_hdr_fragoffset(th)\
 | 
			
		||||
	(((ntohl(*(((uint32_t*)(th))+1))) >> 3) & 0x1fff)
 | 
			
		||||
 | 
			
		||||
#define cw_get_hdr_rid(th) ((ntohl((((uint32_t*)th)[0]) >> 14) & 0x1f))
 | 
			
		||||
#define cw_get_hdr_wbid(th) ((ntohl(((uint32_t*)th)[0]) >> 9) & 0x1f)
 | 
			
		||||
#define cw_get_hdr_hlen(th) ((ntohl(((uint32_t*)th)[0]) >> 19) & 0x1f)
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user