1 /* 2 * Copyright (c) 1998-2002 The Jgroup Team. 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU Lesser General Public License version 2 as 6 * published by the Free Software Foundation. 7 * 8 * This program is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * GNU Lesser General Public License for more details. 12 * 13 * You should have received a copy of the GNU Lesser General Public License 14 * along with this program; if not, write to the Free Software 15 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 16 * 17 */ 18 19 package jgroup.relacs.mss; 20 21 import jgroup.core.EndPoint; 22 23 /** 24 * The <code>NetworkInterface</code> interface. 25 * 26 * @author Salvatore Cammarata 27 * @author Hein Meling 28 * @since Jgroup 1.2 29 */ 30 public interface NetworkInterface 31 { 32 33 /** 34 * Send a datagram packet to the local cluster. 35 * 36 * @param buffer 37 * An array of bytes containing the packet to send. 38 * @param buflen 39 * The actual packet length 40 */ 41 public void send(byte[] buffer, int blen); 42 43 /** 44 * Send a datagram packet to the specified destination 45 * <code>EndPoint</code>. 46 * 47 * @param dest 48 * The destination <code>EndPoint</code>. 49 * @param buffer 50 * An array of bytes containing the packet to send. 51 * @param buflen 52 * The actual packet length 53 */ 54 public void send(EndPoint dest, byte[] buffer, int buflen); 55 56 /** 57 * Start the network interface 58 */ 59 public void doStart(); 60 61 /** 62 * Stop the network interface 63 */ 64 public void doStop(); 65 66 } // END NetworkInterface