summaryrefslogtreecommitdiff
path: root/sock.c
Commit message (Collapse)AuthorAge
* Use XLAT_END macroDmitry V. Levin2014-02-05
| | | | | Automatically update all xlat structures using the following sed regexp: s/^[[:space:]]*{[[:space:]]*0[[:space:]]*,[[:space:]]*NULL[[:space:]]*,\?[[:space:]]*}[[:space:]]*,\?[[:space:]]*/\tXLAT_END/
* Use XLAT macroDmitry V. Levin2014-02-05
| | | | | | Automatically convert all xlat structures to XLAT form using the following sed regexp: s/^[[:space:]]*{[[:space:]]*\([^",}[:space:]]\+\)[[:space:]]*,[[:space:]]*"\1",\?[[:space:]]*}[[:space:]]*/\tXLAT(\1)/
* Tidy up includes and copyright notices, fix indentationDenys Vlasenko2012-03-16
| | | | | | | | | | | | | | | The files not mentioned in changelog below had only copyright notices fixes and indentation fixes. * defs.h: Include <stdint.h> and <inttypes.h>. * file.c: Do not include <inttypes.h>. Move struct kernel_dirent declaration below top include block. * block.c: Do not include <stdint.h> and <inttypes.h>. * quota.c: Likewise. * desc.c: Likewise. * signal.c: Likewise. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Compress blank linesDmitry V. Levin2012-02-25
| | | | | | Suppress repeated empty lines left after automated code removal. This change was made by filtering every source code file through "cat -s".
* Fix defined(FOO) styleDenys Vlasenko2012-02-25
| | | | | | | | | | | * file.c: Consistently use defined(FOO) instead of defined (FOO). * mem.c: Likewise. * net.c: Likewise. * signal.c: Likewise. * sock.c: Likewise. * linux/mips/syscallent.h: Likewise. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Automated removal of non-Linux codeDenys Vlasenko2012-02-25
| | | | | | | | | | This change is generated by running every source through the following command: unifdef -DLINUX -Dlinux -USUNOS4 -USVR4 -UUNIXWARE -UFREEBSD -USUNOS4_KERNEL_ARCH_KLUDGE -UHAVE_MP_PROCFS -UHAVE_POLLABLE_PROCFS -UHAVE_PR_SYSCALL -UUSE_PROCFS file.c Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Do not use SYS_ipc and SYS_socketcallDmitry V. Levin2012-02-20
| | | | | | | | | | | | | | | | * linux/dummy.h (sys_ipc, sys_socketcall): Remove redirections to printargs. * linux/ia64/syscallent.h: Likewise. * linux/i386/syscallent.h: Remove native_scno initialization for "ipc" and "socketcall". * linux/syscall.h (sys_ipc, sys_socketcall): New prototypes. (SYS_ipc, SYS_socketcall): Remove no longer used constants. [IA64]: Remove undefining of ipc and socket SYS_* constants. [SPARC || SPARC64]: Remove unused ipc SYS_* constants. * ipc.c (sys_ipc): New function. * sock.c (sys_socketcall): Likewise. * syscall.c (trace_syscall_entering): Use sys_func to check for ipc and socket subcalls.
* Use tprints with literal strings, it may be faster than tprintfDenys Vlasenko2011-09-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | * bjm.c: Replace tprintf("str") with tprints("str"). * block.c: Likewise. * desc.c: Likewise. * file.c: Likewise. * io.c: Likewise. * ipc.c: Likewise. * mem.c: Likewise. * net.c: Likewise. * proc.c: Likewise. * process.c: Likewise. * quota.c: Likewise. * resource.c: Likewise. * scsi.c: Likewise. * signal.c: Likewise. * sock.c: Likewise. * strace.c: Likewise. * stream.c: Likewise. * syscall.c: Likewise. * system.c: Likewise. * term.c: Likewise. * time.c: Likewise. * util.c: Likewise. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* Whitespace cleanups. no code changes.Denys Vlasenko2011-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bjm.c: Fix tabulation (such as extra spaces before tabs), convert punctuation where it deviates from prevalent form elsewhere in strace code, convert sizeof and offsetof where it deviates from from prevalent form, remove space between function/macro/array names and (parameters) or [index], add space between "if" and (condition), correct non-standard or wrong indentaion. * defs.h: Likewise * desc.c: Likewise * file.c: Likewise * ipc.c: Likewise * linux/arm/syscallent.h: Likewise * linux/avr32/syscallent.h: Likewise * linux/hppa/syscallent.h: Likewise * linux/i386/syscallent.h: Likewise * linux/ioctlsort.c: Likewise * linux/m68k/syscallent.h: Likewise * linux/microblaze/syscallent.h: Likewise * linux/powerpc/syscallent.h: Likewise * linux/s390/syscallent.h: Likewise * linux/s390x/syscallent.h: Likewise * linux/sh/syscallent.h: Likewise * linux/sh64/syscallent.h: Likewise * linux/tile/syscallent.h: Likewise * linux/x86_64/syscallent.h: Likewise * mem.c: Likewise * net.c: Likewise * pathtrace.c: Likewise * process.c: Likewise * signal.c: Likewise * sock.c: Likewise * strace.c: Likewise * stream.c: Likewise * sunos4/syscall.h: Likewise * sunos4/syscallent.h: Likewise * svr4/syscall.h: Likewise * svr4/syscallent.h: Likewise * syscall.c: Likewise * system.c: Likewise * test/childthread.c: Likewise * test/leaderkill.c: Likewise * test/skodic.c: Likewise * time.c: Likewise * util.c: Likewise Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* "Modernize" all old-style function parameter declarationsDenys Vlasenko2011-05-30
| | | | | | | | | | | | | | | | | | | | * bjm.c: Convert all remaining old-style C function definitions to a "modern" form. This does not change any actual code. * io.c: Likewise * ioctl.c: Likewise * net.c: Likewise * proc.c: Likewise * process.c: Likewise * signal.c: Likewise * sock.c: Likewise * strace.c: Likewise * stream.c: Likewise * syscall.c: Likewise * system.c: Likewise * time.c: Likewise * util.c: Likewise Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* Check umove() return codeDmitry V. Levin2009-11-06
| | | | | | | | | | | | | * bjm.c (sys_query_module): Print input parameters when entering syscall. Fix handling of syscall error. Handle unlikely umove() failures. * ipc.c (tprint_msgrcv): New function. Move part of msgrcv parser code here, add check umove() return code. (sys_msgsnd): Print msqid parameter as int instead of long. (sys_msgrcv): Likewise. Use tprint_msgrcv(). * process.c (print_affinitylist): Check umove() return code. * sock.c (sock_ioctl): Handle unlikely umove() failure in the SIOCGIFCONF parser.
* Fixes for ptrace() argument parsing.Denys Vlasenko2009-01-13
| | | | | | | | | | | | | | * process.c: Add parsing of PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG, PTRACE_GETSIGINFO, PTRACE_SETSIGINFO. * strace.c (handle_stopped_tcbs): Make PTRACE_SETOPTIONS define check more robust. * defs.h: Declare several "extern const struct xlat" arrays here. * desc.c: Remove open_mode_flags[] and open_access_modes[] extern declarations. * net.c: Remove open_mode_flags[] extern declaration. * sock.c: Remove addrfams[] extern declaration. * util.c: Remove struct_user_offsets[] extern declaration. * signal.c: Remove open_mode_flags[] extern declaration.
* Fixing many instances of broken indentation with spaces instead of tabs.Denys Vlasenko2008-12-30
| | | | No code changes.
* 2008-11-11 Dmitry V. Levin <ldv@altlinux.org>Dmitry V. Levin2008-12-10
| | | | * sock.c [LINUX] (sock_ioctl): Parse more SIOCS* ioctls.
* 2007-01-12 Dmitry V. Levin <ldv@altlinux.org>Dmitry V. Levin2007-03-21
| | | | * sock.c (sock_ioctl): Check umove() return code.
* 2007-01-12 Dmitry V. Levin <ldv@altlinux.org>Dmitry V. Levin2007-03-21
| | | | * sock.c (sock_ioctl) [LINUX]: Handle SIOCGIFMAP.
* 2007-01-12 Dmitry V. Levin <ldv@altlinux.org>Dmitry V. Levin2007-03-21
| | | | * sock.c (sock_ioctl) [LINUX]: Handle SIOCGIFTXQLEN.
* 2005-05-31 Dmitry V. Levin <ldv@altlinux.org>Roland McGrath2005-06-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * util.c (printxval): Change third argument from "char *" to "const char *". (printflags): Add third argument, "const char *", with similar meaning to the third argument of printxval(). * defs.h (printxval): Change third argument from "char *" to "const char *". (printflags): Add third argument. * bjm.c (sys_query_module) [LINUX]: Pass third argument to printflags(). * desc.c (sys_fcntl): Likewise. (sys_flock) [LOCK_SH]: Likewise. (print_epoll_event) [HAVE_SYS_EPOLL_H]: Likewise. * file.c (sys_open): Likewise. (solaris_open) [LINUXSPARC]: Likewise. (sys_access): Likewise. (sys_chflags, sys_fchflags) [FREEBSD]: Likewise. (realprintstat) [HAVE_LONG_LONG_OFF_T && HAVE_STRUCT_STAT_ST_FLAGS]: Likewise. (printstat64) [HAVE_STAT64 && HAVE_STRUCT_STAT_ST_FLAGS]: Likewise. (sys_setxattr, sys_fsetxattr): Likewise. * ipc.c (sys_msgget, sys_msgsnd, sys_msgrcv, sys_semget, sys_shmget, sys_shmat) [LINUX || SUNOS4 || FREEBSD]: Likewise. (sys_mq_open) [LINUX]: Likewise. (printmqattr) [HAVE_MQUEUE_H]: Likewise. * mem.c (print_mmap) [!HAVE_LONG_LONG_OFF_T]: Likewise. (sys_mmap64) [_LFS64_LARGEFILE || HAVE_LONG_LONG_OFF_T]: Likewise. (sys_mprotect): Likewise. (sys_mremap, sys_madvise, sys_mlockall) [LINUX]: Likewise. (sys_msync) [MS_ASYNC]: Likewise. (sys_mctl) [MC_SYNC]: Likewise. (sys_remap_file_pages, sys_mbind, sys_get_mempolicy) [LINUX]: Likewise. * net.c (printmsghdr) [HAVE_STRUCT_MSGHDR_MSG_CONTROL]: Likewise. (sys_send, sys_sendto): Likewise. (sys_sendmsg) [HAVE_SENDMSG]: Likewise. (sys_recv, sys_recvfrom): Likewise. (sys_recvmsg) [HAVE_SENDMSG]: Likewise. (printicmpfilter) [ICMP_FILTER]: Likewise. * proc.c (proc_ioctl) [SVR4 && !HAVE_MP_PROCFS || FREEBSD]: Likewise. * process.c (sys_clone) [LINUX]: Likewise. (printwaitn): Likewise. (sys_waitid) [SVR4 || LINUX]: Likewise. * signal.c (sys_sigvec) [SUNOS4 || FREEBSD]: Likewise. (sys_sigaction): Likewise. (printcontext) [SVR4]: Likewise. (print_stack_t) [LINUX) || FREEBSD]: Likewise. (sys_rt_sigaction) [LINUX]: Likewise. * sock.c (sock_ioctl) [LINUX]: Likewise. * stream.c (sys_putmsg, sys_getmsg): Likewise. (sys_putpmsg) [SYS_putpmsg]: Likewise. (sys_getpmsg) [SYS_getpmsg]: Likewise. (sys_poll): Likewise. (print_transport_message) [TI_BIND]: Likewise. (stream_ioctl): Likewise. * system.c (sys_mount, sys_reboot): Likewise. (sys_cacheflush) [LINUX && M68K]: Likewise. (sys_capget, sys_capset) [SYS_capget]: Likewise. * term.c (term_ioctl) [TIOCMGET]: Likewise. * time.c (sys_clock_nanosleep, sys_timer_settime) [LINUX]: Likewise. Fixes RH#159310.
* 2005-02-02 Roland McGrath <roland@redhat.com>Roland McGrath2005-02-02
| | | | | | | | | | | * sock.c (iffflags): New variable, table of IFF_* values. (print_addr): New function. (sock_ioctl): Handle SIOCGIFADDR, SIOCGIFDSTADDR, SIOCGIFBRDADDR, SIOCGIFNETMASK, SIOCGIFFLAGS, SIOCGIFMETRIC, SIOCGIFMTU, SIOCGIFSLAVE, SIOCGIFHWADDR. Use print_addr for SIOCGIFCONF, SIOCGIFNAME, and SIOCGIFINDEX, and fix their output. From Ulrich Drepper <drepper@redhat.com>. Fixes RH#138223.
* 2004-10-19 Roland McGrath <roland@redhat.com>Roland McGrath2004-10-19
| | | | | * sock.c [! LINUX]: Include <sys/socket.h> before <sys/sockio.h>. Reported by Marty Leisner <mleisner@eng.mc.xerox.com>.
* 2004-09-03 Roland McGrath <roland@redhat.com>Roland McGrath2004-09-04
| | | | | | | | | | | | | | | | | | | | | | * util.c (xlookup, printxval, addflags, printflags): Use const for struct xlat * argument. * defs.h (xlookup, printxval, addflags, printflags): Update decls. * bjm.c: Add const to all struct xlat defns. * desc.c: Likewise. * file.c: Likewise. * ipc.c: Likewise. * mem.c: Likewise. * net.c: Likewise. * proc.c: Likewise. * process.c: Likewise. * resource.c: Likewise. * signal.c: Likewise. * sock.c: Likewise. * stream.c: Likewise. * system.c: Likewise. * term.c: Likewise. * time.c: Likewise. * util.c: Likewise.
* 2004-07-12 Roland McGrath <roland@redhat.com>Roland McGrath2004-07-12
| | | | | | | | * net.c (addrfams): Make variable global. * sock.c (sock_ioctl): Decode the arguments for SIOCGIFNAME, SIOCGIFINDEX, and SIOCGIFCONF. From Ulrich Drepper <drepper@redhat.com>. Fixes RH#126917.
* 2003-06-26 Roland McGrath <roland@redhat.com>Roland McGrath2003-06-26
| | | | | | | | | | | | * configure.ac: SHMEDIA -> SH64 * defs.h: Likewise. * mem.c: Likewise. * process.c: Likewise. * sock.c: Likewise. * syscall.c: Likewise. * util.c: Likewise. * linux/shmedia/syscallent.h: Moved to ... * linux/sh64/syscallent.h: ... here.
* 2003-06-02 Roland McGrath <roland@redhat.com>Roland McGrath2003-06-02
| | | | | * configure.ac, defs.h, mem.c, process.c, sock.c, syscall.c, util.c: Merged in SHmedia port from Stephen Thomas <stephen.thomas@superh.com>.
* 2003-04-01 Philippe De Muyter <phdm@macqel.be>Roland McGrath2003-04-02
| | | | | * sock.c, stream.c: Check #ifdef LINUX, not linux. * file.c: Always provide sys_*attr, regardless of #ifdef XATTR_CREATE.
* Merge patch from Greg Banks for Linux/SuperH supportWichert Akkerman2002-05-01
|
* Merged in a bunch of patches that I got as reaction to the 3.99 release.Wichert Akkerman1999-05-09
| | | | See the ChangeLog for details
* Initial revisionWichert Akkerman1999-02-19