🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #15494

Re: include's y struct's

#15494
From: iLogik
Date: Sat, 01 Jul 2000 00:00
44 lines
2040 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>>>>> "Julio" == Julio Baixauli <baixauli@mat.upc.es> writes:

    Julio> 	�Se puede definir un struct en un .h y usar ese tipo
    Julio> en un .c (incluyendo el .h) ?

sip.

    Julio> 	Otra pregunta: �Hay alg�n error en la siguiente
    Julio> definici�n? :


    Julio> struct my_libnet_ip6_hdr { u_char ip6_class:4, ip6_ver:4;

    Julio>         u_int ip6_flow:24; // 4 bits class, 20 bits flow
    Julio> label

    Julio> 	u_short ip6_paylen; // length excluding this header
    Julio> u_char ip6_nh; // next header, e.g. IPPROTO_TCP u_char
    Julio> ip6_hl; // hop-limit, effectively equivalent to ttl

    Julio>         struct in6_addr ip6_src, ip6_dst; };

No, siempre que tengas definidos correctamente los typedefs
u_char, u_int, y u_short.

Saludos
- -- 
Ley del agujero:
	"No importa lo profundo o superficial que cabes un agujero.
	 Siempre al rellenarlo habr� m�s tierra de la que sacaste."
       Carlos B. Ruiz                  Regist. Linux User #99885
       AKA iLogik en el Irc-Hispano    email: ilogik@cryogen.com
       Clave publica gpg:              email con subject [PGPKEY]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.0 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.5 and Gnu Privacy Guard <http://www.gnupg.org/>

iD8DBQE5XV4bBViOqY8wI+YRAjcWAJ9OPVrYZa1KXkrZv680GXP0De6fOQCgjm/7
eTBNnHzje6qDvpHervLUsVk=
=AXRb
-----END PGP SIGNATURE-----
Technical Details
Message-ID: <87em5etv50.fsf@chaos.rpm.org>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <395B6872.BB4DE159@mat.upc.es>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,ed6ce95082faaceb
X-Google-Attributes: gidf86c8,public
From: iLogik <ilogik@cryogen.com>
Subject: Re: include's y struct's
Date: 2000/07/01
Message-ID: <87em5etv50.fsf@chaos.rpm.org>
X-Deja-AN: 641311122
Distribution: es
Content-Transfer-Encoding: 8bit
References: <395B6872.BB4DE159@mat.upc.es>
Content-Type: text/plain; charset=iso-8859-1
Organization: Ninguna
Mime-Version: 1.0
User-Agent: Gnus/5.070099 (Pterodactyl Gnus v0.99) Emacs/20.5
Newsgroups: es.comp.os.linux.programacion