NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

UDP Lite Support on NetBSD 6.0


I am trying to implement UDPLITE on NetBSD 6.0. However, I could not find the supported protocol type (IPPROTO_UDPLITE) in the socket.h header file.

We have tried the following implementation,

#define IPPROTO_UDPLITE       136
#define SOL_UDPLITE           136
#define UDPLITE_SEND_CSCOV     10
#define UDPLITE_RECV_CSCOV     11


int val = 20;
setsockopt(s, SOL_UDPLITE, UDPLITE_SEND_CSCOV, &val, sizeof(int));
int min = 20;
setsockopt(s, SOL_UDPLITE, UDPLITE_RECV_CSCOV, &min, sizeof(int));

struct sockaddr_in src_addr;
src_addr.sin_family = AF_INET;
src_addr.sin_port = htons(8002);
src_addr.sin_addr.s_addr = INADDR_ANY;

bind(s, (struct sockaddr*)&src_addr, sizeof(src_addr);

I am getting an error "Bad File Descriptor".

My question is whether UDP Lite is supported in NetBSD 6.0 Beta ? If yes, please provide a sample application of UDP Lite Socket Server.


Home | Main Index | Thread Index | Old Index