]> git.sur5r.net Git - u-boot/blobdiff - include/net.h
mkimage: add UBL header support for booting davinci cpus
[u-boot] / include / net.h
index 95ef8ab83c3f0ac3c9f3f3a1cfb7b3125d9ca225..018a74402c8357f55e3c63777cb49be4514ccd78 100644 (file)
 typedef ulong          IPaddr_t;
 
 
-/*
- * The current receive packet handler.  Called with a pointer to the
- * application packet, and a protocol type (PORT_BOOTPC or PORT_TFTP).
- * All other packets are dealt with without calling the handler.
+/**
+ * An incoming packet handler.
+ * @param pkt    pointer to the application packet
+ * @param dport  destination UDP port
+ * @param sip    source IP address
+ * @param sport  source UDP port
+ * @param len    packet length
  */
-typedef void   rxhand_f(uchar *, unsigned, unsigned, unsigned);
+typedef void rxhand_f(uchar *pkt, unsigned dport,
+                     IPaddr_t sip, unsigned sport,
+                     unsigned len);
 
 /*
  *     A timeout handler.  Called after time interval has expired.
@@ -359,7 +364,8 @@ extern int          NetState;               /* Network loop state           */
 extern int             NetRestartWrap;         /* Tried all network devices    */
 #endif
 
-typedef enum { BOOTP, RARP, ARP, TFTP, DHCP, PING, DNS, NFS, CDP, NETCONS, SNTP } proto_t;
+typedef enum { BOOTP, RARP, ARP, TFTP, DHCP, PING, DNS, NFS, CDP, NETCONS, SNTP,
+              TFTPSRV } proto_t;
 
 /* from net/net.c */
 extern char    BootFile[128];                  /* Boot File name               */