Re: Socket sendmsg() porting question

2016-08-04 Thread Ed Schouten
2016-08-03 19:18 GMT+02:00 Lundberg, Johannes : > Even if I set cmsg_level and cmsg_type it won't let me send it. The problem > is having a zero length attachment on freebsd > I can't send -1 as fd because that errors to invalid file descriptor. Well, it makes

Re: Socket sendmsg() porting question

2016-08-04 Thread Julian Elischer
On 4/08/2016 1:18 AM, Lundberg, Johannes wrote: ​Hi Alan Thanks for the reply. Can I still use the same receiving function for sendmsg/send and tell what kind of message is coming? How would I tell if there is an fd attached or not? Even if I set cmsg_level and cmsg_type it won't let me send

Re: Socket sendmsg() porting question

2016-08-03 Thread Lundberg, Johannes
​Hi Alan Thanks for the reply. Can I still use the same receiving function for sendmsg/send and tell what kind of message is coming? How would I tell if there is an fd attached or not? Even if I set cmsg_level and cmsg_type it won't let me send it. The problem is having a zero length attachment

Re: Socket sendmsg() porting question

2016-08-03 Thread Alan Somers
On Wed, Aug 3, 2016 at 10:54 AM, Lundberg, Johannes wrote: > Hi > > I'm porting a project to fbsd and I have problem with this part that works > in linux but not fbsd when fd = -1. > > https://github.com/Cloudef/wlc/blob/master/src/session/fd.c#L80-L108 > > I get