mirror of
https://git.proxmox.com/git/qemu
synced 2025-08-15 11:51:21 +00:00
64 bit fixes (initial patch by Gwenole Beauchesne)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1458 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
b685369795
commit
101c593562
@ -238,7 +238,7 @@ static void bootp_reply(struct bootp_t *bp)
|
|||||||
|
|
||||||
void bootp_input(struct mbuf *m)
|
void bootp_input(struct mbuf *m)
|
||||||
{
|
{
|
||||||
struct bootp_t *bp = (struct bootp_t *)m->m_data;
|
struct bootp_t *bp = mtod(m, struct bootp_t *);
|
||||||
|
|
||||||
if (bp->bp_op == BOOTP_REQUEST) {
|
if (bp->bp_op == BOOTP_REQUEST) {
|
||||||
bootp_reply(bp);
|
bootp_reply(bp);
|
||||||
|
@ -97,9 +97,9 @@ struct bootp_t {
|
|||||||
uint8_t bp_htype;
|
uint8_t bp_htype;
|
||||||
uint8_t bp_hlen;
|
uint8_t bp_hlen;
|
||||||
uint8_t bp_hops;
|
uint8_t bp_hops;
|
||||||
unsigned long bp_xid;
|
uint32_t bp_xid;
|
||||||
unsigned short bp_secs;
|
uint16_t bp_secs;
|
||||||
unsigned short unused;
|
uint16_t unused;
|
||||||
struct in_addr bp_ciaddr;
|
struct in_addr bp_ciaddr;
|
||||||
struct in_addr bp_yiaddr;
|
struct in_addr bp_yiaddr;
|
||||||
struct in_addr bp_siaddr;
|
struct in_addr bp_siaddr;
|
||||||
|
@ -83,8 +83,8 @@ struct icmp {
|
|||||||
struct ip idi_ip;
|
struct ip idi_ip;
|
||||||
/* options and then 64 bits of data */
|
/* options and then 64 bits of data */
|
||||||
} id_ip;
|
} id_ip;
|
||||||
u_long id_mask;
|
uint32_t id_mask;
|
||||||
char id_data[1];
|
char id_data[1];
|
||||||
} icmp_dun;
|
} icmp_dun;
|
||||||
#define icmp_otime icmp_dun.id_ts.its_otime
|
#define icmp_otime icmp_dun.id_ts.its_otime
|
||||||
#define icmp_rtime icmp_dun.id_ts.its_rtime
|
#define icmp_rtime icmp_dun.id_ts.its_rtime
|
||||||
|
@ -9,6 +9,10 @@ int inet_aton(const char *cp, struct in_addr *ia);
|
|||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
void slirp_init(void);
|
void slirp_init(void);
|
||||||
|
|
||||||
void slirp_select_fill(int *pnfds,
|
void slirp_select_fill(int *pnfds,
|
||||||
@ -29,4 +33,8 @@ int slirp_add_exec(int do_pty, const char *args, int addr_low_byte,
|
|||||||
|
|
||||||
extern const char *tftp_prefix;
|
extern const char *tftp_prefix;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -149,8 +149,7 @@
|
|||||||
#define SIZEOF_INT 4
|
#define SIZEOF_INT 4
|
||||||
|
|
||||||
/* Define to sizeof(char *) */
|
/* Define to sizeof(char *) */
|
||||||
/* XXX: patch it */
|
#define SIZEOF_CHAR_P (HOST_LONG_BITS / 8)
|
||||||
#define SIZEOF_CHAR_P 4
|
|
||||||
|
|
||||||
/* Define if you have random() */
|
/* Define if you have random() */
|
||||||
#undef HAVE_RANDOM
|
#undef HAVE_RANDOM
|
||||||
|
18
slirp/udp.c
18
slirp/udp.c
@ -420,10 +420,16 @@ struct talk_request {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct cu_header {
|
struct cu_header {
|
||||||
char dest[8];
|
uint16_t d_family; // destination family
|
||||||
short family;
|
uint16_t d_port; // destination port
|
||||||
u_short port;
|
uint32_t d_addr; // destination address
|
||||||
u_long addr;
|
uint16_t s_family; // source family
|
||||||
|
uint16_t s_port; // source port
|
||||||
|
uint32_t s_addr; // source address
|
||||||
|
uint32_t seqn; // sequence number
|
||||||
|
uint16_t message; // message
|
||||||
|
uint16_t data_type; // data type
|
||||||
|
uint16_t pkt_len; // packet length
|
||||||
} *cu_head;
|
} *cu_head;
|
||||||
|
|
||||||
switch(so->so_emu) {
|
switch(so->so_emu) {
|
||||||
@ -610,8 +616,8 @@ struct cu_header {
|
|||||||
if (getsockname(so->s, (struct sockaddr *)&addr, &addrlen) < 0)
|
if (getsockname(so->s, (struct sockaddr *)&addr, &addrlen) < 0)
|
||||||
return;
|
return;
|
||||||
cu_head = mtod(m, struct cu_header *);
|
cu_head = mtod(m, struct cu_header *);
|
||||||
cu_head->port = addr.sin_port;
|
cu_head->s_port = addr.sin_port;
|
||||||
cu_head->addr = (u_long) our_addr.s_addr;
|
cu_head->s_addr = our_addr.s_addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -94,6 +94,7 @@ struct udpstat {
|
|||||||
|
|
||||||
extern struct udpstat udpstat;
|
extern struct udpstat udpstat;
|
||||||
extern struct socket udb;
|
extern struct socket udb;
|
||||||
|
struct mbuf;
|
||||||
|
|
||||||
void udp_init _P((void));
|
void udp_init _P((void));
|
||||||
void udp_input _P((register struct mbuf *, int));
|
void udp_input _P((register struct mbuf *, int));
|
||||||
|
Loading…
Reference in New Issue
Block a user