File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,11 @@ std::string vec2str(const std::vector<T> &vec) {
171171 return ss.str ();
172172}
173173
174+ /* *
175+ * @brief Copy uint32 in little endian byte order to destination in host byte order
176+ */
177+ void memcpy_le32toh (uint32_t * dest, const uint32_t * src);
178+
174179}
175180
176181#endif /* IPXP_UTILS_HPP */
Original file line number Diff line number Diff line change 2929
3030#include < arpa/inet.h>
3131#include < cstring>
32+ #include < endian.h>
3233#include < string>
3334#include < utility>
3435
@@ -138,4 +139,9 @@ uint64_t timeval2usec(const struct timeval& tv)
138139 return tv.tv_sec * usec_in_sec + tv.tv_usec ;
139140}
140141
142+ void memcpy_le32toh (uint32_t * dest, const uint32_t * src)
143+ {
144+ *dest = le32toh (*src);
145+ }
146+
141147} // namespace ipxp
You can’t perform that action at this time.
0 commit comments