Back to index

glibc  2.9
sa_len.c File Reference
#include <sys/socket.h>
#include <netash/ash.h>
#include <netatalk/at.h>
#include <netax25/ax25.h>
#include <neteconet/ec.h>
#include <netinet/in.h>
#include <netipx/ipx.h>
#include <netpacket/packet.h>
#include <netrose/rose.h>
#include <netiucv/iucv.h>
#include <sys/un.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


int __libc_sa_len (sa_family_t af)

Function Documentation

Definition at line 33 of file sa_len.c.

  switch (af)
    case AF_APPLETALK:
      return sizeof (struct sockaddr_at);
    case AF_ASH:
      return sizeof (struct sockaddr_ash);
    case AF_AX25:
      return sizeof (struct sockaddr_ax25);
    case AF_ECONET:
      return sizeof (struct sockaddr_ec);
    case AF_INET:
      return sizeof (struct sockaddr_in);
    case AF_INET6:
      return sizeof (struct sockaddr_in6);
    case AF_IPX:
      return sizeof (struct sockaddr_ipx);
    case AF_IUCV:
      return sizeof (struct sockaddr_iucv);
    case AF_LOCAL:
      return sizeof (struct sockaddr_un);
    case AF_PACKET:
      return sizeof (struct sockaddr_ll);
    case AF_ROSE:
      return sizeof (struct sockaddr_rose);
  return 0;