int (*get_att)(int ncid, int varid, const char *name,
int (*put_att)(
int ncid,
int varid,
const char *name,
nc_type datatype,
size_t len,
const void *value,
nc_type memtype);
Again, the key difference is the memtype parameter. As with put/get_vara, it used NC_INT64 to encode the long case.