]> git.sesse.net Git - vlc/blobdiff - include/netutils.h
-moved warning message to debug message in spdif pass-through plugin
[vlc] / include / netutils.h
index 3b788b86bfdf55ecb957694e7e8f88a3adeeadb1..4f994d61a07d64f512bb55674e366296f7e362fb 100644 (file)
@@ -3,72 +3,36 @@
  * This header describes miscellanous utility functions shared between several
  * modules.
  *****************************************************************************
- * Copyright (C) 1999, 2000 VideoLAN
+ * Copyright (C) 1999, 2000, 2001 VideoLAN
+ * $Id: netutils.h,v 1.16 2001/11/12 04:12:37 sam Exp $
  *
- * Authors:
+ * Authors: Vincent Seguin <seguin@via.ecp.fr>
+ *          Henri Fallon <henri@videolan.org>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- *
+ * 
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *****************************************************************************/
-
-/*****************************************************************************
- * Required headers:
- *  <netinet/in.h>
- *****************************************************************************/
-
-
-/*****************************************************************************
- * if_descr_t: describes a network interface.
- *****************************************************************************
- * Note that if the interface is a point to point one, the broadcast address is
- * set to the destination address of that interface
- *****************************************************************************/
-typedef struct
-{
-    /* Interface device name (e.g. "eth0") */
-    char* psz_ifname;
-    /* Interface physical address */
-    struct sockaddr sa_phys_addr;
-    /* Interface network address */
-    struct sockaddr_in sa_net_addr;
-    /* Interface broadcast address */
-    struct sockaddr_in sa_bcast_addr;
-    /* Interface flags: see if.h for their description) */
-    u16 i_flags;
-} if_descr_t;
-
-
-/*****************************************************************************
- * net_descr_t: describes all the interfaces of the computer
- *****************************************************************************
- * Nothing special to say :)
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
-typedef struct
-{
-    /* Number of networks interfaces described below */
-    int i_if_number;
-    /* Table of if_descr_t describing each interface */
-    if_descr_t* a_if;
-} net_descr_t;
 
+/* The channel without stream is 0 */
+#define COMMON_CHANNEL  0
 
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
-int ReadIfConf      (int i_sockfd, if_descr_t* p_ifdescr, char* psz_name);
-int ReadNetConf     (int i_sockfd, net_descr_t* p_net_descr);
-int BuildInetAddr   ( struct sockaddr_in *p_sa_in, char *psz_in_addr, int i_port );
-int ServerPort      ( char *psz_addr );
+struct sockaddr_in;
+int   network_BuildLocalAddr  ( struct sockaddr_in *, int, char * ); 
+int   network_BuildRemoteAddr ( struct sockaddr_in *, char * );
+int   network_ChannelJoin     ( int );
+int   network_ChannelCreate   ( void );