setsockopt() call fails on lion previews....
setsockopt() call fails on lion previews....
- Subject: setsockopt() call fails on lion previews....
- From: manoj <email@hidden>
- Date: Thu, 23 Jun 2011 18:38:19 +0530
Hi,
I have created the sample application to block internet access which works fine on Leopard and Snow Leopard machines but it fails on Lion (10.7 )previews.
Steps :
1) m_socket = socket(PF_SYSTEM, SOCK_STREAM, SYSPROTO_CONTROL); 2) Registered the Network Kernel Extension. 3) Call the setsockopt function:
int option_value =1 ; int option_name =1; unsigned int length_option_value = sizeof(int);
int iRetVal = setsockopt(m_socket, SYSPROTO_CONTROL, option_name, (void*)&option_value, length_option_value);
On Lion(10.7) previews , setsockopt() call fails and returns -1. Also, set errno as "Invalid argument".
What is wrong in above code?.
Please suggest any idea to solve this problem.
Thanks in advance.
Regards, Manoj
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden