⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 etherealparser2.asv

📁 用matlab写的以太网报头提取工具。它可以截获网络数据包并记录下它的时间戳、数据包长度和数据域等。
💻 ASV
📖 第 1 页 / 共 3 页
字号:
function varargout = etherealParser2(varargin)
% ETHEREALPARSER2 M-file for etherealParser2.fig
%      ETHEREALPARSER2, by itself, creates a new ETHEREALPARSER2 or raises the existing
%      singleton*.
%
%      H = ETHEREALPARSER2 returns the handle to a new ETHEREALPARSER2 or the handle to
%      the existing singleton*.
%
%      ETHEREALPARSER2('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in ETHEREALPARSER2.M with the given input arguments.
%
%      ETHEREALPARSER2('Property','Value',...) creates a new ETHEREALPARSER2 or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before etherealParser2_OpeningFunction gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to etherealParser2_OpeningFcn via varargin.
%
%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
%      instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to help etherealParser2

% Last Modified by GUIDE v2.5 26-Jan-2006 21:45:33

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @etherealParser2_OpeningFcn, ...
                   'gui_OutputFcn',  @etherealParser2_OutputFcn, ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);
if nargin && ischar(varargin{1})
    gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
    gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT


% --- Executes just before etherealParser2 is made visible.
function etherealParser2_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% varargin   command line arguments to etherealParser2 (see VARARGIN)

% Choose default command line output for etherealParser2
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes etherealParser2 wait for user response (see UIRESUME)
% uiwait(handles.figure1);


% --- Outputs from this function are returned to the command line.
function varargout = etherealParser2_OutputFcn(hObject, eventdata, handles) 
% varargout  cell array for returning output args (see VARARGOUT);
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;


% --- Executes on button press in MACType.
function MACType_Callback(hObject, eventdata, handles)
% hObject    handle to MACType (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of MACType


% --- Executes on button press in MACSourceAddress.
function MACSourceAddress_Callback(hObject, eventdata, handles)
% hObject    handle to MACSourceAddress (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of MACSourceAddress


% --- Executes on button press in IPTotalLength.
function IPTotalLength_Callback(hObject, eventdata, handles)
% hObject    handle to IPTotalLength (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of IPTotalLength


% --- Executes on button press in IPVersion.
function IPVersion_Callback(hObject, eventdata, handles)
% hObject    handle to IPVersion (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of IPVersion


% --- Executes on button press in IPTimeToLive.
function IPTimeToLive_Callback(hObject, eventdata, handles)
% hObject    handle to IPTimeToLive (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of IPTimeToLive


% --- Executes on button press in IPProtocol.
function IPProtocol_Callback(hObject, eventdata, handles)
% hObject    handle to IPProtocol (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of IPProtocol


% --- Executes on button press in IPHdrChecksum.
function IPHdrChecksum_Callback(hObject, eventdata, handles)
% hObject    handle to IPHdrChecksum (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of IPHdrChecksum


% --- Executes on button press in IPSourceAddress.
function IPSourceAddress_Callback(hObject, eventdata, handles)
% hObject    handle to IPSourceAddress (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of IPSourceAddress


% --- Executes on button press in IPDestAddress.
function IPDestAddress_Callback(hObject, eventdata, handles)
% hObject    handle to IPDestAddress (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of IPDestAddress


% --- Executes on button press in IPFragOffset.
function IPFragOffset_Callback(hObject, eventdata, handles)
% hObject    handle to IPFragOffset (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of IPFragOffset


% --- Executes on button press in IPDiffServeField.
function IPDiffServeField_Callback(hObject, eventdata, handles)
% hObject    handle to IPDiffServeField (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of IPDiffServeField


% --- Executes on button press in IPHdrLength.
function IPHdrLength_Callback(hObject, eventdata, handles)
% hObject    handle to IPHdrLength (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of IPHdrLength


% --- Executes on button press in IPFlags.
function IPFlags_Callback(hObject, eventdata, handles)
% hObject    handle to IPFlags (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of IPFlags


% --- Executes on button press in IPID.
function IPID_Callback(hObject, eventdata, handles)
% hObject    handle to IPID (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of IPID


% --- Executes on button press in UDPSourcePort.
function UDPSourcePort_Callback(hObject, eventdata, handles)
% hObject    handle to UDPSourcePort (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of UDPSourcePort


% --- Executes on button press in UDPDestPort.
function UDPDestPort_Callback(hObject, eventdata, handles)
% hObject    handle to UDPDestPort (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of UDPDestPort


% --- Executes on button press in UDPLength.
function UDPLength_Callback(hObject, eventdata, handles)
% hObject    handle to UDPLength (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of UDPLength


% --- Executes on button press in UDPChecksum.
function UDPChecksum_Callback(hObject, eventdata, handles)
% hObject    handle to UDPChecksum (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of UDPChecksum


% --- Executes on button press in pbBrowse.
function pbBrowse_Callback(hObject, eventdata, handles)
% hObject    handle to pbBrowse (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

[fileName,pathName]=uigetfile('FilterSpec');
fullName=[pathName fileName];
set(handles.filename,'String',fullName);

function filename_Callback(hObject, eventdata, handles)
% hObject    handle to filename (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of filename as text
%        str2double(get(hObject,'String')) returns contents of filename as a double


% --- Executes during object creation, after setting all properties.
function filename_CreateFcn(hObject, eventdata, handles)
% hObject    handle to filename (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function IP1_Callback(hObject, eventdata, handles)
% hObject    handle to IP1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of IP1 as text
%        str2double(get(hObject,'String')) returns contents of IP1 as a double


% --- Executes during object creation, after setting all properties.
function IP1_CreateFcn(hObject, eventdata, handles)
% hObject    handle to IP1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function IP2_Callback(hObject, eventdata, handles)
% hObject    handle to IP2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of IP2 as text
%        str2double(get(hObject,'String')) returns contents of IP2 as a double


% --- Executes during object creation, after setting all properties.
function IP2_CreateFcn(hObject, eventdata, handles)
% hObject    handle to IP2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -