¡@

Home 

c++ Programming Glossary: ioctl

Get the IP address of the machine

http://stackoverflow.com/questions/212528/get-the-ip-address-of-the-machine

ip address share improve this question I found the ioctl solution problematic on os x which is POSIX compliant so should..

USB-drive serial number under linux C++

http://stackoverflow.com/questions/2432759/usb-drive-serial-number-under-linux-c

they are called SCSI attached disks . In both situation ioctl calls can be used to retrieve the required information in our.. #include scsi scsi.h #include scsi sg.h #include sys ioctl.h int scsi_get_serial int fd void buf size_t buf_len we shall.. io_hdr.mx_sb_len sizeof sense io_hdr.timeout 5000 result ioctl fd SG_IO io_hdr if result 0 return result if io_hdr.info SG_INFO_OK_MASK..

Detecting TCP Client Disconnect

http://stackoverflow.com/questions/283375/detecting-tcp-client-disconnect

set will return with the handle signalled but when you use ioctl to check the number of bytes pending to be read it will be zero...

How to get a list of video capture devices (web cameras) on linux ( ubuntu )? (C/C++)

http://stackoverflow.com/questions/4290834/how-to-get-a-list-of-video-capture-devices-web-cameras-on-linux-ubuntu-c

stdio.h #include unistd.h #include fcntl.h #include sys ioctl.h #include linux videodev.h int main int fd struct video_capability.. O_RDONLY 1 perror cam_info Can't open device return 1 if ioctl fd VIDIOCGCAP video_cap 1 perror cam_info Can't get capabilities.. size t d x d n video_cap.maxwidth video_cap.maxheight if ioctl fd VIDIOCGWIN video_win 1 perror cam_info Can't get window information..

Computation of Cpu percentage by a single process in unix by the “top” command

http://stackoverflow.com/questions/4450961/computation-of-cpu-percentage-by-a-single-process-in-unix-by-the-top-command

be passing to the PIOCPSINFO or PIOCSTATUS option to the ioctl system call. The PIOCPSINFO option returns miscellaneous process.. 50 sprintf procbuf proc d getpid fd open procbuf O_RDONLY ioctl fd PIOCPSINFO info printf Process user sys time ld sec ld nsec.. info.pr_ctime.tv_sec info.pr_ctime.tv_nsec ioctl fd PIOCSTATUS status printf Process user sys time ld sec ld..

How to get a list video capture devices NAMES (web cameras) on linux ( ubuntu )? (C/C++)

http://stackoverflow.com/questions/4483366/how-to-get-a-list-video-capture-devices-names-web-cameras-on-linux-ubuntu

stdio.h #include unistd.h #include fcntl.h #include sys ioctl.h #include linux videodev.h int main int fd struct video_capability.. O_RDONLY 1 perror cam_info Can't open device return 1 if ioctl fd VIDIOCGCAP video_cap 1 perror cam_info Can't get capabilities.. size t d x d n video_cap.maxwidth video_cap.maxheight if ioctl fd VIDIOCGWIN video_win 1 perror cam_info Can't get window information..

How to set baud rate to 307200 on Linux?

http://stackoverflow.com/questions/4968529/how-to-set-baud-rate-to-307200-on-linux

configure port to use custom speed instead of 38400 ioctl port TIOCGSERIAL ss ss.flags ss.flags ~ASYNC_SPD_MASK ASYNC_SPD_CUST.. speed to d. Closest possible is d n speed closestSpeed ioctl port TIOCSSERIAL ss cfsetispeed tios B38400 cfsetospeed tios.. to tell the driver to interpret B38400 as 38400 baud again ioctl mHandle TIOCGSERIAL ss ss.flags ~ASYNC_SPD_MASK ioctl mHandle..

c++ how to use select to see if a socket has closed

http://stackoverflow.com/questions/5640144/c-how-to-use-select-to-see-if-a-socket-has-closed

time.h #include sys types.h #include unistd.h #include sys ioctl.h bool isclosed int sock fd_set rfd FD_ZERO rfd FD_SET sock..

How to get memory usage at run time in c++?

http://stackoverflow.com/questions/669438/how-to-get-memory-usage-at-run-time-in-c

share improve this question On Linux I've never found an ioctl solution. For our applications we coded a general utility routine..