X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fnet.h;h=a092f291bbcd643b8eda122b10b0509d1fd4b719;hb=e034ea3b77baf90ab8dde2c1beeb22704b01fb2d;hp=ec413664f7d9e61280aec5e36006b4fcb2c52754;hpb=46c495d52400965fc54ada7e0b9024192b9234ba;p=u-boot diff --git a/include/net.h b/include/net.h index ec413664f7..a092f291bb 100644 --- a/include/net.h +++ b/include/net.h @@ -19,6 +19,10 @@ #include #include /* for nton* / ntoh* stuff */ +#define DEBUG_LL_STATE 0 /* Link local state machine changes */ +#define DEBUG_DEV_PKT 0 /* Packets or info directed to the device */ +#define DEBUG_NET_PKT 0 /* Packets on info on the network at large */ +#define DEBUG_INT_STATE 0 /* Internal network state changes */ /* * The number of receive packet buffers, and the required packet buffer @@ -395,7 +399,7 @@ extern int NetRestartWrap; /* Tried all network devices */ enum proto_t { BOOTP, RARP, ARP, TFTPGET, DHCP, PING, DNS, NFS, CDP, NETCONS, SNTP, - TFTPSRV, TFTPPUT + TFTPSRV, TFTPPUT, LINKLOCAL }; /* from net/net.c */ @@ -480,17 +484,18 @@ static inline void net_set_state(enum net_loop_state state) { extern enum net_loop_state net_state; + debug_cond(DEBUG_INT_STATE, "--- NetState set to %d\n", state); net_state = state; } -/* Transmit "NetTxPacket" */ +/* Transmit a packet */ static inline void NetSendPacket(uchar *pkt, int len) { (void) eth_send(pkt, len); } /* - * Transmit UDP packet, performing ARP request if needed + * Transmit "NetTxPacket" as UDP packet, performing ARP request if needed * (ether will be populated) * * @param ether Raw packet buffer @@ -499,7 +504,7 @@ static inline void NetSendPacket(uchar *pkt, int len) * @param sport Source UDP port * @param payload_len Length of data after the UDP header */ -extern int NetSendUDPPacket(uchar *ether, IPaddr_t dest, int dport, +extern int NetSendUDPPacket(uchar *ether, IPaddr_t dest, int dport, int sport, int payload_len); /* Processes a received packet */