×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    4,026

    IAP Id for OpenC

    Trying to get the IAP id or the interface name by using:

    ioctl(fd, SIOCGIFACTIVECONF, &ifc);

    but code does not gets compiled & says illegal function overloading, of course which is due to mismatch between declaration & definition of above function. After searching, i found its due to the older version of OpenC plugin, thereby i downloaded the latest one , i.e.OpenC 1.7.Its also written in its release notes that it contains the fixed ioctl() which accepts the reference types for struct ifconf , but it doesn't seems to work for me.If i open the declaration for ioctl(), it expects int, int,void*.

    I am using the following link for reference:

    http://www.developer.nokia.com/Commu...s_Point)_Table

    So anything i am missing , please share.

    Also my purpose for finding the interface name is to pass the name in the following function : setdefaultif()

    so if there exists any other way to find the name please share.
    Last edited by vineet.jain; 2011-10-14 at 13:00.

  2. #2
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    4,026

    Re: IAP Id for OpenC

    If i remove the SIOCGIFACTIVECONF from ioctl(fd, SIOCGIFACTIVECONF, &ifc); & replace it with random integer, then it compiles well. So , do i need to convert this param in some int or what? If i see its declaration, it is : #define SIOCGIFACTIVECONF _IOWR('s', 4, struct ifconf), which is in the sys/sockio.h

  3. #3
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    4,026

    Re: IAP Id for OpenC

    Tried passing hard coded name for IAP in the method setdefaultif() , though it returns 0, both in emulator as well as device, but still the Access point dialog appears. Some code snippet:

    Code:
    	struct ifreq ifreq2, ;
    
           fd = socket(AF_INET, SOCK_STREAM, 0);   ////socket creation
    
         	
     	 strcpy(ifreq2.ifr_name, "IAP Name" );
    	
      	  ret = setdefaultif( &ifreq2 ); // ret is returned 0
    So any pointers as still why the access point dialog appears.

Similar Threads

  1. use openc in s80
    By xuzhiming in forum Open C/C++
    Replies: 2
    Last Post: 2011-01-06, 03:44
  2. OpenC anyone????
    By dhitchman in forum General Development Questions
    Replies: 7
    Last Post: 2009-04-15, 16:48
  3. openc s60 2nd ed. FP3
    By tulimiero in forum Open C/C++
    Replies: 1
    Last Post: 2008-11-22, 12:32
  4. OpenC++
    By hezhengzhou in forum Open C/C++
    Replies: 5
    Last Post: 2008-11-14, 01:49
  5. Replies: 2
    Last Post: 2008-06-24, 12:09

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×