]> git.sur5r.net Git - ngadmin/blobdiff - raw/src/net.c
Raw: expose encoding functions
[ngadmin] / raw / src / net.c
index f92b48eee648d6aae1b8430816f664fc318f97bf..e5af939c39d72f89bd4aa91b2a7201f825dac7c7 100644 (file)
@@ -8,7 +8,7 @@
 #include <poll.h>
 
 #include <nsdp/net.h>
-#include "encoding.h"
+#include <nsdp/encoding.h>
 
 
 static inline void timespec_add (struct timespec *tsa, const struct timespec *tsb)
@@ -138,16 +138,12 @@ int recvNsdpPacket (int sock, struct nsdp_cmd *nc, List *attr, const struct time
                if ((nc->remote_addr.sin_addr.s_addr != 0 && remote.sin_addr.s_addr != nc->remote_addr.sin_addr.s_addr) ||
                    (nc->remote_addr.sin_port != 0 && remote.sin_port != nc->remote_addr.sin_port) ||
                    len < (int)sizeof(struct nsdp_header) ||
-                   !validateNsdpHeader(np.nh, nc) ||
+                   !extractNsdpHeader(np.nh, nc) ||
                    extractPacketAttributes(&np, attr, nc->ports) < 0)
                        continue;
                
                nc->remote_addr = remote;
                
-               nc->code = np.nh->code;
-               nc->error = np.nh->error;
-               nc->attr_error = ntohs(np.nh->attr);
-               
                len = 0;
                break;
        }