Microsoft SQL Server Syntax to create the table for Packet Logging

To create the table for Packet Logging with a minimal set of fields:

CREATE TABLE [dbo].[packets] (
   ts datetime DEFAULT CURRENT_TIMESTAMP NOT NULL,
   filterid smallint NOT NULL,
   proto smallint,
   src_ip char(16),
   src_port int,
   dst_ip char(16),
   dst_port int,
   sent int, recv int)

To create the table for Packet Logging with additional fields:

CREATE TABLE [dbo].[packets] (
   ts datetime DEFAULT CURRENT_TIMESTAMP NOT NULL,
   filterid smallint NOT NULL,
   filtername char(30),
   proto smallint,
   tos smallint,
   src_mac char(16),
   src_ip char(16),
   src_port int,
   dst_mac char(16),
   dst_ip char(16),
   dst_port int,
   sent int, recv int)

 Note
 
Microsoft SQL Server must automatically insert the current date and time in the table with new record. Therefore, you should use CURRENT_TIMESTAMP function for this purpose.