Professional Web Applications Themes

gcc question, darwin - UNIX Programming

Does anyone know where struct sockaddr_in is declared for gcc under Mac OS X? It doesn't appear to be declared in the usual places.......

  1. #1

    Default gcc question, darwin

    Does anyone know where struct sockaddr_in is declared for gcc under Mac OS
    X? It doesn't appear to be declared in the usual places....
    Robert Guest

  2. #2

    Default Re: gcc question, darwin

    Robert Dormer <edu> wrote:
    # Does anyone know where struct sockaddr_in is declared for gcc under Mac OS
    # X? It doesn't appear to be declared in the usual places....

    Take your pick.

    # find /usr/include | xargs grep -s 'sockaddr_in'

    /usr/include/httpd/ap.h: * %pI takes a struct sockaddr_in * and prints it as a.b.c.d:port
    /usr/include/httpd/httpd.h: struct sockaddr_in local_addr; /* local address */
    /usr/include/httpd/httpd.h: struct sockaddr_in remote_addr; /* remote address */
    /usr/include/httpd/httpd.h: struct sockaddr_in local_addr; /* local IP address and port */
    /usr/include/kerberosIV/krb.h: C_Block FAR, Key_schedule, struct sockaddr_in *,
    /usr/include/kerberosIV/krb.h: struct sockaddr_in *));
    /usr/include/kerberosIV/krb.h: Key_schedule FAR, C_Block, struct sockaddr_in *, struct sockaddr_in *));
    /usr/include/kerberosIV/krb.h: KRB_UINT32, C_Block, struct sockaddr_in *,
    /usr/include/kerberosIV/krb.h: struct sockaddr_in *));
    /usr/include/kerberosIV/krb.h: Key_schedule FAR, C_Block, struct sockaddr_in *,
    /usr/include/kerberosIV/krb.h: struct sockaddr_in *, MSG_DAT *));
    /usr/include/kerberosIV/krb.h: C_Block, struct sockaddr_in *, struct sockaddr_in *, MSG_DAT *));
    /usr/include/kerberosIV/krb.h: struct sockaddr_in *, struct sockaddr_in *,
    /usr/include/kerberosIV/krb.h: struct sockaddr_in *, struct sockaddr_in *, char *));
    /usr/include/krb.h: C_Block FAR, Key_schedule, struct sockaddr_in *,
    /usr/include/krb.h: struct sockaddr_in *));
    /usr/include/krb.h: Key_schedule FAR, C_Block, struct sockaddr_in *, struct sockaddr_in *));
    /usr/include/krb.h: KRB_UINT32, C_Block, struct sockaddr_in *,
    /usr/include/krb.h: struct sockaddr_in *));
    /usr/include/krb.h: Key_schedule FAR, C_Block, struct sockaddr_in *,
    /usr/include/krb.h: struct sockaddr_in *, MSG_DAT *));
    /usr/include/krb.h: C_Block, struct sockaddr_in *, struct sockaddr_in *, MSG_DAT *));
    /usr/include/krb.h: struct sockaddr_in *, struct sockaddr_in *,
    /usr/include/krb.h: struct sockaddr_in *, struct sockaddr_in *, char *));
    Binary file /usr/include/libc-gcc3.p matches
    /usr/include/netinet/if_ether.h:struct sockaddr_inarp {
    /usr/include/netinet/in.h:struct sockaddr_in {
    /usr/include/netinet/in_pcb.h: struct sockaddr_in **));
    /usr/include/netinet/in_var.h: struct sockaddr_in ia_addr; /* reserve space for interface name */
    /usr/include/netinet/in_var.h: struct sockaddr_in ia_dstaddr; /* reserve space for broadcast addr */
    /usr/include/netinet/in_var.h: struct sockaddr_in ia_sockmask; /* reserve space for general netmask */
    /usr/include/netinet/in_var.h: struct sockaddr_in ifra_addr;
    /usr/include/netinet/in_var.h: struct sockaddr_in ifra_broadaddr;
    /usr/include/netinet/in_var.h: struct sockaddr_in ifra_mask;
    /usr/include/netinet/in_var.h: * return a pointer to the addr as a sockaddr_in.
    /usr/include/netinet/in_var.h: && ((struct sockaddr_in *)ifma->ifma_addr)->sin_addr.s_addr == \
    /usr/include/netinet/ip_fw.h: struct sockaddr_in fu_fwd_ip;
    /usr/include/netinet/ip_fw.h: struct mbuf **, struct ip_fw_chain **, struct sockaddr_in **));
    /usr/include/netinet/ip_var.h:extern struct sockaddr_in *ip_fw_fwd_addr;
    /usr/include/netinet6/in6.h:struct sockaddr_in6 {
    /usr/include/netinet6/in6.h:extern const struct sockaddr_in6 sa6_any;
    /usr/include/netinet6/in6.h: struct sockaddr_in6 ro_dst;
    /usr/include/netinet6/in6.h:void in6_sin6_2_sin __P((struct sockaddr_in *sin,
    /usr/include/netinet6/in6.h: struct sockaddr_in6 *sin6));
    /usr/include/netinet6/in6.h:void in6_sin_2_v4mapsin6 __P((struct sockaddr_in *sin,
    /usr/include/netinet6/in6.h: struct sockaddr_in6 *sin6));
    /usr/include/netinet6/in6.h:#define satosin6(sa) ((struct sockaddr_in6 *)(sa))
    /usr/include/netinet6/in6_var.h: struct sockaddr_in6 ia_addr; /* interface address */
    /usr/include/netinet6/in6_var.h: struct sockaddr_in6 ia_net; /* network number of interface */
    /usr/include/netinet6/in6_var.h: struct sockaddr_in6 ia_dstaddr; /* space for destination addr */
    /usr/include/netinet6/in6_var.h: struct sockaddr_in6 ia_prefixmask; /* prefix mask */
    /usr/include/netinet6/in6_var.h: struct sockaddr_in6 ifru_addr;
    /usr/include/netinet6/in6_var.h: struct sockaddr_in6 ifru_dstaddr;
    /usr/include/netinet6/in6_var.h: struct sockaddr_in6 ifra_addr;
    /usr/include/netinet6/in6_var.h: struct sockaddr_in6 ifra_dstaddr;
    /usr/include/netinet6/in6_var.h: struct sockaddr_in6 ifra_prefixmask;
    /usr/include/netinet6/in6_var.h: struct sockaddr_in6 ipr_prefix;
    /usr/include/netinet6/in6_var.h: struct sockaddr_in6 irr_matchprefix;
    /usr/include/netinet6/in6_var.h: struct sockaddr_in6 irr_useprefix;
    /usr/include/netinet6/in6_var.h: * return a pointer to the addr as a sockaddr_in6
    /usr/include/netinet6/in6_var.h:#define IFA_IN6(x) (&((struct sockaddr_in6 *)((x)->ifa_addr))->sin6_addr)
    /usr/include/netinet6/in6_var.h:#define IFA_DSTIN6(x) (&((struct sockaddr_in6 *)((x)->ifa_dstaddr))->sin6_addr)
    /usr/include/netinet6/in6_var.h:#define IFPR_IN6(x) (&((struct sockaddr_in6 *)((x)->ifpr_prefix))->sin6_addr)
    /usr/include/netinet6/in6_var.h: struct sockaddr_in6 ia_addr; /* interface address */
    /usr/include/netinet6/in6_var.h: struct sockaddr_in6 ia_net; /* network number of interface */
    /usr/include/netinet6/in6_var.h: struct sockaddr_in6 ia_dstaddr; /* space for destination addr */
    /usr/include/netinet6/in6_var.h: struct sockaddr_in6 ia_prefixmask; /* prefix mask */
    /usr/include/netinet6/in6_var.h: && IN6_ARE_ADDR_EQUAL(&((struct sockaddr_in6 *)ifma->ifma_addr)->sin6_addr, \
    /usr/include/netinet6/in6_var.h:int in6_is_addr_deprecated __P((struct sockaddr_in6 *));
    /usr/include/netinet6/in6_var.h:int in6_embedscope __P((struct in6_addr *, const struct sockaddr_in6 *,
    /usr/include/netinet6/in6_var.h:int in6_recoverscope __P((struct sockaddr_in6 *, const struct in6_addr *,
    /usr/include/netinet6/ip6_mroute.h: struct sockaddr_in6 mf6cc_origin; /* IPv6 origin of mcasts */
    /usr/include/netinet6/ip6_mroute.h: struct sockaddr_in6 mf6cc_mcastgrp; /* multicast group associated */
    /usr/include/netinet6/ip6_mroute.h: struct sockaddr_in6 src;
    /usr/include/netinet6/ip6_mroute.h: struct sockaddr_in6 grp;
    /usr/include/netinet6/ip6_mroute.h: struct sockaddr_in6 mf6c_origin; /* IPv6 origin of mcasts */
    /usr/include/netinet6/ip6_mroute.h: struct sockaddr_in6 mf6c_mcastgrp; /* multicast group associated*/
    /usr/include/netinet6/ip6_var.h:void ip6_notify_pmtu __P((struct inpcb *, struct sockaddr_in6 *,
    /usr/include/netinet6/ip6_var.h:void ip6_mloopback __P((struct ifnet *, struct mbuf *, struct sockaddr_in6 *));
    /usr/include/netinet6/ip6_var.h:int rip6_output __P((struct mbuf *, struct socket *, struct sockaddr_in6 *, struct mbuf *));
    /usr/include/netinet6/ip6protosw.h: struct sockaddr_in6 *ip6c_src; /* srcaddr w/ additional info */
    /usr/include/netinet6/ip6protosw.h: struct sockaddr_in6 *ip6c_dst; /* (final) dstaddr w/ additional info */
    /usr/include/netinet6/ip6protosw.h: struct sockaddr_in6 *, struct mbuf *));
    /usr/include/netinet6/nd6.h: struct sockaddr_in6 rtaddr;
    /usr/include/netinet6/nd6.h: struct sockaddr_in6 prefix;
    /usr/include/netinet6/nd6.h: /* struct sockaddr_in6 advrtr[] */
    /usr/include/netinet6/nd6.h: struct sockaddr_in6 ndpr_prefix; /* prefix */
    /usr/include/netinet6/nd6.h:int nd6_is_addr_neighbor __P((struct sockaddr_in6 *, struct ifnet *));
    /usr/include/netinet6/nd6.h: struct sockaddr_in6 *, struct rtentry *));
    /usr/include/netinfo/ni.h:void *ni_connect(struct sockaddr_in *, const char *);
    /usr/include/netinfo/ni.h:ni_status ni_addrtag(void *, struct sockaddr_in *, ni_name *);
    /usr/include/nfs/krpc.h:int krpc_call __P((struct sockaddr_in *sin,
    /usr/include/nfs/krpc.h: struct mbuf **data, struct sockaddr_in **from));
    /usr/include/nfs/krpc.h:int krpc_portmap __P((struct sockaddr_in *sin,
    /usr/include/nfs/nfsdiskless.h: struct sockaddr_in mygateway; /* Default gateway */
    /usr/include/nfs/nfsdiskless.h: struct sockaddr_in swap_saddr; /* Address of swap server */
    /usr/include/nfs/nfsdiskless.h: struct sockaddr_in root_saddr; /* Address of root server */
    /usr/include/nfs/nfsdiskless.h: struct sockaddr_in ndm_saddr; /* Address of file server */
    /usr/include/resolv.h: struct sockaddr_in
    /usr/include/resolv.h:typedef res_sendhookact (*res_send_qhook)__P((struct sockaddr_in * const *ns,
    /usr/include/resolv.h:typedef res_sendhookact (*res_send_rhook)__P((const struct sockaddr_in *ns,
    /usr/include/resolv.h:int res_isourserver __P((const struct sockaddr_in *));
    /usr/include/rpc/auth.h: struct sockaddr_in *,
    /usr/include/rpc/clnt.h: * struct sockaddr_in *raddr;
    /usr/include/rpc/clnt.h:extern CLIENT *clnttcp_create __P((struct sockaddr_in *,
    /usr/include/rpc/clnt.h: * struct sockaddr_in *raddr;
    /usr/include/rpc/clnt.h: * struct sockaddr_in *raddr;
    /usr/include/rpc/clnt.h:extern CLIENT *clntudp_create __P((struct sockaddr_in *,
    /usr/include/rpc/clnt.h:extern CLIENT *clntudp_bufcreate __P((struct sockaddr_in *,
    /usr/include/rpc/pmap_clnt.h: * struct sockaddr_in raddr;
    /usr/include/rpc/pmap_clnt.h:extern struct pmaplist *pmap_getmaps __P((struct sockaddr_in *));
    /usr/include/rpc/pmap_clnt.h:extern enum clnt_stat pmap_rmtcall __P((struct sockaddr_in *,
    /usr/include/rpc/pmap_clnt.h:extern u_short pmap_getport __P((struct sockaddr_in *,
    /usr/include/rpc/svc.h: struct sockaddr_in xp_raddr; /* remote address */
    /usr/include/rpcsvc/yp_prot.h: struct sockaddr_in dom_server_addr;
    /usr/include/tcpd.h: struct sockaddr_in *sin; /* socket address or 0 */


    --
    Derk Gwen http://derkgwen.250free.com/html/index.html
    I ASSURE YOU WE'RE OPEN!
    Derk Guest

  3. #3

    Default Re: gcc question, darwin

    Derk Gwen wrote:
     

    Yes.......this was the very first thing I did to try to answer my own
    question.

    Including these files does not solve the problem for me. Attempting to
    compile code that uses sockaddr_in still doesn't work for me.....
    Robert Guest

  4. #4

    Default Re: gcc question, darwin

    in comp.unix.programmer i read: 
     

    what a horribly long pile of crap -- most of which was usage of the struct
    rather than the definition ...
     

    or, much easier is ``man ip''.

    --
    a signature
    those Guest

Similar Threads

  1. Where to get in.telnetd and rlogind for Mac OS X 10.3/Darwin
    By John Willis in forum Linux / Unix Administration
    Replies: 4
    Last Post: December 21st, 02:11 AM
  2. [PHP-DEV] demo patch for s*printf probs on darwin
    By Brad Bulger in forum PHP Development
    Replies: 0
    Last Post: October 14th, 01:16 AM
  3. Change Notification functions in Darwin?
    By Dylan in forum Mac Programming
    Replies: 4
    Last Post: September 27th, 07:19 AM
  4. Fink Commander: strange error message in Darwin
    By Jack Mackrel in forum Mac Programming
    Replies: 6
    Last Post: September 22nd, 03:16 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139