---
title: "What minimum socket size should I select for the UDP socket"
url: "https://maker.wiznet.io/forum/10855"
markdown_url: "https://maker.wiznet.io/forum/10855/md"
type: "Forum topic"
category: "Ethernet Chips"
author: "Eerik"
created: "2015-02-18T09:38:20+09:00"
last_activity: "2017-05-04T08:34:53+09:00"
language: "en"
views: 449
replies: 1
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# What minimum socket size should I select for the UDP socket

## Question

Asked by Eerik on 2015-02-18 in Ethernet Chips.

What minimum Sn_RXBUF_SIZE and Sn_TXBUF_SIZE should I select for the UDP socket used for Wake Up on LAN?

## Replies

### Reply 1 by Coccoliso, 2015-02-18

The magic packet is a broadcast frame containing anywhere within its payload 6 bytes of all 255 (FF FF FF FF FF FF in hexadecimal), followed by sixteen repetitions of the target computer’s 48-bit MAC address, for a total of 102 bytes but the size of the buffer of the W5500 can be set in steps of 1K then the minimum size for this use remains 1K.

Sn_RXBUF_SIZE = 1
Sn_TXBUF_SIZE = 1

As usual in receiving the first 8 bytes of the buffer are:
4 the ip address of the sender
2 port of the sender
2 the number of received bytes number to process

---

Source: https://maker.wiznet.io/forum/10855
