title: can socket printf format
body: <p>I have a problem displaying my CAN ID . I'm sending out a message via the CAN bus , which has the ID 0x18FF11F3 . My program receives this message and also all data fields , only the ID does not match exactly</p>
  
  <pre><code>    void set_can_listener(uint16 *s16_Socket, struct can_frame *Frame) {
      /* Create the socket */
      *s16_Socket = socket(PF_CAN, SOCK_RAW, CAN_RAW);
  
      /* Locate the interface you wish to use */
      struct ifreq t_Ifr;
      strcpy(t_Ifr.ifr_name, "can0");
      ioctl(*s16_Socket, SIOCGIFINDEX, &amp;t_Ifr); /* Ifr.ifr_ifindex gets filled with that device's index*/
  
      /* Select that CAN interface, and bind the socket to it.*/
      struct sockaddr_can t_Addr;
      t_Addr.can_family = AF_CAN;
      t_Addr.can_ifindex = t_Ifr.ifr_ifindex;
      bind(*s16_Socket, (struct sockaddr*) &amp;t_Addr, sizeof(t_Addr));
  }
  
  
  void can_listener(uint16 *s16_Socket, struct can_frame *Frame) {
      /* Read message from CAN */
      unsigned int i;
      uint16 s16_BytesRead = read(*s16_Socket, Frame, sizeof(*Frame));
      if (s16_BytesRead &gt;= 0) {
          printf("\nMessage received!\nID: 0x%X\nDLC: %X\n", Frame-&gt;can_id,
                  Frame-&gt;can_dlc);
      }
  }
  </code></pre>
  
  <p>My Output looks like:</p>
  
  <pre><code>Message received! 
  ID: 0x98FF11F3 
  DLC: 8
  </code></pre>