Mirror of strace – the linux syscall tracer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

bind.c 608B

1234567891011121314151617181920212223
  1. /*
  2. * Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
  3. * Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
  4. * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
  5. * Copyright (c) 1996-2000 Wichert Akkerman <wichert@cistron.nl>
  6. * Copyright (c) 1999-2018 The strace developers.
  7. * All rights reserved.
  8. *
  9. * SPDX-License-Identifier: LGPL-2.1-or-later
  10. */
  11. #include "defs.h"
  12. SYS_FUNC(bind)
  13. {
  14. printfd(tcp, tcp->u_arg[0]);
  15. tprints(", ");
  16. const int addrlen = tcp->u_arg[2];
  17. decode_sockaddr(tcp, tcp->u_arg[1], addrlen);
  18. tprintf(", %d", addrlen);
  19. return RVAL_DECODED;
  20. }