This should be `buf`, it takes the struct by value.