IPv4 header types and helper functions.  
More...
IPv4 header types and helper functions. 
 | 
| file   | hdr.h | 
|   | IPv4 header type and helper function definitions. 
  | 
|   | 
◆ ipv4_hdr_get_flags()
  
  
      
        
          | static uint8_t ipv4_hdr_get_flags  | 
          ( | 
          ipv4_hdr_t *  | 
          hdr | ) | 
           | 
         
       
   | 
  
inlinestatic   | 
  
 
brief Gets the value of the Version Control Flags field of hdr 
- Parameters
 - 
  
    | [in] | hdr | Pointer to an IPv4 header. | 
  
   
- Returns
 - Value of the Version Control field of 
hdr  
Definition at line 159 of file hdr.h.
 
 
◆ ipv4_hdr_get_fo()
  
  
      
        
          | static uint16_t ipv4_hdr_get_fo  | 
          ( | 
          ipv4_hdr_t *  | 
          hdr | ) | 
           | 
         
       
   | 
  
inlinestatic   | 
  
 
brief Gets the value of the Fragment Offset field of hdr 
- Parameters
 - 
  
    | [in] | hdr | Pointer to an IPv4 header. | 
  
   
- Returns
 - Value of the Fragment Offset field of 
hdr  
Definition at line 184 of file hdr.h.
 
 
◆ ipv4_hdr_get_ihl()
  
  
      
        
          | static uint16_t ipv4_hdr_get_ihl  | 
          ( | 
          ipv4_hdr_t *  | 
          hdr | ) | 
           | 
         
       
   | 
  
inlinestatic   | 
  
 
brief Gets the value of the Internet Header Length field of hdr 
- Parameters
 - 
  
    | [in] | hdr | Pointer to an IPv4 header. | 
  
   
- Returns
 - Size in bytes of the Internet Header Length field of 
hdr  
Definition at line 135 of file hdr.h.
 
 
◆ ipv4_hdr_get_version()
  
  
      
        
          | static uint8_t ipv4_hdr_get_version  | 
          ( | 
          ipv4_hdr_t *  | 
          hdr | ) | 
           | 
         
       
   | 
  
inlinestatic   | 
  
 
Gets the value of the version field of hdr. 
- Parameters
 - 
  
    | [in] | hdr | Pointer to an IPv4 header. | 
  
   
- Returns
 - Value of the version field of 
hdr.  
Definition at line 111 of file hdr.h.
 
 
◆ ipv4_hdr_set_flags()
  
  
      
        
          | static void ipv4_hdr_set_flags  | 
          ( | 
          ipv4_hdr_t *  | 
          hdr,  | 
         
        
           | 
           | 
          uint8_t  | 
          flags  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlinestatic   | 
  
 
Sets the Version Control Flags field of hdr. 
- Parameters
 - 
  
    | [out] | hdr | Pointer to an IPv4 header.  | 
    | [in] | flags | The new value of flags  | 
  
   
Definition at line 146 of file hdr.h.
 
 
◆ ipv4_hdr_set_fo()
  
  
      
        
          | static void ipv4_hdr_set_fo  | 
          ( | 
          ipv4_hdr_t *  | 
          hdr,  | 
         
        
           | 
           | 
          uint16_t  | 
          fo  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlinestatic   | 
  
 
Sets the Fragment Offset field of hdr. 
- Parameters
 - 
  
    | [out] | hdr | Pointer to an IPv4 header.  | 
    | [in] | fo | The new value of fragment offset  | 
  
   
Definition at line 170 of file hdr.h.
 
 
◆ ipv4_hdr_set_ihl()
  
  
      
        
          | static void ipv4_hdr_set_ihl  | 
          ( | 
          ipv4_hdr_t *  | 
          hdr,  | 
         
        
           | 
           | 
          uint16_t  | 
          ihl  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlinestatic   | 
  
 
Sets the Internet Header Length field of hdr. 
- Parameters
 - 
  
    | [out] | hdr | Pointer to an IPv4 header.  | 
    | [in] | ihl | Size in bytes of the Internet Header Length (including padding)  | 
  
   
Definition at line 122 of file hdr.h.
 
 
◆ ipv4_hdr_set_version()
  
  
      
        
          | static void ipv4_hdr_set_version  | 
          ( | 
          ipv4_hdr_t *  | 
          hdr | ) | 
           | 
         
       
   | 
  
inlinestatic   | 
  
 
Sets the version field of hdr to 6. 
- Parameters
 - 
  
    | [out] | hdr | Pointer to an IPv4 header.  | 
  
   
Definition at line 98 of file hdr.h.