diff options
Diffstat (limited to 'sys/netgraph/ng_lmi.c')
-rw-r--r-- | sys/netgraph/ng_lmi.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/netgraph/ng_lmi.c b/sys/netgraph/ng_lmi.c index 4521d74..87f3567 100644 --- a/sys/netgraph/ng_lmi.c +++ b/sys/netgraph/ng_lmi.c @@ -556,7 +556,7 @@ static int nglmi_rcvdata(hook_p hook, item_p item) { sc_p sc = NG_NODE_PRIVATE(NG_HOOK_NODE(hook)); - u_char *data; + const u_char *data; unsigned short dlci; u_short packetlen; int resptype_seen = 0; @@ -584,7 +584,7 @@ nglmi_rcvdata(hook_p hook, item_p item) return (0); /* pass the first 4 bytes (already checked in the nglmi_checkdata()) */ - data = mtod(m, u_char *); + data = mtod(m, const u_char *); STEPBY(4); /* Now check if there is a 'locking shift'. This is only seen in @@ -741,7 +741,7 @@ static int nglmi_checkdata(hook_p hook, struct mbuf *m) { sc_p sc = NG_NODE_PRIVATE(NG_HOOK_NODE(hook)); - u_char *data; + const u_char *data; u_short packetlen; unsigned short dlci; u_char type; @@ -751,7 +751,7 @@ nglmi_checkdata(hook_p hook, struct mbuf *m) int highest_dlci = 0; packetlen = m->m_hdr.mh_len; - data = mtod(m, u_char *); + data = mtod(m, const u_char *); if (*data != 0x03) { log(LOG_WARNING, "nglmi: unexpected value in LMI(%d)\n", 1); goto reject; @@ -994,7 +994,7 @@ print: int i, j, k, pos; char buf[100]; int loc; - u_char *bp = mtod(m, u_char *); + const u_char *bp = mtod(m, const u_char *); k = i = 0; loc = (m->m_hdr.mh_len - packetlen); @@ -1021,7 +1021,7 @@ reject: int i, j, k, pos; char buf[100]; int loc; - u_char *bp = mtod(m, u_char *); + const u_char *bp = mtod(m, const u_char *); k = i = 0; loc = (m->m_hdr.mh_len - packetlen); |