socket.c (c5c6d7f81a6950d8e32a3b5a0bafd37bfa5a8e88) socket.c (a30ecde6e795682d1473c45acae66a60a76fca2f)
1/*
2 * QEMU System Emulator
3 *
4 * Copyright (c) 2003-2008 Fabrice Bellard
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights

--- 679 unchanged lines hidden (view full) ---

688
689 snprintf(s->nc.info_str, sizeof(s->nc.info_str),
690 "socket: udp=%s:%d",
691 inet_ntoa(raddr.sin_addr), ntohs(raddr.sin_port));
692 return 0;
693}
694
695int net_init_socket(const NetClientOptions *opts, const char *name,
1/*
2 * QEMU System Emulator
3 *
4 * Copyright (c) 2003-2008 Fabrice Bellard
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights

--- 679 unchanged lines hidden (view full) ---

688
689 snprintf(s->nc.info_str, sizeof(s->nc.info_str),
690 "socket: udp=%s:%d",
691 inet_ntoa(raddr.sin_addr), ntohs(raddr.sin_port));
692 return 0;
693}
694
695int net_init_socket(const NetClientOptions *opts, const char *name,
696 NetClientState *peer)
696 NetClientState *peer, Error **errp)
697{
697{
698 /* FIXME error_setg(errp, ...) on failure */
698 Error *err = NULL;
699 const NetdevSocketOptions *sock;
700
701 assert(opts->kind == NET_CLIENT_OPTIONS_KIND_SOCKET);
702 sock = opts->socket;
703
704 if (sock->has_fd + sock->has_listen + sock->has_connect + sock->has_mcast +
705 sock->has_udp != 1) {

--- 61 unchanged lines hidden ---
699 Error *err = NULL;
700 const NetdevSocketOptions *sock;
701
702 assert(opts->kind == NET_CLIENT_OPTIONS_KIND_SOCKET);
703 sock = opts->socket;
704
705 if (sock->has_fd + sock->has_listen + sock->has_connect + sock->has_mcast +
706 sock->has_udp != 1) {

--- 61 unchanged lines hidden ---