]>
git.ipfire.org Git - people/ms/u-boot.git/blob - lib/net_utils.c
2 * Generic network code. Moved from net.c
4 * Copyright 1994 - 2000 Neil Russell.
5 * Copyright 2000 Roland Borde
6 * Copyright 2000 Paolo Scaffardi
7 * Copyright 2000-2002 Wolfgang Denk, wd@denx.de
8 * Copyright 2009 Dirk Behme, dirk.behme@googlemail.com
10 * See file CREDITS for list of people who contributed to this
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License as
15 * published by the Free Software Foundation; either version 2 of
16 * the License, or (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
31 IPaddr_t
string_to_ip(const char *s
)
40 for (addr
=0, i
=0; i
<4; ++i
) {
41 ulong val
= s
? simple_strtoul(s
, &e
, 10) : 0;