Skip to content

Commit

Permalink
v2.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
sunmingbao committed Nov 21, 2013
1 parent b80c407 commit 6603b03
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 38 deletions.
6 changes: 5 additions & 1 deletion inc/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,11 @@ typedef unsigned short __u16;
typedef __signed__ int __s32;
typedef unsigned int __u32;

#define ETH_TYPE_IP 0x0800
#define ETH_P_LOOP 0x0060 /* Ethernet Loopback packet */
#define ETH_P_ECHO 0x0200 /* Ethernet Echo packet */
#define ETH_P_PPP_DISC 0x8863 /* PPPoE discovery messages */
#define ETH_P_PPP_SES 0x8864 /* PPPoE session messages */

#define ETH_P_IP 0x0800 /* Internet Protocol packet */
#define ETH_P_ARP 0x0806 /* Address Resolution packet */
#define ETH_P_RARP 0x8035 /* Reverse Addr Res packet */
Expand Down
9 changes: 5 additions & 4 deletions release_notes.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@

С����̫�������� v2.3.1
С����̫�������� v2.3.2

�������ڣ�2013-11-20
�������ڣ�2013-11-21

�������޸ġ�
o �����˱����б����еĵ�ַ��ʾ����

���������ơ�
o �Ż��˱����б�����ʾ���ݡ�
o �Ż��˲��ֽ�����ʾ��
o �����˱����б�������̫�����ĵ���ʾ���ݡ�


13 changes: 13 additions & 0 deletions src/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1063,6 +1063,19 @@ void get_eth_type_name(int type, char *info)
strcpy(info, "rarp");
return;

case ETH_P_LOOP:
strcpy(info, "LOOP");
return;

case ETH_P_ECHO:
strcpy(info, "ECHO");
return;

case ETH_P_PPP_DISC:
case ETH_P_PPP_SES:
strcpy(info, "PPPoE");
return;

case ETH_P_IPV6:
strcpy(info, "ipv6");
return;
Expand Down
2 changes: 1 addition & 1 deletion src/frame_window.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ CreateStatusBar();

case IDM_GET_NEW_VERSION:
ShellExecute(NULL, "open"
, "http://www.crsky.com/soft/49404.html"
, "http://sourceforge.net/projects/xb-ether-tester/files/latest/download?source=directory"
, NULL, NULL, SW_SHOWNORMAL);

return 0 ;
Expand Down
18 changes: 3 additions & 15 deletions src/right_window.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "global_info.h"
#include "res.h"

const char version[4]={'2','3','1','0'};
const char version[4]={'2','3','2','0'};

TCHAR szRightWinClassName[] = TEXT ("right_win") ;
HWND hwnd_right;
Expand Down Expand Up @@ -270,23 +270,11 @@ BOOL InsertItemFromStream(HWND hWndListView, t_stream* pt_stream)

if (ntohs(pt_eth_hdr->type)!=ETH_P_IP)
{
sprintf(info, "%02hhx %02hhx %02hhx %02hhx %02hhx %02hhx"
, pt_stream->eth_packet.src[0]
, pt_stream->eth_packet.src[1]
, pt_stream->eth_packet.src[2]
, pt_stream->eth_packet.src[3]
, pt_stream->eth_packet.src[4]
, pt_stream->eth_packet.src[5]);
mac_n2str(info, pt_stream->eth_packet.src);
ListView_SetItemText(hWndListView, index, 4, info);


sprintf(info, "%02hhx %02hhx %02hhx %02hhx %02hhx %02hhx"
, pt_stream->eth_packet.dst[0]
, pt_stream->eth_packet.dst[1]
, pt_stream->eth_packet.dst[2]
, pt_stream->eth_packet.dst[3]
, pt_stream->eth_packet.dst[4]
, pt_stream->eth_packet.dst[5]);
mac_n2str(info, pt_stream->eth_packet.dst);
ListView_SetItemText(hWndListView, index, 5, info);

get_eth_type_name(ntohs(pt_stream->eth_packet.type), info);
Expand Down
36 changes: 20 additions & 16 deletions src/stream_edit_dlg.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,22 @@ void get_pkt_desc_info(char *info, void* p_eth_hdr, uint32_t err_flags)
strcpy(info, "rarp");
goto append_err_info;

case ETH_P_LOOP:
strcpy(info, "Ethernet Loopback packet");
goto append_err_info;

case ETH_P_ECHO:
strcpy(info, "Ethernet Echo packet");
goto append_err_info;

case ETH_P_PPP_DISC:
strcpy(info, "PPPoE discovery messages");
goto append_err_info;

case ETH_P_PPP_SES:
strcpy(info, "PPPoE session messages");
goto append_err_info;

case ETH_P_IPV6:
strcpy(info, "IPv6");
goto append_err_info;
Expand Down Expand Up @@ -890,7 +906,7 @@ void show_edit_ui_for_tvi(HWND hDlg, HWND htv, HTREEITEM htvi)

hex_win_sel(GetDlgItem(hDlg, ID_SED_HEX_EDIT), pt_tvi_data->data_offset, pt_tvi_data->len);

if ((ETH_TYPE_IP==ntohs(gt_edit_stream.eth_packet.type))
if ((ETH_P_IP==ntohs(gt_edit_stream.eth_packet.type))
&&
(pt_tvi_data->data_offset==23))
{
Expand Down Expand Up @@ -1879,22 +1895,10 @@ BOOL InsertItemFromPkt(HWND hWndListView, t_dump_pkt *pt_pkt, struct timeval *ba

if (ntohs(pt_eth_hdr->type)!=ETH_P_IP)
{
sprintf(info, "%02hhx %02hhx %02hhx %02hhx %02hhx %02hhx"
, pt_pkt->pkt_data[0]
, pt_pkt->pkt_data[1]
, pt_pkt->pkt_data[2]
, pt_pkt->pkt_data[3]
, pt_pkt->pkt_data[4]
, pt_pkt->pkt_data[5]);
mac_n2str(info, pt_pkt->pkt_data+6);
ListView_SetItemText(hWndListView, index, 2, info);

sprintf(info, "%02hhx %02hhx %02hhx %02hhx %02hhx %02hhx"
, pt_pkt->pkt_data[6]
, pt_pkt->pkt_data[7]
, pt_pkt->pkt_data[8]
, pt_pkt->pkt_data[9]
, pt_pkt->pkt_data[10]
, pt_pkt->pkt_data[11]);
mac_n2str(info, pt_pkt->pkt_data);
ListView_SetItemText(hWndListView, index, 3, info);

get_eth_type_name(ntohs(pt_eth_hdr->type), info);
Expand All @@ -1908,7 +1912,7 @@ BOOL InsertItemFromPkt(HWND hWndListView, t_dump_pkt *pt_pkt, struct timeval *ba
ip_n2str(info, &(iph->saddr));
ListView_SetItemText(hWndListView, index, 2, info);

ip_n2str(info, &(iph->saddr));
ip_n2str(info, &(iph->daddr));
ListView_SetItemText(hWndListView, index, 3, info);

get_protocol_name(iph->protocol, info);
Expand Down
2 changes: 1 addition & 1 deletion xb_ether_tester.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "小兵以太网测试仪"
!define PRODUCT_VERSION "2.3.1"
!define PRODUCT_VERSION "2.3.2"
!define PRODUCT_PUBLISHER "孙明保"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\xb_ether_tester.exe"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
Expand Down

0 comments on commit 6603b03

Please sign in to comment.