Sponsored Content
Full Discussion: C++ to C
Top Forums Programming C++ to C Post 302397321 by Peevish on Sunday 21st of February 2010 08:38:10 PM
Old 02-21-2010
thanks, that solved the problem of uint16, but I'm still not sure how to pass my structure to CRC

e.g.

typedef struct header
{

unsigned short s;
unsigned short d;
unsigned int sq;
unsigned int a;
char hdr;
char rs;
char flg;
unsigned short w;
unsigned short cksum;


} header;


typedef struct Message {
struct header hdr;
char data[1024];
}Message;

=================

I need to pass these parameters and find the total CRC then save it in cksum,
no syntax error for my code but I'm getting a segmentation error!
 
hwloc_obj_attr_u::hwloc_pcidev_attr_s(3)		     Hardware Locality (hwloc)			  hwloc_obj_attr_u::hwloc_pcidev_attr_s(3)

NAME
hwloc_obj_attr_u::hwloc_pcidev_attr_s - SYNOPSIS
#include <hwloc.h> Data Fields unsigned short domain unsigned char bus unsigned char dev unsigned char func unsigned short class_id unsigned short vendor_id unsigned short device_id unsigned short subvendor_id unsigned short subdevice_id unsigned char revision float linkspeed Detailed Description PCI Device specific Object Attributes. Field Documentation unsigned char hwloc_obj_attr_u::hwloc_pcidev_attr_s::bus unsigned short hwloc_obj_attr_u::hwloc_pcidev_attr_s::class_id unsigned char hwloc_obj_attr_u::hwloc_pcidev_attr_s::dev unsigned short hwloc_obj_attr_u::hwloc_pcidev_attr_s::device_id unsigned short hwloc_obj_attr_u::hwloc_pcidev_attr_s::domain unsigned char hwloc_obj_attr_u::hwloc_pcidev_attr_s::func float hwloc_obj_attr_u::hwloc_pcidev_attr_s::linkspeed unsigned char hwloc_obj_attr_u::hwloc_pcidev_attr_s::revision unsigned short hwloc_obj_attr_u::hwloc_pcidev_attr_s::subdevice_id unsigned short hwloc_obj_attr_u::hwloc_pcidev_attr_s::subvendor_id unsigned short hwloc_obj_attr_u::hwloc_pcidev_attr_s::vendor_id Author Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code. Version 1.7 Sun Apr 7 2013 hwloc_obj_attr_u::hwloc_pcidev_attr_s(3)
All times are GMT -4. The time now is 07:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy