Revision: 14727
Author: adrian.chadd
Date: Sun Jul 11 02:16:20 2010
Log: Extend the errorpage API a little bit to hide away the gory details of
address assignment.
http://code.google.com/p/lusca-cache/source/detail?r=14727
Modified:
/playpen/LUSCA_HEAD_ipv6/src/errorpage.c
/playpen/LUSCA_HEAD_ipv6/src/protos.h
=======================================
--- /playpen/LUSCA_HEAD_ipv6/src/errorpage.c Mon Feb 8 01:08:16 2010
+++ /playpen/LUSCA_HEAD_ipv6/src/errorpage.c Sun Jul 11 02:16:20 2010
@@ -276,6 +276,18 @@
}
return err;
}
+
+void
+errorSetAddr(ErrorState *err, sqaddr_t *ip)
+{
+ err->src_addr = sqinet_get_v4_inaddr(ip, SQADDR_ASSERT_IS_V4);
+}
+
+void
+errorSetAddr4(ErrorState *err, struct in_addr ip)
+{
+ err->src_addr = ip;
+}
/*
* Function: errorAppendEntry
=======================================
--- /playpen/LUSCA_HEAD_ipv6/src/protos.h Sun Jul 4 06:56:53 2010
+++ /playpen/LUSCA_HEAD_ipv6/src/protos.h Sun Jul 11 02:16:20 2010
@@ -810,6 +810,8 @@
extern void errorStateFree(ErrorState * err);
extern int errorReservePageId(const char *page_name);
extern ErrorState *errorCon(err_type type, http_status, request_t *
request);
+extern void errorSetAddr(ErrorState *err, sqaddr_t *ip);
+extern void errorSetAddr4(ErrorState *err, struct in_addr ip);
extern int errorPageId(const char *page_name);
extern int asnMatchIp(void *, struct in_addr);
--
You received this message because you are subscribed to the Google Groups
"lusca-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/lusca-commit?hl=en.