>First I want to get the current flags of the socket: >> int tmp = fcntl(m_socket, F_GETFL, 0); >Then I want to add the "non-blocking" mode >> int res = fcntl(m_socket, F_SETFL,tmp | O_NONBLOCK);
It's always the same... shortly after writing to the mailing list, I found the solution to my problem myself... >int tmp = ioctl_rt(m_socket, SIOCGIFFLAGS, 0); is the IOCTL to get the flags... but now I'm having an even bigger problem... executing this IOCTL (and also other I tried) fail with a segmentation fault. Has anyone an idea which is the cause of this segmenation fault? Below is the dmesg print-out: ----------------------------- Unable to handle kernel NULL pointer dereference at virtual address 00000000 printing eip: f8afe0eb *pde = 00000000 Oops: 0000 [#1] PREEMPT Modules linked in: rtcap rt_8139too rt_loopback rtpacket rtipv4 rtnet rtai_rtdm rtai_sem rtai_lxrt rtai_hal nvidia CPU: 0 EIP: 0060:[<f8afe0eb>] Tainted: P VLI EFLAGS: 00210016 (2.6.15.1) EIP is at rtdev_get_by_name+0x36/0x69 [rtnet] eax: 00000072 ebx: 00000010 ecx: 0000000f edx: 00000000 esi: f3f86605 edi: 00000000 ebp: f3f86600 esp: f7b59ec0 ds: 007b es: 007b ss: 0068 Process krcrtreceiverte (pid: 6818, threadinfo=f7b58000 task=f2f99530) Stack: 00000000 00200286 f2fbc100 00000000 00008913 f2f99530 f8b00218 00000000 00000000 00000000 f2fbc100 00000000 00008913 f2f99530 f8aea569 f2fbc100 f2f99530 00008913 00000000 00000004 f8aee260 00000000 bfb49460 f8aeb401 Call Trace: [<f8b00218>] rt_socket_if_ioctl+0xe9/0x10d [rtnet] [<f8aea569>] _rtdm_ioctl+0x5a/0x85 [rtai_rtdm] [<f8aeb401>] sys_rtdm_ioctl+0x2c/0x30 [rtai_rtdm] [<f8b14b5b>] rtai_lxrt_invoke+0xdc9/0xfe2 [rtai_lxrt] [<c016489c>] vfs_write+0x122/0x1aa [<f8af114d>] rtai_syscall_dispatcher+0x93/0x11e [rtai_hal] [<f8af11f2>] rtai_uvec_handler+0x1a/0x2f [rtai_hal] Code: 9c 8f 44 24 04 fa bb 10 00 00 00 c7 04 24 00 00 00 00 8b 04 24 8b 2c 85 00 45 b0 f8 85 ed 74 1e 8d 75 04 89 d7 89 d9 49 78 08 ac <ae> 75 08 84 c0 75 f5 31 c0 eb 04 19 c0 0c 01 85 c0 74 19 83 04 -- Echte DSL-Flatrate dauerhaft für 0,- Euro*! "Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ RTnet-users mailing list RTnet-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rtnet-users