summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl/l2tp
diff options
context:
space:
mode:
authorGuillaume Nault <g.nault@alphalink.fr>2013-02-13 13:49:31 +0100
committerKozlov Dmitry <xeb@mail.ru>2013-02-13 17:24:03 +0400
commitd147dd05ef83e9b08efefff9b93ab8595b02a5cf (patch)
tree6582c3fe813e23d2fd3ee0789d6942831902f98b /accel-pppd/ctrl/l2tp
parentf03ef414d049948962b28e4d78c4022c192f7ea1 (diff)
downloadaccel-ppp-d147dd05ef83e9b08efefff9b93ab8595b02a5cf.tar.gz
accel-ppp-d147dd05ef83e9b08efefff9b93ab8595b02a5cf.zip
l2tp: Add const qualifier to packet allocation function
Define the address parameter of l2tp_packet_alloc() as constant. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Diffstat (limited to 'accel-pppd/ctrl/l2tp')
-rw-r--r--accel-pppd/ctrl/l2tp/l2tp.h3
-rw-r--r--accel-pppd/ctrl/l2tp/packet.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/accel-pppd/ctrl/l2tp/l2tp.h b/accel-pppd/ctrl/l2tp/l2tp.h
index d6aed681..3c26c9fe 100644
--- a/accel-pppd/ctrl/l2tp/l2tp.h
+++ b/accel-pppd/ctrl/l2tp/l2tp.h
@@ -77,7 +77,8 @@ int l2tp_recv(int fd, struct l2tp_packet_t **, struct in_pktinfo *);
void l2tp_packet_free(struct l2tp_packet_t *);
void l2tp_packet_print(const struct l2tp_packet_t *,
void (*print)(const char *fmt, ...));
-struct l2tp_packet_t *l2tp_packet_alloc(int ver, int msg_type, struct sockaddr_in *addr);
+struct l2tp_packet_t *l2tp_packet_alloc(int ver, int msg_type,
+ const struct sockaddr_in *addr);
int l2tp_packet_send(int sock, struct l2tp_packet_t *);
int l2tp_packet_add_int16(struct l2tp_packet_t *pack, int id, int16_t val, int M);
int l2tp_packet_add_int32(struct l2tp_packet_t *pack, int id, int32_t val, int M);
diff --git a/accel-pppd/ctrl/l2tp/packet.c b/accel-pppd/ctrl/l2tp/packet.c
index 33859562..87735a2a 100644
--- a/accel-pppd/ctrl/l2tp/packet.c
+++ b/accel-pppd/ctrl/l2tp/packet.c
@@ -57,7 +57,8 @@ void l2tp_packet_print(const struct l2tp_packet_t *pack,
print("]\n");
}
-struct l2tp_packet_t *l2tp_packet_alloc(int ver, int msg_type, struct sockaddr_in *addr)
+struct l2tp_packet_t *l2tp_packet_alloc(int ver, int msg_type,
+ const struct sockaddr_in *addr)
{
struct l2tp_packet_t *pack = mempool_alloc(pack_pool);
if (!pack)