Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
net-tools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
net-tools
Commits
97b31cee
Commit
97b31cee
authored
Nov 20, 2011
by
Mike Frysinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean up const/unsigned pointers with aftype/hwtype structs
Signed-off-by:
Mike Frysinger
<
vapier@gentoo.org
>
parent
7ae4aa56
Changes
25
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
48 additions
and
48 deletions
+48
-48
arp.c
arp.c
+3
-3
lib/arcnet.c
lib/arcnet.c
+1
-1
lib/ash.c
lib/ash.c
+3
-3
lib/ax25.c
lib/ax25.c
+2
-2
lib/ddp.c
lib/ddp.c
+2
-2
lib/econet.c
lib/econet.c
+4
-4
lib/ether.c
lib/ether.c
+1
-1
lib/eui64.c
lib/eui64.c
+1
-1
lib/fddi.c
lib/fddi.c
+1
-1
lib/frame.c
lib/frame.c
+1
-1
lib/hippi.c
lib/hippi.c
+1
-1
lib/ib.c
lib/ib.c
+1
-1
lib/inet.c
lib/inet.c
+2
-2
lib/inet6.c
lib/inet6.c
+2
-2
lib/ipx.c
lib/ipx.c
+2
-2
lib/irda.c
lib/irda.c
+1
-1
lib/loopback.c
lib/loopback.c
+1
-1
lib/net-support.h
lib/net-support.h
+3
-3
lib/netrom.c
lib/netrom.c
+2
-2
lib/rose.c
lib/rose.c
+3
-3
lib/strip.c
lib/strip.c
+2
-2
lib/tr.c
lib/tr.c
+1
-1
lib/tunnel.c
lib/tunnel.c
+1
-1
lib/unix.c
lib/unix.c
+4
-4
lib/x25.c
lib/x25.c
+3
-3
No files found.
arp.c
View file @
97b31cee
...
...
@@ -434,7 +434,7 @@ static int arp_file(char *name)
/* Print the contents of an ARP request block. */
static
void
arp_disp_2
(
c
har
*
name
,
int
type
,
int
arp_flags
,
char
*
hwa
,
char
*
mask
,
char
*
dev
)
static
void
arp_disp_2
(
c
onst
char
*
name
,
int
type
,
int
arp_flags
,
const
char
*
hwa
,
const
char
*
mask
,
const
char
*
dev
)
{
static
int
title
=
0
;
struct
hwtype
*
xhw
;
...
...
@@ -484,7 +484,7 @@ static void arp_disp_2(char *name, int type, int arp_flags, char *hwa, char *mas
}
/* Print the contents of an ARP request block. */
static
void
arp_disp
(
c
har
*
name
,
char
*
ip
,
int
type
,
int
arp_flags
,
char
*
hwa
,
char
*
mask
,
char
*
dev
)
static
void
arp_disp
(
c
onst
char
*
name
,
const
char
*
ip
,
int
type
,
int
arp_flags
,
const
char
*
hwa
,
const
char
*
mask
,
const
char
*
dev
)
{
struct
hwtype
*
xhw
;
...
...
@@ -538,7 +538,7 @@ static int arp_show(char *name)
char
dev
[
100
];
int
type
,
flags
;
FILE
*
fp
;
char
*
hostname
;
c
onst
c
har
*
hostname
;
int
num
,
entries
=
0
,
showed
=
0
;
host
[
0
]
=
'\0'
;
...
...
lib/arcnet.c
View file @
97b31cee
...
...
@@ -35,7 +35,7 @@ extern struct hwtype arcnet_hwtype;
/* Display an ARCnet address in readable format. */
static
c
har
*
pr_arcnet
(
unsigned
char
*
ptr
)
static
c
onst
char
*
pr_arcnet
(
const
char
*
ptr
)
{
static
char
buff
[
64
];
...
...
lib/ash.c
View file @
97b31cee
...
...
@@ -31,8 +31,8 @@ static unsigned char hamming[16] =
};
/* Display an Ash address in readable format. */
static
char
*
pr_ash
(
unsigned
char
*
ptr
)
static
c
onst
c
har
*
pr_ash
(
const
char
*
ptr
)
{
static
char
buff
[
128
];
char
*
p
=
buff
;
...
...
@@ -102,7 +102,7 @@ struct hwtype ash_hwtype =
#if HAVE_AFASH
/* Display an Ash socket address. */
static
char
*
static
c
onst
c
har
*
pr_sash
(
struct
sockaddr
*
sap
,
int
numeric
)
{
static
char
buf
[
64
];
...
...
lib/ax25.c
View file @
97b31cee
...
...
@@ -47,7 +47,7 @@ static char AX25_errmsg[128];
extern
struct
aftype
ax25_aftype
;
static
c
har
*
AX25_print
(
unsigned
char
*
ptr
)
static
c
onst
char
*
AX25_print
(
const
char
*
ptr
)
{
static
char
buff
[
8
];
int
i
;
...
...
@@ -66,7 +66,7 @@ static char *AX25_print(unsigned char *ptr)
/* Display an AX.25 socket address. */
static
char
*
static
c
onst
c
har
*
AX25_sprint
(
struct
sockaddr
*
sap
,
int
numeric
)
{
static
char
buf
[
64
];
...
...
lib/ddp.c
View file @
97b31cee
...
...
@@ -32,7 +32,7 @@
#include "util.h"
/* Display a ddp domain address. */
static
c
har
*
ddp_print
(
unsigned
char
*
ptr
)
static
c
onst
char
*
ddp_print
(
const
char
*
ptr
)
{
static
char
buff
[
64
];
struct
sockaddr_at
*
sat
=
(
struct
sockaddr_at
*
)
(
ptr
-
2
);
...
...
@@ -42,7 +42,7 @@ static char *ddp_print(unsigned char *ptr)
/* Display a ddp domain address. */
static
char
*
ddp_sprint
(
struct
sockaddr
*
sap
,
int
numeric
)
static
c
onst
c
har
*
ddp_sprint
(
struct
sockaddr
*
sap
,
int
numeric
)
{
static
char
buf
[
64
];
...
...
lib/econet.c
View file @
97b31cee
...
...
@@ -32,8 +32,8 @@
/* Display an Econet address */
static
char
*
ec_print
(
unsigned
char
*
ptr
)
static
c
onst
c
har
*
ec_print
(
const
char
*
ptr
)
{
static
char
buff
[
64
];
struct
ec_addr
*
ec
=
(
struct
ec_addr
*
)
ptr
;
...
...
@@ -43,7 +43,7 @@ ec_print(unsigned char *ptr)
/* Display an Econet socket address */
static
char
*
static
c
onst
c
har
*
ec_sprint
(
struct
sockaddr
*
sap
,
int
numeric
)
{
struct
sockaddr_ec
*
sec
=
(
struct
sockaddr_ec
*
)
sap
;
...
...
@@ -51,7 +51,7 @@ ec_sprint(struct sockaddr *sap, int numeric)
if
(
sap
->
sa_family
!=
AF_ECONET
)
return
_
(
"[NONE SET]"
);
return
ec_print
((
unsigned
char
*
)
&
sec
->
addr
);
return
ec_print
((
const
char
*
)
&
sec
->
addr
);
}
static
int
...
...
lib/ether.c
View file @
97b31cee
...
...
@@ -35,7 +35,7 @@ extern struct hwtype ether_hwtype;
/* Display an Ethernet address in readable format. */
static
c
har
*
pr_ether
(
unsigned
char
*
ptr
)
static
c
onst
char
*
pr_ether
(
const
char
*
ptr
)
{
static
char
buff
[
64
];
...
...
lib/eui64.c
View file @
97b31cee
...
...
@@ -49,7 +49,7 @@
struct
hwtype
eui64_hwtype
;
/* Display an EUI-64 address in readable format. */
static
c
har
*
pr_eui64
(
unsigned
char
*
ptr
)
static
c
onst
char
*
pr_eui64
(
const
char
*
ptr
)
{
static
char
buff
[
64
];
...
...
lib/fddi.c
View file @
97b31cee
...
...
@@ -46,7 +46,7 @@ extern struct hwtype fddi_hwtype;
/* Display an FDDI address in readable format. */
static
c
har
*
pr_fddi
(
unsigned
char
*
ptr
)
static
c
onst
char
*
pr_fddi
(
const
char
*
ptr
)
{
static
char
buff
[
64
];
...
...
lib/frame.c
View file @
97b31cee
...
...
@@ -37,7 +37,7 @@
#include "net-support.h"
#include "pathnames.h"
char
*
pr_dlci
(
unsigned
char
*
ptr
)
static
const
char
*
pr_dlci
(
const
char
*
ptr
)
{
static
char
buf
[
12
];
...
...
lib/hippi.c
View file @
97b31cee
...
...
@@ -46,7 +46,7 @@ extern struct hwtype hippi_hwtype;
/* Display an HIPPI address in readable format. */
static
c
har
*
pr_hippi
(
unsigned
char
*
ptr
)
static
c
onst
char
*
pr_hippi
(
const
char
*
ptr
)
{
static
char
buff
[
64
];
...
...
lib/ib.c
View file @
97b31cee
...
...
@@ -36,7 +36,7 @@ extern struct hwtype ib_hwtype;
/* Display an InfiniBand address in readable format. */
static
c
har
*
pr_ib
(
unsigned
char
*
ptr
)
static
c
onst
char
*
pr_ib
(
const
char
*
ptr
)
{
static
char
buff
[
128
];
char
*
pos
;
...
...
lib/inet.c
View file @
97b31cee
...
...
@@ -229,14 +229,14 @@ static void INET_reserror(char *text)
/* Display an Internet socket address. */
static
c
har
*
INET_print
(
unsigned
char
*
ptr
)
static
c
onst
char
*
INET_print
(
const
char
*
ptr
)
{
return
(
inet_ntoa
((
*
(
struct
in_addr
*
)
ptr
)));
}
/* Display an Internet socket address. */
static
char
*
INET_sprint
(
struct
sockaddr
*
sap
,
int
numeric
)
static
c
onst
c
har
*
INET_sprint
(
struct
sockaddr
*
sap
,
int
numeric
)
{
static
char
buff
[
128
];
...
...
lib/inet6.c
View file @
97b31cee
...
...
@@ -126,7 +126,7 @@ static void INET6_reserror(char *text)
/* Display an Internet socket address. */
static
c
har
*
INET6_print
(
unsigned
char
*
ptr
)
static
c
onst
char
*
INET6_print
(
const
char
*
ptr
)
{
static
char
name
[
80
];
...
...
@@ -137,7 +137,7 @@ static char *INET6_print(unsigned char *ptr)
/* Display an Internet socket address. */
/* dirty! struct sockaddr usually doesn't suffer for inet6 addresses, fst. */
static
char
*
INET6_sprint
(
struct
sockaddr
*
sap
,
int
numeric
)
static
c
onst
c
har
*
INET6_sprint
(
struct
sockaddr
*
sap
,
int
numeric
)
{
static
char
buff
[
128
];
...
...
lib/ipx.c
View file @
97b31cee
...
...
@@ -42,7 +42,7 @@
#endif
/* Display a ipx domain address. */
static
c
har
*
IPX_print
(
unsigned
char
*
ptr
)
static
c
onst
char
*
IPX_print
(
const
char
*
ptr
)
{
static
char
buff
[
64
];
struct
sockaddr_ipx
*
sipx
=
(
struct
sockaddr_ipx
*
)
(
ptr
-
2
);
...
...
@@ -73,7 +73,7 @@ static char *IPX_print(unsigned char *ptr)
/* Display a ipx domain address. */
static
char
*
IPX_sprint
(
struct
sockaddr
*
sap
,
int
numeric
)
static
c
onst
c
har
*
IPX_sprint
(
struct
sockaddr
*
sap
,
int
numeric
)
{
static
char
buf
[
64
];
...
...
lib/irda.c
View file @
97b31cee
...
...
@@ -59,7 +59,7 @@
* Print hardware address of interface
*
*/
static
c
har
*
irda_print
(
unsigned
char
*
ptr
)
static
c
onst
char
*
irda_print
(
const
char
*
ptr
)
{
static
char
buff
[
12
];
...
...
lib/loopback.c
View file @
97b31cee
...
...
@@ -32,7 +32,7 @@
#include "util.h"
/* Display an UNSPEC address. */
static
c
har
*
pr_unspec
(
unsigned
char
*
ptr
)
static
c
onst
char
*
pr_unspec
(
const
char
*
ptr
)
{
static
char
buff
[
64
];
char
*
pos
;
...
...
lib/net-support.h
View file @
97b31cee
...
...
@@ -38,8 +38,8 @@ struct aftype {
char
*
title
;
int
af
;
int
alen
;
c
har
*
(
*
print
)
(
unsigned
char
*
);
char
*
(
*
sprint
)
(
struct
sockaddr
*
,
int
numeric
);
c
onst
char
*
(
*
print
)
(
const
char
*
);
c
onst
c
har
*
(
*
sprint
)
(
struct
sockaddr
*
,
int
numeric
);
int
(
*
input
)
(
int
type
,
char
*
bufp
,
struct
sockaddr
*
);
void
(
*
herror
)
(
char
*
text
);
int
(
*
rprint
)
(
int
options
);
...
...
@@ -60,7 +60,7 @@ struct hwtype {
char
*
title
;
int
type
;
int
alen
;
c
har
*
(
*
print
)
(
unsigned
char
*
);
c
onst
char
*
(
*
print
)
(
const
char
*
);
int
(
*
input
)
(
char
*
,
struct
sockaddr
*
);
int
(
*
activate
)
(
int
fd
);
int
suppress_null_addr
;
...
...
lib/netrom.c
View file @
97b31cee
...
...
@@ -52,7 +52,7 @@ static char netrom_errmsg[128];
extern
struct
aftype
netrom_aftype
;
static
c
har
*
NETROM_print
(
unsigned
char
*
ptr
)
static
c
onst
char
*
NETROM_print
(
const
char
*
ptr
)
{
static
char
buff
[
8
];
int
i
;
...
...
@@ -71,7 +71,7 @@ static char *NETROM_print(unsigned char *ptr)
/* Display an AX.25 socket address. */
static
char
*
NETROM_sprint
(
struct
sockaddr
*
sap
,
int
numeric
)
static
c
onst
c
har
*
NETROM_sprint
(
struct
sockaddr
*
sap
,
int
numeric
)
{
char
buf
[
64
];
if
(
sap
->
sa_family
==
0xFFFF
||
sap
->
sa_family
==
0
)
...
...
lib/rose.c
View file @
97b31cee
...
...
@@ -53,8 +53,8 @@ static char ROSE_errmsg[128];
extern
struct
aftype
rose_aftype
;
static
char
*
ROSE_print
(
unsigned
char
*
ptr
)
static
c
onst
c
har
*
ROSE_print
(
const
char
*
ptr
)
{
static
char
buff
[
12
];
...
...
@@ -64,7 +64,7 @@ static char *
}
/* Display a ROSE socket address. */
static
char
*
static
c
onst
c
har
*
ROSE_sprint
(
struct
sockaddr
*
sap
,
int
numeric
)
{
if
(
sap
->
sa_family
==
0xFFFF
||
sap
->
sa_family
==
0
)
...
...
lib/strip.c
View file @
97b31cee
...
...
@@ -38,8 +38,8 @@
extern
struct
hwtype
strip_hwtype
;
static
char
*
pr_strip
(
unsigned
char
*
ptr
)
static
c
onst
c
har
*
pr_strip
(
const
char
*
ptr
)
{
static
char
buff
[
64
];
if
(
ptr
[
1
])
...
...
lib/tr.c
View file @
97b31cee
...
...
@@ -39,7 +39,7 @@ extern struct hwtype tr_hwtype;
extern
struct
hwtype
tr_hwtype1
;
#endif
static
c
har
*
pr_tr
(
unsigned
char
*
ptr
)
static
c
onst
char
*
pr_tr
(
const
char
*
ptr
)
{
static
char
buff
[
64
];
...
...
lib/tunnel.c
View file @
97b31cee
...
...
@@ -21,7 +21,7 @@
extern
struct
hwtype
ether_hwtype
;
static
c
har
*
pr_tunnel
(
unsigned
char
*
ptr
)
static
c
onst
char
*
pr_tunnel
(
const
char
*
ptr
)
{
return
(
""
);
}
...
...
lib/unix.c
View file @
97b31cee
...
...
@@ -32,7 +32,7 @@
/* Display an UNSPEC address. */
static
c
har
*
UNSPEC_print
(
unsigned
char
*
ptr
)
static
c
onst
char
*
UNSPEC_print
(
const
char
*
ptr
)
{
static
char
buff
[
64
];
char
*
pos
;
...
...
@@ -48,7 +48,7 @@ static char *UNSPEC_print(unsigned char *ptr)
/* Display an UNSPEC socket address. */
static
char
*
UNSPEC_sprint
(
struct
sockaddr
*
sap
,
int
numeric
)
static
c
onst
c
har
*
UNSPEC_sprint
(
struct
sockaddr
*
sap
,
int
numeric
)
{
static
char
buf
[
64
];
...
...
@@ -61,14 +61,14 @@ static char *UNSPEC_sprint(struct sockaddr *sap, int numeric)
#if HAVE_AFUNIX
/* Display a UNIX domain address. */
static
c
har
*
UNIX_print
(
unsigned
char
*
ptr
)
static
c
onst
char
*
UNIX_print
(
const
char
*
ptr
)
{
return
(
ptr
);
}
/* Display a UNIX domain address. */
static
char
*
UNIX_sprint
(
struct
sockaddr
*
sap
,
int
numeric
)
static
c
onst
c
har
*
UNIX_sprint
(
struct
sockaddr
*
sap
,
int
numeric
)
{
static
char
buf
[
64
];
...
...
lib/x25.c
View file @
97b31cee
...
...
@@ -50,8 +50,8 @@ extern struct aftype x25_aftype;
#endif
static
char
*
X25_print
(
unsigned
char
*
ptr
)
static
c
onst
c
har
*
X25_print
(
const
char
*
ptr
)
{
static
char
buff
[
X25_ADDR_LEN
+
1
];
...
...
@@ -63,7 +63,7 @@ X25_print(unsigned char *ptr)
/* Display an X.25 socket address. */
static
char
*
static
c
onst
c
har
*
X25_sprint
(
struct
sockaddr
*
sap
,
int
numeric
)
{
if
(
sap
->
sa_family
==
0xFFFF
||
sap
->
sa_family
==
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment