<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>TCP/IP 소켓 프로그래밍 Archives - 어제와 내일의 나 그 사이의 이야기</title>
	<atom:link href="https://lycos7560.com/category/etc/%EA%B0%9C%EC%9D%B8-%EA%B3%B5%EB%B6%80-%EC%A0%80%EC%9E%A5%EC%9A%A9/tcp-ip-%EC%86%8C%EC%BC%93-%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>생각의 흐름을 타고 다니며 만드는 블로그</description>
	<lastBuildDate>Fri, 17 Oct 2025 22:14:21 +0000</lastBuildDate>
	<language>ko-KR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://lycos7560.com/wp-content/uploads/2022/11/cropped-cropped-cropped-log-1-150x150-1-80x80.png</url>
	<title>TCP/IP 소켓 프로그래밍 Archives - 어제와 내일의 나 그 사이의 이야기</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Npcap</title>
		<link>https://lycos7560.com/etc/%ea%b0%9c%ec%9d%b8-%ea%b3%b5%eb%b6%80-%ec%a0%80%ec%9e%a5%ec%9a%a9/tcp-ip-%ec%86%8c%ec%bc%93-%ed%94%84%eb%a1%9c%ea%b7%b8%eb%9e%98%eb%b0%8d/npcap/39959/</link>
					<comments>https://lycos7560.com/etc/%ea%b0%9c%ec%9d%b8-%ea%b3%b5%eb%b6%80-%ec%a0%80%ec%9e%a5%ec%9a%a9/tcp-ip-%ec%86%8c%ec%bc%93-%ed%94%84%eb%a1%9c%ea%b7%b8%eb%9e%98%eb%b0%8d/npcap/39959/#respond</comments>
		
		<dc:creator><![CDATA[lycos7560]]></dc:creator>
		<pubDate>Thu, 24 Apr 2025 09:39:15 +0000</pubDate>
				<category><![CDATA[TCP/IP 소켓 프로그래밍]]></category>
		<category><![CDATA[개인 공부 저장용]]></category>
		<category><![CDATA[기타]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[cpp]]></category>
		<category><![CDATA[npcap]]></category>
		<category><![CDATA[공부]]></category>
		<guid isPermaLink="false">https://lycos7560.com/?p=39959</guid>

					<description><![CDATA[<p>🔥 Npcap https://npcap.com ✅ Npcap 요약 Windows 운영체제를 위한 네트워크 패킷 캡처 및 분석 아키텍처이며 소프트웨어 라이브러리와 커널 레벨 네트워크 드라이버로 구성 ✅ 주요 특징 및 기능 ✅ 사용 분야 Npcap은 네트워크 분석, 문제 해결, 보안, 모니터링 등 다양한 목적으로 활용함. ✅ 제한 사항 Npcap은 호스트의 TCP/IP 프로토콜 스택과 독립적으로 작동하며 동일한 시스템 내의 다른 [&#8230;]</p>
<p>The post <a href="https://lycos7560.com/etc/%ea%b0%9c%ec%9d%b8-%ea%b3%b5%eb%b6%80-%ec%a0%80%ec%9e%a5%ec%9a%a9/tcp-ip-%ec%86%8c%ec%bc%93-%ed%94%84%eb%a1%9c%ea%b7%b8%eb%9e%98%eb%b0%8d/npcap/39959/">Npcap</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></description>
										<content:encoded><![CDATA[				<div class="wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-b0457b46      "
					data-scroll= "1"
					data-offset= "30"
					style=""
				>
				<div class="uagb-toc__wrap">
						<div class="uagb-toc__title">
							목차						</div>
																						<div class="uagb-toc__list-wrap ">
						<ol class="uagb-toc__list"><li class="uagb-toc__list"><a href="#npcap" class="uagb-toc-link__trigger"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f525.png" alt="🔥" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Npcap</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#npcap-요약" class="uagb-toc-link__trigger"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Npcap 요약</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#주요-특징-및-기능" class="uagb-toc-link__trigger"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 주요 특징 및 기능</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#사용-분야" class="uagb-toc-link__trigger"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 사용 분야</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#제한-사항" class="uagb-toc-link__trigger"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 제한 사항</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#npcap-및-libpcap-주요-함수" class="uagb-toc-link__trigger"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Npcap (및 libpcap) 주요 함수</a><ul class="uagb-toc__list"><li class="uagb-toc__list"><a href="#1-pcap-findalldevs" class="uagb-toc-link__trigger">1. pcap_findalldevs</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#2-pcap-freealldevs" class="uagb-toc-link__trigger">2. pcap_freealldevs</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#3-pcap-open-live" class="uagb-toc-link__trigger">3. pcap_open_live</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#4-pcap-loop" class="uagb-toc-link__trigger">4. pcap_loop</a><li class="uagb-toc__list"><li class="uagb-toc__list"><a href="#5-pcap-close" class="uagb-toc-link__trigger">5. pcap_close</a></ul></ul></ol>					</div>
									</div>
				</div>
			


<div style="height:40px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f525.png" alt="🔥" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Npcap</h2>



<p><a href="https://npcap.com" target="_blank" rel="noreferrer noopener">https://npcap.com</a></p>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Npcap 요약</h3>



<p>Windows 운영체제를 위한<strong> 네트워크 패킷 캡처 및 분석 아키텍처</strong>이며 <strong>소프트웨어 라이브러리</strong>와 <strong>커널 레벨 네트워크 드라이버</strong>로 구성</p>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 주요 특징 및 기능</h3>



<ul class="wp-block-list">
<li><strong>원시 패킷 접근:</strong> 일반적인 소켓 방식과 달리, 운영체제의 프로토콜 처리 과정을 거치지 않고 네트워크상의 &#8216;원시(raw)&#8217; 데이터 패킷에 직접 접근할 수 있음</li>



<li><strong>패킷 캡처:</strong> 로컬 머신으로 오가는 패킷뿐만 아니라, (공유 미디어 환경에서) 다른 호스트 간에 교환되는 패킷까지 캡처할 수 있음</li>



<li><strong>패킷 필터링:</strong> 사용자가 정의한 규칙에 따라 패킷을 필터링하여 필요한 데이터만 애플리케이션에 전달할 수 있음</li>



<li><strong>패킷 전송:</strong> 원시 패킷을 네트워크로 직접 전송하는 기능을 제공함</li>



<li><strong>통계 수집:</strong> 네트워크 트래픽에 대한 통계 정보를 수집할 수 있음</li>
</ul>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 사용 분야</h3>



<p>Npcap은 네트워크 분석, 문제 해결, 보안, 모니터링 등 다양한 목적으로 활용함.</p>



<ul class="wp-block-list">
<li>네트워크/프로토콜 분석기 </li>



<li>네트워크 모니터 및 트래픽 로거 </li>



<li>트래픽 생성기 </li>



<li>네트워크 침입 탐지 시스템 (NIDS) </li>



<li>네트워크 스캐너 및 보안 도구</li>
</ul>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 제한 사항</h3>



<p>Npcap은 <strong>호스트의 TCP/IP 프로토콜 스택과 독립적으로 작동</strong>하며 동일한 시스템 내의 다른 프로그램이 생성하는 트래픽을 가로채거나, 필터링하거나, 조작할 수는 없음.</p>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="817" height="366" src="https://lycos7560.com/wp-content/uploads/2025/04/image-1.png" alt="" class="wp-image-39960" srcset="https://lycos7560.com/wp-content/uploads/2025/04/image-1.png 817w, https://lycos7560.com/wp-content/uploads/2025/04/image-1-300x134.png 300w, https://lycos7560.com/wp-content/uploads/2025/04/image-1-768x344.png 768w" sizes="(max-width: 817px) 100vw, 817px" /><figcaption class="wp-element-caption"><a href="https://www.youtube.com/@nullnull_not_eq_null" target="_blank" rel="noreferrer noopener">https://www.youtube.com/@nullnull_not_eq_null</a></figcaption></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h3 class="wp-block-heading"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Npcap (및 libpcap) 주요 함수</h3>



<h5 class="wp-block-heading">1. pcap_findalldevs</h5>



<pre class="EnlighterJSRAW" data-enlighter-language="cpp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">pcap_findalldevs(pcap_if_t **alldevsp, char *errbuf)</pre>



<ul class="wp-block-list">
<li><strong>기능</strong>: <br>시스템에 존재하는 <strong>모든 네트워크 장치(인터페이스)의 목록을 검색</strong></li>
</ul>



<ul class="wp-block-list">
<li><strong>반환</strong>: <br>성공하면 0을 반환하고, <code>alldevsp</code>가 가리키는 포인터에 <code>pcap_if_t</code> 구조체들의 연결 리스트(linked list) 주소를 저장<br>실패하면 -1을 반환하고 <code>errbuf</code>에 오류 메시지를 저장</li>
</ul>



<figure class="wp-block-image size-full"><img decoding="async" width="492" height="119" src="https://lycos7560.com/wp-content/uploads/2025/04/image-2.png" alt="" class="wp-image-39962" srcset="https://lycos7560.com/wp-content/uploads/2025/04/image-2.png 492w, https://lycos7560.com/wp-content/uploads/2025/04/image-2-300x73.png 300w" sizes="(max-width: 492px) 100vw, 492px" /><figcaption class="wp-element-caption">pcap_findalldevs 사용 예시</figcaption></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h5 class="wp-block-heading">2. pcap_freealldevs</h5>



<pre class="EnlighterJSRAW" data-enlighter-language="cpp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">pcap_freealldevs(pcap_if_t *alldevs)</pre>



<ul class="wp-block-list">
<li><strong>기능</strong>: <br>함수로 할당된 장치 목록 메모리를 해제하는 함수<br>사용이 끝난 후 반드시 호출해야 메모리 누수를 막을 수 있음</li>
</ul>



<figure class="wp-block-image size-full"><img decoding="async" width="754" height="216" src="https://lycos7560.com/wp-content/uploads/2025/04/image-3.png" alt="" class="wp-image-39963" srcset="https://lycos7560.com/wp-content/uploads/2025/04/image-3.png 754w, https://lycos7560.com/wp-content/uploads/2025/04/image-3-300x86.png 300w" sizes="(max-width: 754px) 100vw, 754px" /><figcaption class="wp-element-caption">pcap_freealldevs 사용 예시</figcaption></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h5 class="wp-block-heading">3. pcap_open_live</h5>



<pre class="EnlighterJSRAW" data-enlighter-language="cpp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">pcap_open_live(const char *device, int snaplen, int promisc, int to_ms, char *errbuf)</pre>



<ul class="wp-block-list">
<li><strong>기능</strong>: <br>지정된 네트워크 장치를 열어 실시간 패킷 캡처를 위한 세션 핸들(<code>pcap_t *</code>)을 얻는 함수</li>



<li><code>device</code>: 캡처할 네트워크 장치의 이름 (예: <code>pcap_findalldevs</code>로 얻은 이름)</li>



<li><code>snaplen</code>: 캡처할 패킷의 최대 크기 (byte). 패킷 전체를 캡처하려면 충분히 큰 값(예: 65535)을 지정</li>



<li><code>promisc</code>: 무차별 모드(promiscuous mode) 설정 여부. 1로 설정하면 자신에게 오지 않는 패킷도 캡처</li>



<li><code>to_ms</code>: 읽기 타임아웃 시간 (밀리초)</li>



<li><code>errbuf</code>: 오류 발생 시 오류 메시지를 저장할 버퍼</li>
</ul>



<figure class="wp-block-image size-full"><img decoding="async" width="888" height="306" src="https://lycos7560.com/wp-content/uploads/2025/04/image-4.png" alt="" class="wp-image-39964" srcset="https://lycos7560.com/wp-content/uploads/2025/04/image-4.png 888w, https://lycos7560.com/wp-content/uploads/2025/04/image-4-300x103.png 300w, https://lycos7560.com/wp-content/uploads/2025/04/image-4-768x265.png 768w" sizes="(max-width: 888px) 100vw, 888px" /><figcaption class="wp-element-caption">pcap_open_live 사용 예시</figcaption></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h5 class="wp-block-heading">4. pcap_loop</h5>



<pre class="EnlighterJSRAW" data-enlighter-language="cpp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">pcap_loop(pcap_t *p, int cnt, pcap_handler callback, u_char *user)</pre>



<ul class="wp-block-list">
<li><strong>기능</strong>: <br>패킷 캡처 루프를 시작하는 함수. 패킷이 캡처될 때마다 지정된 콜백 함수(<code>callback</code>)를 호출</li>



<li><code>p</code>: 세션 핸들. </li>



<li><code>cnt</code>: 캡처할 패킷의 수. 음수나 0이면 오류가 발생하거나 중단될 때까지 계속 캡처합니다. </li>



<li><code>callback</code>: 패킷이 캡처될 때 호출될 함수 포인터. 이 함수는 <code>(u_char *user, const struct pcap_pkthdr *header, const u_char *packet)</code> 형태의 인자를 받습니다. </li>



<li><code>user</code>: 콜백 함수에 전달될 사용자 정의 데이터 포인터.</li>
</ul>



<figure class="wp-block-image size-full"><img decoding="async" width="754" height="561" src="https://lycos7560.com/wp-content/uploads/2025/04/image-5.png" alt="" class="wp-image-39965" srcset="https://lycos7560.com/wp-content/uploads/2025/04/image-5.png 754w, https://lycos7560.com/wp-content/uploads/2025/04/image-5-300x223.png 300w" sizes="(max-width: 754px) 100vw, 754px" /><figcaption class="wp-element-caption">pcap_loop 사용 예시</figcaption></figure>



<div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div>



<h5 class="wp-block-heading">5. pcap_close</h5>



<pre class="EnlighterJSRAW" data-enlighter-language="cpp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">pcap_close(pcap_t *p)</pre>



<ul class="wp-block-list">
<li><strong>기능</strong>: <br>캡처 세션을 닫고 관련 리소스를 해제하는 함수<br><code>pcap_open_live</code> 등으로 열었던 핸들은 반드시 이 함수로 닫아야 함.</li>
</ul>



<figure class="wp-block-image size-full"><img decoding="async" width="575" height="187" src="https://lycos7560.com/wp-content/uploads/2025/04/image-6.png" alt="" class="wp-image-39966" srcset="https://lycos7560.com/wp-content/uploads/2025/04/image-6.png 575w, https://lycos7560.com/wp-content/uploads/2025/04/image-6-300x98.png 300w" sizes="(max-width: 575px) 100vw, 575px" /><figcaption class="wp-element-caption">pcap_close 사용 예시</figcaption></figure>



<p></p>
<p>The post <a href="https://lycos7560.com/etc/%ea%b0%9c%ec%9d%b8-%ea%b3%b5%eb%b6%80-%ec%a0%80%ec%9e%a5%ec%9a%a9/tcp-ip-%ec%86%8c%ec%bc%93-%ed%94%84%eb%a1%9c%ea%b7%b8%eb%9e%98%eb%b0%8d/npcap/39959/">Npcap</a> appeared first on <a href="https://lycos7560.com">어제와 내일의 나 그 사이의 이야기</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lycos7560.com/etc/%ea%b0%9c%ec%9d%b8-%ea%b3%b5%eb%b6%80-%ec%a0%80%ec%9e%a5%ec%9a%a9/tcp-ip-%ec%86%8c%ec%bc%93-%ed%94%84%eb%a1%9c%ea%b7%b8%eb%9e%98%eb%b0%8d/npcap/39959/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
