From: Thomas Garsiot <garsiot@st2e.com>
To: Puneet Singhal <puneet@opussoft.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: Doc on error messages
Date: Mon, 26 Feb 2001 09:44:00 -0000 [thread overview]
Message-ID: <3A9A9606.530E44F@st2e.com> (raw)
In-Reply-To: <NEBBJEIPELDNPPCBOLOPIEIPCCAA.puneet@opussoft.com>
Here are the details of the code you requested :
actually this is some code extracted from UCD-SNMP :
struct sockaddr_in *pduIp;
struct snmp_pdu *template_pdu;
pduIp = (struct sockaddr_in *)&(template_pdu->agent_addr);
pduIp->sin_family = AF_INET;
----------------------------------
type definitions :
#define _UCD_SS_MAXSIZE 92 /* <= sizeof( sockaddr_un ) */
#define _UCD_SS_ALIGNSIZE (sizeof (long))
#define _UCD_SS_PAD1SIZE (_UCD_SS_ALIGNSIZE - sizeof( unsigned short ))
#define _UCD_SS_PAD2SIZE (_UCD_SS_MAXSIZE - \
(sizeof( unsigned short ) + _UCD_SS_PAD1SIZE + _UCD_SS_ALIGNSIZE ))
typedef struct {
unsigned char sa_len;
unsigned char sa_family;
char sa_data[ _UCD_SS_PAD1SIZE ];
long sa_align;
char sa_pad2[ _UCD_SS_PAD2SIZE ];
} snmp_ipaddr;
struct snmp_pdu {
[...]
snmp_ipaddr agent_addr;
[...]
};
-----------------
/*
* Socket address, internet style.
*/
struct sockaddr_in {
u_char sin_len;
u_char sin_family;
u_short sin_port;
struct in_addr sin_addr;
char sin_zero[8];
};
struct in_addr {
u_long s_addr;
};
I tried to include only the useful part. Sorry if it's a little messy.
Thanks in advance for your help.
Cheers,
Thomas
next prev parent reply other threads:[~2001-02-26 9:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-26 3:18 Thomas Garsiot
2001-02-26 3:51 ` Soubhik Bhattacharya
2001-02-26 4:00 ` Puneet Singhal
2001-02-26 9:44 ` Thomas Garsiot [this message]
2001-02-26 13:02 ` Alexandre Oliva
2001-02-26 13:16 ` Doc on error messages --More questions " sherry
2001-02-26 13:33 ` Alexandre Oliva
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3A9A9606.530E44F@st2e.com \
--to=garsiot@st2e.com \
--cc=gcc-help@gcc.gnu.org \
--cc=puneet@opussoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).