1 /*
2  * Copyright (c) 2003-2004 Stephen Williams (steve@icarus.com)
3  *
4  *    This source code is free software; you can redistribute it
5  *    and/or modify it in source code form under the terms of the GNU
6  *    General Public License as published by the Free Software
7  *    Foundation; either version 2 of the License, or (at your option)
8  *    any later version.
9  *
10  *    This program is distributed in the hope that it will be useful,
11  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *    GNU General Public License for more details.
14  *
15  *    You should have received a copy of the GNU General Public License
16  *    along with this program; if not, write to the Free Software
17  *    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  */
19 
20 # include  "PUdp.h"
21 
PUdp(perm_string n,unsigned nports)22 PUdp::PUdp(perm_string n, unsigned nports)
23 : ports(nports), sequential(false), initial(verinum::Vx), name_(n)
24 {
25 }
26 
find_port(const char * name)27 unsigned PUdp::find_port(const char*name)
28 {
29       for (unsigned idx = 0 ;  idx < ports.count() ;  idx += 1) {
30 
31 	    if (ports[idx] == name)
32 		  return idx;
33       }
34 
35       return ports.count();
36 }
37 
38