Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

__builtin_return_address(3) [netbsd man page]

__BUILTIN_RETURN_ADDRESS(3)				   BSD Library Functions Manual 			       __BUILTIN_RETURN_ADDRESS(3)

NAME
__builtin_return_address -- the return address of a function SYNOPSIS
void * __builtin_return_address(unsigned int level); void * __builtin_frame_address(unsigned int level); DESCRIPTION
The __builtin_return_address() is a GNU extension for obtaining the return address of the current function or one of the callers of the cur- rent function. The parameter level specifies the number of frames that should be scanned up in the call stack. A value 0 returns the address of the current function, a value 1 requests the address of the caller of the current function, a value 2 asks for the address of the caller's caller, and so forth. If the top of the call stack has been reached, the function will return 0. Note also that on some architectures it is only possible to determine the address of the current function. In such cases a value 0 is returned. Thus, it is usually safe to only use the value 0 for level. The __builtin_frame_address() behaves similarly, but returns the address of the function frame rather than the return address of the func- tion. SEE ALSO
gcc(1), __builtin_object_size(3) CAVEATS
These are non-standard, compiler-specific extensions. BSD
December 19, 2010 BSD

Check Out this Related Man Page

SCTP_GETADDRLEN(3)					   BSD Library Functions Manual 					SCTP_GETADDRLEN(3)

NAME
sctp_getaddrlen -- return the address length of an address family LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <sys/types.h> #include <sys/socket.h> #include <netinet/sctp.h> int sctp_getaddrlen(sa_family_t family); DESCRIPTION
The sctp_getaddrlen() function returns the size of a specific address family. This function is provided for application binary compatibility since it provides the application with the size the operating system thinks the specific address family is. Note that the function will actually create an SCTP socket and then gather the information via a getsockopt() system calls. If for some reason a SCTP socket cannot be created or the getsockopt() call fails, an error will be returned with errno set as specified in the socket() or getsockopt() system call. RETURN VALUES
The call returns the number of bytes that the operating system expects for the specific address family or -1. ERRORS
The sctp_getaddrlen() function can return the following errors: [EINVAL] The address family specified does NOT exist. SEE ALSO
getsockopt(2), socket(2), sctp(4) BSD
December 15, 2006 BSD
Man Page